diff --git a/ext/user/main.php b/ext/user/main.php index 0f2be921..15136f62 100644 --- a/ext/user/main.php +++ b/ext/user/main.php @@ -5,7 +5,7 @@ class UserBlockBuildingEvent extends Event { public function add_link($name, $link, $position=50) { while(isset($this->parts[$position])) $position++; - $this->parts[$position] = "$name"; + $this->parts[$position] = array("name" => $name, "link" => $link); } } diff --git a/ext/user/theme.php b/ext/user/theme.php index bf36f395..dedca22a 100644 --- a/ext/user/theme.php +++ b/ext/user/theme.php @@ -30,8 +30,10 @@ class UserPageTheme extends Themelet { public function display_user_block(Page $page, User $user, $parts) { $h_name = html_escape($user->name); - $html = "Logged in as $h_name
"; - $html .= join("\n
", $parts); + $html = "Logged in as $h_name"; + foreach($parts as $part) { + $html .= "
{$part["name"]}"; + } $page->add_block(new Block("User Links", $html, "left", 90)); } diff --git a/themes/danbooru/user.theme.php b/themes/danbooru/user.theme.php index 84bd1184..e9675dd9 100644 --- a/themes/danbooru/user.theme.php +++ b/themes/danbooru/user.theme.php @@ -15,7 +15,10 @@ class CustomUserPageTheme extends UserPageTheme { public function display_user_block($page, $user, $parts) { $h_name = html_escape($user->name); - $html = "
  • " . join("\n
  • ", $parts); + $html = ""; + foreach($parts as $part) { + $html .= "
  • {$part["name"]}"; + } $page->add_block(new Block("User Links", $html, "user", 90)); } diff --git a/themes/warm/user.theme.php b/themes/warm/user.theme.php index 65763393..889245c7 100644 --- a/themes/warm/user.theme.php +++ b/themes/warm/user.theme.php @@ -3,7 +3,10 @@ class CustomUserPageTheme extends UserPageTheme { public function display_user_block(Page $page, User $user, $parts) { $h_name = html_escape($user->name); - $html = join("\n | ", $parts); + $html = " | "; + foreach($parts as $part) { + $html .= "{$part["name"]} | "; + } $page->add_block(new Block("Logged in as $h_name", $html, "head", 90)); } public function display_login_block(Page $page) {