danbooru theme updates
This commit is contained in:
parent
310c7b0da0
commit
a79b9047fb
@ -58,6 +58,7 @@ class Layout {
|
||||
}
|
||||
|
||||
$left_block_html = "";
|
||||
$user_block_html = "";
|
||||
$main_block_html = "";
|
||||
|
||||
foreach($page->blocks as $block) {
|
||||
@ -65,6 +66,9 @@ class Layout {
|
||||
case "left":
|
||||
$left_block_html .= $this->block_to_html($block, true);
|
||||
break;
|
||||
case "user":
|
||||
$user_block_html .= $block->body; // $this->block_to_html($block, true);
|
||||
break;
|
||||
case "main":
|
||||
if($block->header == "Images") {
|
||||
$block->header = " ";
|
||||
@ -101,6 +105,29 @@ class Layout {
|
||||
$custom_links .= "<li><a href='".make_link('wiki')."'>Wiki</a></li>";
|
||||
$custom_links .= "<li><a href='".make_link('wiki/more')."'>More »</a></li>";
|
||||
|
||||
$custom_sublinks = "";
|
||||
// hack
|
||||
global $user;
|
||||
$username = url_escape($user->name);
|
||||
// hack
|
||||
$qp = _get_query_parts();
|
||||
// php sucks
|
||||
switch($qp[0]) {
|
||||
case "user":
|
||||
$custom_sublinks .= $user_block_html;
|
||||
break;
|
||||
case "post":
|
||||
$custom_sublinks .= "<li><a href='".make_link('post/list')."'>All</a></li>";
|
||||
$custom_sublinks .= "<li><a href='".make_link("post/list/favorited_by=$username/1")."'>My Favorites</a></li>";
|
||||
break;
|
||||
case "tags":
|
||||
$custom_sublinks .= "<li><a href='".make_link('tags/map')."'>Map</a></li>";
|
||||
$custom_sublinks .= "<li><a href='".make_link('tags/alphabetic')."'>Alphabetic</a></li>";
|
||||
$custom_sublinks .= "<li><a href='".make_link('tags/popularity')."'>Popularity</a></li>";
|
||||
$custom_sublinks .= "<li><a href='".make_link('tags/categories')."'>Categories</a></li>";
|
||||
$custom_sublinks .= "<li><a href='".make_link('alias/list')."'>Aliases</a></li>";
|
||||
break;
|
||||
}
|
||||
|
||||
// bzchan: failed attempt to add heading after title_link (failure was it looked bad)
|
||||
//if($this->heading==$site_name)$this->heading = '';
|
||||
@ -136,6 +163,9 @@ $header_html
|
||||
<ul class="flat-list">
|
||||
$custom_links
|
||||
</ul>
|
||||
<br><ul class="flat-list">
|
||||
$custom_sublinks
|
||||
</ul>
|
||||
</div>
|
||||
$subheading
|
||||
|
||||
|
@ -1,15 +1,9 @@
|
||||
<?php
|
||||
|
||||
class CustomTagListTheme extends TagListTheme {
|
||||
var $heading = "";
|
||||
var $list = "";
|
||||
|
||||
public function display_page($page) {
|
||||
$page->disable_left();
|
||||
$page->set_title("Tag List");
|
||||
$page->set_heading($this->heading);
|
||||
$page->add_block(new Block("Navigation", str_replace("<br>", ", ", $this->navigation), "main", 0));
|
||||
$page->add_block(new Block(" ", $this->list));
|
||||
parent::display_page($page);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@ -10,14 +10,13 @@ class CustomUserPageTheme extends UserPageTheme {
|
||||
}
|
||||
|
||||
public function display_user_links($page, $user, $parts) {
|
||||
$page->add_block(new Block("User Links", join(", ", $parts), "main", 10));
|
||||
// $page->add_block(new Block("User Links", join("<br>", $parts), "left", 10));
|
||||
}
|
||||
|
||||
public function display_user_block($page, $user, $parts) {
|
||||
# $h_name = html_escape($user->name);
|
||||
# $html = "Logged in as $h_name<br>";
|
||||
# $html .= join("\n<br/>", $parts);
|
||||
# $page->add_block(new Block("User Links", $html, "left", 90));
|
||||
$h_name = html_escape($user->name);
|
||||
$html = "<li>" . join("\n<li>", $parts);
|
||||
$page->add_block(new Block("User Links", $html, "user", 90));
|
||||
}
|
||||
|
||||
public function display_signup_page($page) {
|
||||
@ -89,6 +88,5 @@ class CustomUserPageTheme extends UserPageTheme {
|
||||
";
|
||||
return $html;
|
||||
}
|
||||
// }}}
|
||||
}
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user