function topLinks() { global $wgOut, $wgUser; $sep = " |\n"; $s = $this->getSkin()->mainPageLink() . $sep . Linker::specialLink('Recentchanges'); if ($wgOut->isArticle()) { $s .= $sep . '<strong>' . $this->editThisPage() . '</strong>' . $sep . $this->talkLink() . $sep . $this->historyLink(); } /* show links to different language variants */ $s .= $this->variantLinks(); $s .= $this->extensionTabLinks(); if ($wgUser->isAnon()) { $s .= $sep . Linker::specialLink('Userlogin'); } else { /* show user page and user talk links */ $s .= $sep . Linker::link($wgUser->getUserPage(), wfMsgHtml('mypage')); $s .= $sep . Linker::link($wgUser->getTalkPage(), wfMsgHtml('mytalk')); if ($wgUser->getNewtalk()) { $s .= ' *'; } /* show watchlist link */ $s .= $sep . Linker::specialLink('Watchlist'); /* show my contributions link */ $s .= $sep . Linker::link(SpecialPage::getSafeTitleFor('Contributions', $wgUser->getName()), wfMsgHtml('mycontris')); /* show my preferences link */ $s .= $sep . Linker::specialLink('Preferences'); /* show upload file link */ if (UploadBase::isEnabled() && UploadBase::isAllowed($wgUser) === true) { $s .= $sep . $this->getUploadLink(); } /* show log out link */ $s .= $sep . $this->getSkin()->specialLink('Userlogout'); } $s .= $sep . $this->specialPagesList(); return $s; }
public function specialLink($name, $key = '') { return Linker::specialLink($name, $key); }
function nameAndLogin() { global $wgUser, $wgLang, $wgRequest; $returnTo = $this->getSkin()->getTitle(); $ret = ''; if ($wgUser->isAnon()) { if ($this->getSkin()->showIPinHeader()) { $name = $wgRequest->getIP(); $talkLink = Linker::link($wgUser->getTalkPage(), $wgLang->getNsText(NS_TALK)); $talkLink = wfMessage('parentheses')->rawParams($talkLink)->escaped(); $ret .= "{$name} {$talkLink}"; } else { $ret .= wfMessage('notloggedin')->text(); } $query = array(); if (!$returnTo->isSpecial('Userlogout')) { $query['returnto'] = $returnTo->getPrefixedDBkey(); } $loginlink = $wgUser->isAllowed('createaccount') ? 'nav-login-createaccount' : 'login'; $ret .= "\n<br />" . Linker::link(SpecialPage::getTitleFor('Userlogin'), wfMessage($loginlink)->text(), array(), $query); } else { $talkLink = Linker::link($wgUser->getTalkPage(), $wgLang->getNsText(NS_TALK)); $talkLink = wfMessage('parentheses')->rawParams($talkLink)->escaped(); $ret .= Linker::link($wgUser->getUserPage(), htmlspecialchars($wgUser->getName())); $ret .= " {$talkLink}<br />"; $ret .= $wgLang->pipeList(array(Linker::link(SpecialPage::getTitleFor('Userlogout'), wfMessage('logout')->text(), array(), array('returnto' => $returnTo->getPrefixedDBkey())), Linker::specialLink('Preferences'))); } $ret = $wgLang->pipeList(array($ret, Linker::link(Title::newFromText(wfMessage('helppage')->inContentLanguage()->text()), wfMessage('help')->text()))); return $ret; }
/** * Compute the sidebar * @access private * * @return string */ function quickBar() { $s = "\n<div id='quickbar'>"; $sep = '<br />'; $s .= $this->menuHead('qbfind'); $s .= $this->searchForm(); $s .= $this->menuHead('qbbrowse'); # Use the first heading from the Monobook sidebar as the "browse" section $bar = $this->getSkin()->buildSidebar(); unset($bar['SEARCH']); unset($bar['LANGUAGES']); unset($bar['TOOLBOX']); $barnumber = 1; foreach ($bar as $heading => $browseLinks) { if ($barnumber > 1) { $headingMsg = wfMessage($heading); if ($headingMsg->exists()) { $h = $headingMsg->text(); } else { $h = $heading; } $s .= "\n<h6>" . htmlspecialchars($h) . "</h6>"; } if (is_array($browseLinks)) { foreach ($browseLinks as $link) { if ($link['text'] != '-') { $s .= "<a href=\"{$link['href']}\">" . htmlspecialchars($link['text']) . '</a>' . $sep; } } } $barnumber++; } $user = $this->getSkin()->getUser(); if ($this->data['isarticle']) { $s .= $this->menuHead('qbedit'); $s .= '<strong>' . $this->editThisPage() . '</strong>'; $s .= $sep . Linker::linkKnown(Title::newFromText(wfMsgForContent('edithelppage')), wfMsg('edithelp')); if ($this->data['loggedin']) { $s .= $sep . $this->moveThisPage(); } if ($user->isAllowed('delete')) { $dtp = $this->deleteThisPage(); if ($dtp != '') { $s .= $sep . $dtp; } } if ($user->isAllowed('protect')) { $ptp = $this->protectThisPage(); if ($ptp != '') { $s .= $sep . $ptp; } } $s .= $sep; $s .= $this->menuHead('qbpageoptions'); $s .= $this->talkLink() . $sep . $this->commentLink() . $sep . $this->printableLink(); if ($this->data['loggedin']) { $s .= $sep . $this->watchThisPage(); } $s .= $sep; $s .= $this->menuHead('qbpageinfo') . $this->historyLink() . $sep . $this->whatLinksHere() . $sep . $this->watchPageLinksLink(); $title = $this->getSkin()->getTitle(); $tns = $title->getNamespace(); if ($tns == NS_USER || $tns == NS_USER_TALK) { $id = User::idFromName($title->getText()); if ($id != 0) { $s .= $sep . $this->userContribsLink(); if ($this->getSkin()->showEmailUser($id)) { $s .= $sep . $this->emailUserLink(); } } } $s .= $sep; } $s .= $this->menuHead('qbmyoptions'); if ($this->data['loggedin']) { $tl = Linker::link($user->getTalkPage(), wfMsg('mytalk'), array(), array(), array('known', 'noclasses')); if ($user->getNewtalk()) { $tl .= ' *'; } $s .= Linker::link($user->getUserPage(), wfMsg('mypage'), array(), array(), array('known', 'noclasses')) . $sep . $tl . $sep . Linker::specialLink('Watchlist') . $sep . Linker::link(SpecialPage::getSafeTitleFor('Contributions', $user->getName()), wfMsg('mycontris'), array(), array(), array('known', 'noclasses')) . $sep . Linker::specialLink('Preferences') . $sep . Linker::specialLink('Userlogout'); } else { $s .= Linker::specialLink('Userlogin'); } $s .= $this->menuHead('qbspecialpages') . Linker::specialLink('Newpages') . $sep . Linker::specialLink('Listfiles') . $sep . Linker::specialLink('Statistics'); if (UploadBase::isEnabled() && UploadBase::isAllowed($user) === true) { $s .= $sep . $this->getUploadLink(); } global $wgSiteSupportPage; if ($wgSiteSupportPage) { $s .= $sep . '<a href="' . htmlspecialchars($wgSiteSupportPage) . '" class="internal">' . wfMsg('sitesupport') . '</a>'; } $s .= $sep . Linker::link(SpecialPage::getTitleFor('Specialpages'), wfMsg('moredotdotdot'), array(), array(), array('known', 'noclasses')); $s .= $sep . "\n</div>\n"; return $s; }
function quickBar() { global $wgOut, $wgUser, $wgRequest, $wgContLang; wfProfileIn(__METHOD__); $action = $wgRequest->getText('action'); $wpPreview = $wgRequest->getBool('wpPreview'); $tns = $this->getSkin()->getTitle()->getNamespace(); $s = "\n<div id='quickbar'>"; $s .= "\n" . $this->getSkin()->logoText() . "\n<hr class='sep' />"; $sep = "\n<br />"; # Use the first heading from the Monobook sidebar as the "browse" section $bar = $this->getSkin()->buildSidebar(); unset($bar['SEARCH']); unset($bar['LANGUAGES']); unset($bar['TOOLBOX']); $barnumber = 1; foreach ($bar as $browseLinks) { if (is_array($browseLinks)) { if ($barnumber > 1) { $s .= "\n<hr class='sep' />"; } foreach ($browseLinks as $link) { if ($link['text'] != '-') { $s .= "<a href=\"{$link['href']}\">" . htmlspecialchars($link['text']) . '</a>' . $sep; } } } if ($barnumber == 1) { // only show watchlist link if logged in if ($wgUser->isLoggedIn()) { $s .= Linker::specialLink('Watchlist'); $s .= $sep . Linker::linkKnown(SpecialPage::getTitleFor('Contributions'), wfMsg('mycontris'), array(), array('target' => $wgUser->getName())); } } $barnumber = $barnumber + 1; } $s .= "\n<hr class='sep' />"; $articleExists = $this->getSkin()->getTitle()->getArticleId(); if ($wgOut->isArticle() || $action == 'edit' || $action == 'history' || $wpPreview) { if ($wgOut->isArticle()) { $s .= '<strong>' . $this->editThisPage() . '</strong>'; } else { # backlink to the article in edit or history mode if ($articleExists) { # no backlink if no article switch ($tns) { case NS_TALK: case NS_USER_TALK: case NS_PROJECT_TALK: case NS_FILE_TALK: case NS_MEDIAWIKI_TALK: case NS_TEMPLATE_TALK: case NS_HELP_TALK: case NS_CATEGORY_TALK: $text = wfMsg('viewtalkpage'); break; case NS_MAIN: $text = wfMsg('articlepage'); break; case NS_USER: $text = wfMsg('userpage'); break; case NS_PROJECT: $text = wfMsg('projectpage'); break; case NS_FILE: $text = wfMsg('imagepage'); break; case NS_MEDIAWIKI: $text = wfMsg('mediawikipage'); break; case NS_TEMPLATE: $text = wfMsg('templatepage'); break; case NS_HELP: $text = wfMsg('viewhelppage'); break; case NS_CATEGORY: $text = wfMsg('categorypage'); break; default: $text = wfMsg('articlepage'); } $link = $this->getSkin()->getTitle()->getText(); $nstext = $wgContLang->getNsText($tns); if ($nstext) { # add namespace if necessary $link = $nstext . ':' . $link; } $s .= Linker::link(Title::newFromText($link), $text); } elseif ($this->getSkin()->getTitle()->getNamespace() != NS_SPECIAL) { # we just throw in a "New page" text to tell the user that he's in edit mode, # and to avoid messing with the separator that is prepended to the next item $s .= '<strong>' . wfMsg('newpage') . '</strong>'; } } # "Post a comment" link if (($this->getSkin()->getTitle()->isTalkPage() || $wgOut->showNewSectionLink()) && $action != 'edit' && !$wpPreview) { $s .= '<br />' . $this->getSkin()->link($this->getSkin()->getTitle(), wfMsg('postcomment'), array(), array('action' => 'edit', 'section' => 'new'), array('known', 'noclasses')); } /* watching could cause problems in edit mode: if user edits article, then loads "watch this article" in background and then saves article with "Watch this article" checkbox disabled, the article is transparently unwatched. Therefore we do not show the "Watch this page" link in edit mode */ if ($wgUser->isLoggedIn() && $articleExists) { if ($action != 'edit' && $action != 'submit') { $s .= $sep . $this->watchThisPage(); } if ($this->getSkin()->getTitle()->userCan('edit')) { $s .= $sep . $this->moveThisPage(); } } if ($wgUser->isAllowed('delete') && $articleExists) { $s .= $sep . $this->deleteThisPage() . $sep . $this->protectThisPage(); } $s .= $sep . $this->talkLink(); if ($articleExists && $action != 'history') { $s .= $sep . $this->historyLink(); } $s .= $sep . $this->whatLinksHere(); if ($wgOut->isArticleRelated()) { $s .= $sep . $this->watchPageLinksLink(); } if (NS_USER == $this->getSkin()->getTitle()->getNamespace() || $this->getSkin()->getTitle()->getNamespace() == NS_USER_TALK) { $id = User::idFromName($this->getSkin()->getTitle()->getText()); $ip = User::isIP($this->getSkin()->getTitle()->getText()); if ($id || $ip) { $s .= $sep . $this->userContribsLink(); } if ($this->getSkin()->showEmailUser($id)) { $s .= $sep . $this->emailUserLink(); } } $s .= "\n<br /><hr class='sep' />"; } if (UploadBase::isEnabled() && UploadBase::isAllowed($wgUser) === true) { $s .= $this->getUploadLink() . $sep; } $s .= Linker::specialLink('Specialpages'); global $wgSiteSupportPage; if ($wgSiteSupportPage) { $s .= "\n<br /><a href=\"" . htmlspecialchars($wgSiteSupportPage) . '" class="internal">' . wfMsg('sitesupport') . '</a>'; } $s .= "\n<br /></div>\n"; wfProfileOut(__METHOD__); return $s; }
public function execute() { global $wgUser; global $wgForegroundFeatures; wfSuppressWarnings(); $this->html('headelement'); switch ($wgForegroundFeatures['NavWrapperType']) { case '0': break; case 'divonly': echo "<div id='navwrapper'>"; break; default: echo "<div id='navwrapper' class='" . $wgForegroundFeatures['NavWrapperType'] . "'>"; break; } // Set default variables for footer and switch them if 'showFooterIcons' => true $footerLeftClass = 'small-8 large-centered columns text-center'; $footerRightClass = 'large-12 small-12 columns'; $poweredbyType = "nocopyright"; $poweredbyMakeType = 'withoutImage'; switch ($wgForegroundFeatures['showFooterIcons']) { case true: $footerLeftClass = 'large-8 small-12 columns'; $footerRightClass = 'large-4 small-12 columns'; $poweredbyType = "icononly"; $poweredbyMakeType = 'withImage'; break; default: break; } ?> <!-- START FOREGROUNDTEMPLATE --> <nav class="top-bar"> <ul class="title-area"> <li class="name"> <h1 class="title-name"> <a href="<?php echo $this->data['nav_urls']['mainpage']['href']; ?> "> <?php if ($wgForegroundFeatures['navbarIcon'] != '0') { ?> <img alt="<?php echo $this->text('sitename'); ?> " src="<?php echo $this->text('logopath'); ?> " style="max-width: 64px;height:auto; max-height:36px; display: inline-block; vertical-align:middle;"> <?php } ?> <div class="title-name" style="display: inline-block;"><?php echo $wgForegroundFeatures['wikiName']; ?> </div> </a> </h1> </li> <li class="toggle-topbar menu-icon"> <a href="#"><span><?php echo wfMessage('foreground-menutitle')->text(); ?> </span></a> </li> </ul> <section class="top-bar-section"> <ul id="top-bar-left" class="left"> <li class="divider"></li> <?php foreach ($this->getSidebar() as $boxName => $box) { if ($box['header'] != wfMessage('toolbox')->text()) { ?> <li class="has-dropdown active" id='<?php echo Sanitizer::escapeId($box['id']); ?> '<?php echo Linker::tooltip($box['id']); ?> > <a href="#"><?php echo htmlspecialchars($box['header']); ?> </a> <?php if (is_array($box['content'])) { ?> <ul class="dropdown"> <?php foreach ($box['content'] as $key => $item) { echo $this->makeListItem($key, $item); } ?> </ul> <?php } } ?> <?php } ?> </ul> <ul id="top-bar-right" class="right"> <li class="has-form"> <form action="<?php $this->text('wgScript'); ?> " id="searchform" class="mw-search"> <div class="row"> <div class="small-12 columns"> <?php echo $this->makeSearchInput(array('placeholder' => wfMessage('searchsuggest-search')->text(), 'id' => 'searchInput')); ?> <button type="submit" class="button search"><?php echo wfMessage('search')->text(); ?> </button> </div> </div> </form> </li> <li class="divider show-for-small"></li> <li class="has-form"> <li class="has-dropdown active"><a href="#"><i class="fa fa-cogs"></i></a> <ul id="toolbox-dropdown" class="dropdown"> <?php foreach ($this->getToolbox() as $key => $item) { echo $this->makeListItem($key, $item); } ?> <?php if ($wgForegroundFeatures['showRecentChangesUnderTools']) { ?> <li id="n-recentchanges"><?php echo Linker::specialLink('Recentchanges'); ?> </li><?php } ?> <?php if ($wgForegroundFeatures['showHelpUnderTools']) { ?> <li id="n-help" <?php echo Linker::tooltip('help'); ?> ><a href="/wiki/Help:Contents"><?php echo wfMessage('help')->text(); ?> </a></li><?php } ?> </ul> </li> <?php if ($wgUser->isLoggedIn()) { ?> <li id="personal-tools-dropdown" class="has-dropdown active"><a href="#"><i class="fa fa-user"></i></a> <ul class="dropdown"> <?php foreach ($this->getPersonalTools() as $key => $item) { echo $this->makeListItem($key, $item); } ?> </ul> </li> <?php } else { ?> <li> <?php if (isset($this->data['personal_urls']['anonlogin'])) { ?> <a href="<?php echo $this->data['personal_urls']['anonlogin']['href']; ?> "><?php echo wfMessage('login')->text(); ?> </a> <?php } elseif (isset($this->data['personal_urls']['login'])) { ?> <a href="<?php echo htmlspecialchars($this->data['personal_urls']['login']['href']); ?> "><?php echo wfMessage('login')->text(); ?> </a> <?php } else { ?> <?php echo Linker::link(Title::newFromText('Special:UserLogin'), wfMessage('login')->text()); ?> <?php } ?> </li> <?php } ?> </ul> </section> </nav> <?php if ($wgForegroundFeatures['NavWrapperType'] != '0') { echo "</div>"; } ?> <div id="page-content"> <div class="row"> <div class="large-12 columns"> <!--[if lt IE 9]> <div id="siteNotice" class="sitenotice panel radius"><?php echo $this->text('sitename') . ' ' . wfMessage('foreground-browsermsg')->text(); ?> </div> <![endif]--> <?php if ($this->data['sitenotice']) { ?> <div id="siteNotice" class="sitenotice"><?php $this->html('sitenotice'); ?> </div><?php } ?> <?php if ($this->data['newtalk']) { ?> <div id="usermessage" class="newtalk panel radius"><?php $this->html('newtalk'); ?> </div><?php } ?> </div> </div> <div id="mw-js-message" style="display:none;"></div> <div class="row"> <div id="p-cactions" class="large-12 columns"> <?php if ($wgUser->isLoggedIn() || $wgForegroundFeatures['showActionsForAnon']) { ?> <a href="#" data-dropdown="drop1" class="button dropdown small secondary radius"><i class="fa fa-cog"><span class="show-for-medium-up"> <?php echo wfMessage('actions')->text(); ?> </span></i></a> <ul id="drop1" class="views large-12 columns f-dropdown"> <?php foreach ($this->data['content_actions'] as $key => $item) { echo preg_replace(array('/\\sprimary="1"/', '/\\scontext="[a-z]+"/', '/\\srel="archives"/'), '', $this->makeListItem($key, $item)); } ?> <?php wfRunHooks(SkinTemplateToolboxEnd, array(&$this, true)); ?> </ul> <?php if ($wgUser->isLoggedIn()) { ?> <div id="echo-notifications"></div> <?php } ?> <?php } $namespace = str_replace('_', ' ', $this->getSkin()->getTitle()->getNsText()); $displaytitle = $this->data['title']; if (!empty($namespace)) { $pagetitle = $this->getSkin()->getTitle(); $newtitle = str_replace($namespace . ':', '', $pagetitle); $displaytitle = str_replace($pagetitle, $newtitle, $displaytitle); ?> <h4 class="namespace label"><?php print $namespace; ?> </h4><?php } ?> <h2 class="title"><?php print $displaytitle; ?> </h2> <?php if ($this->data['isarticle']) { ?> <h3 id="tagline"><?php $this->msg('tagline'); ?> </h3><?php } ?> <h5 class="subtitle"><?php $this->html('subtitle'); ?> </h5> <div class="clear_both"></div> <div class="mw-bodytext"> <?php $this->html('bodytext'); ?> <div class="clear_both"></div> </div> <div class="group"><?php $this->html('catlinks'); ?> </div> <?php $this->html('dataAfterContent'); ?> </div> </div> <footer class="row"> <div id="footer"> <?php if ($wgForegroundFeatures['addThisFollowPUBID'] != '') { ?> <div class="social-footer large-12 small-12 columns"> <div class="social-links"> <!-- Go to www.addthis.com/dashboard to customize your tools --> <div class="addthis_horizontal_follow_toolbox"></div> <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=<?php echo $wgForegroundFeatures['addThisFollowPUBID']; ?> "></script> </div> </div> <?php } ?> <div id="footer-left" class="<?php echo $footerLeftClass; ?> "> <ul id="footer-left"> <?php foreach ($this->getFooterLinks("flat") as $key) { ?> <li id="footer-<?php echo $key; ?> "><?php $this->html($key); ?> </li> <?php } ?> </ul> </div> <div id="footer-right-icons" class="<?php echo $footerRightClass; ?> "> <ul id="poweredby"> <?php foreach ($this->getFooterIcons($poweredbyType) as $blockName => $footerIcons) { ?> <li class="<?php echo $blockName; ?> "><?php foreach ($footerIcons as $icon) { ?> <?php echo $this->getSkin()->makeFooterIcon($icon, $poweredbyMakeType); ?> <?php } ?> </li> <?php } ?> </ul> </div> </div> </footer> </div> <?php $this->printTrail(); ?> </body> </html> <?php wfRestoreWarnings(); }
function nameAndLogin() { global $wgUser, $wgLang, $wgContLang; $logoutPage = $wgContLang->specialPage('Userlogout'); $ret = ''; if ($wgUser->isAnon()) { if ($this->getSkin()->showIPinHeader()) { $name = wfGetIP(); $talkLink = Linker::link($wgUser->getTalkPage(), $wgLang->getNsText(NS_TALK)); $ret .= "{$name} ({$talkLink})"; } else { $ret .= wfMsg('notloggedin'); } $returnTo = $this->getSkin()->getTitle()->getPrefixedDBkey(); $query = array(); if ($logoutPage != $returnTo) { $query['returnto'] = $returnTo; } $loginlink = $wgUser->isAllowed('createaccount') ? 'nav-login-createaccount' : 'login'; $ret .= "\n<br />" . Linker::link(SpecialPage::getTitleFor('Userlogin'), wfMsg($loginlink), array(), $query); } else { $returnTo = $this->getSkin()->getTitle()->getPrefixedDBkey(); $talkLink = Linker::link($wgUser->getTalkPage(), $wgLang->getNsText(NS_TALK)); $ret .= Linker::link($wgUser->getUserPage(), htmlspecialchars($wgUser->getName())); $ret .= " ({$talkLink})<br />"; $ret .= $wgLang->pipeList(array(Linker::link(SpecialPage::getTitleFor('Userlogout'), wfMsg('logout'), array(), array('returnto' => $returnTo)), Linker::specialLink('Preferences'))); } $ret = $wgLang->pipeList(array($ret, Linker::link(Title::newFromText(wfMsgForContent('helppage')), wfMsg('help')))); return $ret; }
public function __construct($title, $options = array()) { parent::__construct($title); # Set some form properties $this->setSubmitText(wfMessage('uploadbtn')->text()); $this->setSubmitName('submit'); #TODO: maybe interesting to get type of submission? # Used message keys: 'accesskey-upload', 'tooltip-upload' $this->setSubmitTooltip('upload'); $this->setId('mw-upload-form'); $image_list_link = Linker::specialLink('Listfiles', 'upload_exp_linktext'); $this->addHeaderText(wfMessage('upload_exp', $image_list_link)->text()); $this->addPostText('<br />' . wfMessage('upload_footer', Linker::makeExternalLink(wfMessage('upload_footer_url')->text(), wfMessage('upload_footer_linktext')->text()))->text()); $this->mSubmitCallback = array($this, 'submit'); }
/** * Compute the sidebar * @access private */ private function quickBar() { global $wgOut, $wgTitle, $wgUser, $wgLang, $wgContLang, $wgEnableUploads; $tns = $wgTitle->getNamespace(); $s = '<div id="toolbar">'; $s .= '<div class="toolbartitle">Page editing toolbox</div>'; $s .= '<table border="0" cellpadding="0" cellspacing="4" width="100%"><tr valign="top">'; $sep = "<br/>"; // browse section $section = ""; $browseLinks = reset($this->data['sidebar']); foreach ($browseLinks as $link) { if ($link['text'] != '-') { $section .= "<a href=\"{$link['href']}\">" . htmlspecialchars($link['text']) . '</a>' . $sep; } } $s .= $this->AddToolbarSection("qbbrowse", $section); // page related sections if ($wgOut->isArticle()) { $section = ""; $section .= "<strong>" . $this->editThisPage() . "</strong>"; $section .= $sep . Linker::makeKnownLinkObj(Title::newFromText(wfMsgForContent("edithelppage")), wfMsg("edithelp")); if ($wgUser->isLoggedIn()) { $section .= $sep . $this->moveThisPage(); } if ($wgUser->isAllowed('delete')) { $dtp = $this->deleteThisPage(); if ("" != $dtp) { $section .= $sep . $dtp; } } if ($wgUser->isAllowed('protect')) { $ptp = $this->protectThisPage(); if ("" != $ptp) { $section .= $sep . $ptp; } } $section .= $sep; $s .= $this->AddToolbarSection("qbedit", $section); $section = ""; $section .= $this->talkLink() . $sep . $this->commentLink() . $sep . $this->printableLink(); if ($wgUser->isLoggedIn()) { $section .= $sep . $this->watchThisPage(); } $section .= $sep; $s .= $this->AddToolbarSection("qbpageoptions", $section); $section = ""; $section .= $this->historyLink() . $sep . $this->whatLinksHere() . $sep . $this->watchPageLinksLink(); if ($tns == NS_USER || $tns == NS_USER_TALK) { $id = User::idFromName($wgTitle->getText()); if ($id != 0) { $section .= $sep . $this->userContribsLink(); if ($this->getSkin()->showEmailUser($id)) { $section .= $sep . $this->emailUserLink(); } } } $section .= $sep; $s .= $this->AddToolbarSection("qbpageinfo", $section); } // login/user section $section = ""; if ($wgUser->isLoggedIn()) { $name = $wgUser->getName(); $tl = Linker::makeKnownLinkObj($wgUser->getTalkPage(), wfMsg('mytalk')); if ($wgUser->getNewtalk()) { $tl .= " *"; } $section .= Linker::makeKnownLinkObj($wgUser->getUserPage(), wfMsg("mypage")) . $sep . $tl . $sep . Linker::specialLink("watchlist") . $sep . Linker::makeKnownLinkObj(SpecialPage::getSafeTitleFor("Contributions", $wgUser->getName()), wfMsg("mycontris")) . $sep . Linker::specialLink("preferences") . $sep . Linker::specialLink("userlogout"); } else { $section .= Linker::specialLink("userlogin"); } $s .= $this->AddToolbarSection("qbmyoptions", $section); // special spages section $section = ""; $section .= Linker::specialLink("newpages") . $sep . Linker::specialLink("imagelist") . $sep . Linker::specialLink("statistics"); if ($wgUser->isLoggedIn() && $wgEnableUploads) { $section .= $sep . Linker::specialLink("upload"); } global $wgSiteSupportPage; if ($wgSiteSupportPage) { $section .= $sep . "<a href=\"" . htmlspecialchars($wgSiteSupportPage) . "\" class =\"internal\">" . wfMsg("sitesupport") . "</a>"; } $section .= $sep . Linker::makeKnownLinkObj(SpecialPage::getTitleFor('Specialpages'), wfMsg('moredotdotdot')); $s .= $this->AddToolbarSection("qbspecialpages", $section); $s .= '</tr></table>'; $s .= '</div>'; return $s; }