Exemplo n.º 1
0
 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;
 }