diff --git a/bl-kernel/authors.class.php b/bl-kernel/authors.class.php index 1a384c3e..fc6263a7 100644 --- a/bl-kernel/authors.class.php +++ b/bl-kernel/authors.class.php @@ -23,7 +23,8 @@ class Authors extends dbList { if (isset($authorsIndex[$authorName])) { array_push($authorsIndex[$authorName]['list'], $pageKey); } else { - $authorsIndex[$authorName]['name'] = $authorName; + $user = new User($pageFields['username']); + $authorsIndex[$authorName]['name'] = $user->displayName(); $authorsIndex[$authorName]['list'] = array($pageKey); } } diff --git a/bl-kernel/helpers/theme.class.php b/bl-kernel/helpers/theme.class.php index 6ee8dcd0..1d97d393 100644 --- a/bl-kernel/helpers/theme.class.php +++ b/bl-kernel/helpers/theme.class.php @@ -91,6 +91,55 @@ class Theme return DOMAIN_ADMIN; } + public static function locationTitle() + { + global $url; + global $site; + global $tags; + global $archives; + global $authors; + global $categories; + global $WHERE_AM_I; + global $page; + + if ($WHERE_AM_I == 'page') { + return $page->title(); + } elseif ($WHERE_AM_I == 'tag') { + try { + $tagKey = $url->slug(); + $tag = new Tag($tagKey); + return $tag->name(); + } catch (Exception $e) { + // Tag doesn't exist + } + } elseif ($WHERE_AM_I == 'category') { + try { + $categoryKey = $url->slug(); + $category = new Category($categoryKey); + return $category->name(); + } catch (Exception $e) { + // Category doesn't exist + } + } elseif ($WHERE_AM_I == 'archive') { + try { + $archiveKey = $url->slug(); + return Date::prettyArchiveDate($archiveKey); + } catch (Exception $e) { + // Archive doesn't exist + } + } elseif ($WHERE_AM_I == 'author') { + try { + $authorKey = $url->slug(); + $user = new User($authorKey); + return $user->displayName(); + } catch (Exception $e) { + // Author doesn't exist + } + } + + return null; + } + public static function metaTags($tag) { if ($tag == 'title') { diff --git a/bl-themes/popeye/php/home.php b/bl-themes/popeye/php/home.php index d07a8fcf..ac51274c 100644 --- a/bl-themes/popeye/php/home.php +++ b/bl-themes/popeye/php/home.php @@ -47,6 +47,10 @@ + +

+ +