diff --git a/themes/danbooru/layout.class.php b/themes/danbooru/layout.class.php
index b4dbf9a4..738a5d31 100644
--- a/themes/danbooru/layout.class.php
+++ b/themes/danbooru/layout.class.php
@@ -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 .= "
Wiki";
$custom_links .= "More »";
+ $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 .= "All";
+ $custom_sublinks .= "My Favorites";
+ break;
+ case "tags":
+ $custom_sublinks .= "Map";
+ $custom_sublinks .= "Alphabetic";
+ $custom_sublinks .= "Popularity";
+ $custom_sublinks .= "Categories";
+ $custom_sublinks .= "Aliases";
+ 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
+
$subheading
diff --git a/themes/danbooru/tag_list.theme.php b/themes/danbooru/tag_list.theme.php
index 8a1a0c3a..37290e40 100644
--- a/themes/danbooru/tag_list.theme.php
+++ b/themes/danbooru/tag_list.theme.php
@@ -1,15 +1,9 @@
disable_left();
- $page->set_title("Tag List");
- $page->set_heading($this->heading);
- $page->add_block(new Block("Navigation", str_replace("
", ", ", $this->navigation), "main", 0));
- $page->add_block(new Block(" ", $this->list));
+ parent::display_page($page);
}
}
?>
diff --git a/themes/danbooru/user.theme.php b/themes/danbooru/user.theme.php
index d6049761..84bd1184 100644
--- a/themes/danbooru/user.theme.php
+++ b/themes/danbooru/user.theme.php
@@ -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("
", $parts), "left", 10));
}
public function display_user_block($page, $user, $parts) {
-# $h_name = html_escape($user->name);
-# $html = "Logged in as $h_name
";
-# $html .= join("\n
", $parts);
-# $page->add_block(new Block("User Links", $html, "left", 90));
+ $h_name = html_escape($user->name);
+ $html = "" . join("\n", $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;
}
-// }}}
}
?>