static function getAuthorFooter() { global $wgUser; ArticleAuthors::loadAuthorsCache(); if (sizeof(self::$authorsCache) == 0) { return ''; } if ($wgUser->getID() > 0) { $users = self::$authorsCache; $users = array_slice($users, 0, min(sizeof($users), 100)); return "<p class='info'>" . wfMsg('thanks_to_authors') . " " . self::formatAuthorList($users) . "</p>"; } else { $users = array_reverse(self::$authorsCache); $users = array_slice($users, 1, min(sizeof($users) - 1, 3)); if (sizeof($users)) { return "<p class='info'>" . wfMsg('most_recent_authors') . " " . self::formatAuthorList($users, false, false) . "</p>"; } else { return ''; } } }
protected function getArticleInfo($title) { global $wgUser; $skin = $wgUser->getSkin(); $html = ''; //cats $catlinks = $skin->getCategoryLinks(false); if ($catlinks) { $html .= '<p><span class="ai_hdr">' . wfMsg('categories') . ':</span><br />' . $catlinks . '</p>'; } //authors ArticleAuthors::loadAuthorsCache(); $users = array_slice(ArticleAuthors::$authorsCache, 0, min(sizeof(ArticleAuthors::$authorsCache), 4)); if (!empty($users)) { $otherUserCount = sizeof(ArticleAuthors::$authorsCache) - 4; $authorSpan = ArticleAuthors::formatAuthorList($users, false, false); if ($otherUserCount > 1) { $authors = wfMsg('originated_by_and_others_anon', $authorSpan, $otherUserCount); } elseif ($otherUserCount == 1) { $authors = wfMsg('originated_by_and_1_other_anon', $authorSpan); } else { $authors = wfMsg('originated_by_anon', $authorSpan); } } if ($authors) { $html .= '<p>' . $authors . '</p>'; } $html = '<div id="article_info">' . $html . '</div>'; return $html; }