当前位置: 首页>>代码示例>>PHP>>正文


PHP OutputPage::setPageTitle方法代码示例

本文整理汇总了PHP中OutputPage::setPageTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP OutputPage::setPageTitle方法的具体用法?PHP OutputPage::setPageTitle怎么用?PHP OutputPage::setPageTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OutputPage的用法示例。


在下文中一共展示了OutputPage::setPageTitle方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: showHeader

 /**
  * Set page title and show header for this log type
  * @param $type Array
  */
 public function showHeader($type)
 {
     // If only one log type is used, then show a special message...
     $headerType = count($type) == 1 ? $type[0] : '';
     if (LogPage::isLogType($headerType)) {
         $this->out->setPageTitle(LogPage::logName($headerType));
         $this->out->addHTML(LogPage::logHeader($headerType));
     } else {
         $this->out->addHTML(wfMsgExt('alllogstext', array('parseinline')));
     }
 }
开发者ID:eFFemeer,项目名称:seizamcore,代码行数:15,代码来源:LogEventsList.php

示例2: showHeader

 /**
  * Set page title and show header for this log type
  * @param $type Array
  * @deprecated in 1.19
  */
 public function showHeader($type)
 {
     wfDeprecated(__METHOD__, '1.19');
     // If only one log type is used, then show a special message...
     $headerType = count($type) == 1 ? $type[0] : '';
     if (LogPage::isLogType($headerType)) {
         $page = new LogPage($headerType);
         $this->out->setPageTitle($page->getName()->text());
         $this->out->addHTML($page->getDescription()->parseAsBlock());
     } else {
         $this->out->addHTML(wfMsgExt('alllogstext', array('parseinline')));
     }
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:18,代码来源:LogEventsList.php

示例3: execute

 /**
  * Main execution point
  *
  * @param User $user
  * @param OutputPage $output
  * @param WebRequest $request
  * @param int $mode
  */
 public function execute($user, $output, $request, $mode)
 {
     global $wgUser;
     if (wfReadOnly()) {
         $output->readOnlyPage();
         return;
     }
     switch ($mode) {
         case self::EDIT_CLEAR:
             // The "Clear" link scared people too much.
             // Pass on to the raw editor, from which it's very easy to clear.
         // The "Clear" link scared people too much.
         // Pass on to the raw editor, from which it's very easy to clear.
         case self::EDIT_RAW:
             $output->setPageTitle(wfMsg('watchlistedit-raw-title'));
             if ($request->wasPosted() && $this->checkToken($request, $wgUser)) {
                 $wanted = $this->extractTitles($request->getText('titles'));
                 $current = $this->getWatchlist($user);
                 if (count($wanted) > 0) {
                     $toWatch = array_diff($wanted, $current);
                     $toUnwatch = array_diff($current, $wanted);
                     $this->watchTitles($toWatch, $user);
                     $this->unwatchTitles($toUnwatch, $user);
                     $user->invalidateCache();
                     if (count($toWatch) > 0 || count($toUnwatch) > 0) {
                         $output->addHtml(wfMsgExt('watchlistedit-raw-done', 'parse'));
                     }
                     if (($count = count($toWatch)) > 0) {
                         $output->addHtml(wfMsgExt('watchlistedit-raw-added', 'parse', $count));
                         $this->showTitles($toWatch, $output, $wgUser->getSkin());
                     }
                     if (($count = count($toUnwatch)) > 0) {
                         $output->addHtml(wfMsgExt('watchlistedit-raw-removed', 'parse', $count));
                         $this->showTitles($toUnwatch, $output, $wgUser->getSkin());
                     }
                 } else {
                     $this->clearWatchlist($user);
                     $user->invalidateCache();
                     $output->addHtml(wfMsgExt('watchlistedit-raw-removed', 'parse', count($current)));
                     $this->showTitles($current, $output, $wgUser->getSkin());
                 }
             }
             $this->showRawForm($output, $user);
             break;
         case self::EDIT_NORMAL:
             $output->setPageTitle(wfMsg('watchlistedit-normal-title'));
             if ($request->wasPosted() && $this->checkToken($request, $wgUser)) {
                 $titles = $this->extractTitles($request->getArray('titles'));
                 $this->unwatchTitles($titles, $user);
                 $user->invalidateCache();
                 $output->addHtml(wfMsgExt('watchlistedit-normal-done', 'parse', $GLOBALS['wgLang']->formatNum(count($titles))));
                 $this->showTitles($titles, $output, $wgUser->getSkin());
             }
             $this->showNormalForm($output, $user);
     }
 }
开发者ID:BackupTheBerlios,项目名称:shoutwiki-svn,代码行数:64,代码来源:WatchlistEditor.php

示例4: lyricsH1_onBeforePageDisplay

function lyricsH1_onBeforePageDisplay(OutputPage &$out, Skin &$skin)
{
    global $wgTitle;
    // lyrics pages will only be in the main namespace after the merge
    if ($wgTitle->getNamespace() == NS_MAIN) {
        $origTitle = $out->getPageTitle();
        if (0 == preg_match("/\\([12][0-9]{3}\\)\$/", $origTitle) && 0 < preg_match("/.+:+/", $origTitle)) {
            $out->setPageTitle($origTitle . wfMsg('H1-lyricssuffix'));
            // added as a message so that it can be translated
        }
    }
    return true;
}
开发者ID:Tjorriemorrie,项目名称:app,代码行数:13,代码来源:LyricsH1s.php

示例5: execute

	public function execute( $params ) {
		global $wgOut, $wgUser;
		$this->out = $wgOut;
		$this->user = $wgUser;
		$this->skin = $wgUser->getSkin();

		$this->out->addWikiMsg( 'translate-fs-intro' );
		$step = false;

		$step = $this->showSignup( $step );
		$step = $this->showSettings( $step );
		$step = $this->showUserpage( $step );
		$step = $this->showPermissions( $step );
		$step = $this->showTarget( $step );
		$step = $this->showEmail( $step );

		if ( $step === 'translate-fs-target-title' ) {
			global $wgLang;
			$this->out->redirect( SpecialPage::getTitleFor( 'LanguageStats', $wgLang->getCode() )->getLocalUrl() );
		}

		$this->out->setPageTitle( htmlspecialchars( wfMsg( 'translate-fs-pagetitle', wfMsg( $step ) ) ) );
	}
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:23,代码来源:SpecialFirstSteps.php

示例6: outputInformation

 /**
  * Dispatched from execute();
  */
 private function outputInformation()
 {
     // TODO RBV (14.12.10 09:59): Display information about WebService availability, configuration settings, etc... Could also be used to monitor Webservice and manually empty cache.
     $this->oOutputPage->setPageTitle(wfMessage('bs-universalexport-page-title-without-param')->text());
     $this->oOutputPage->addHtml(wfMessage('bs-universalexport-page-text-without-param')->text());
     $this->oOutputPage->addHtml('<hr />');
     if (empty($this->aModules)) {
         $this->oOutputPage->addHtml(wfMessage('bs-universalexport-page-text-without-param-no-modules-registered')->text());
         return;
     }
     foreach ($this->aModules as $sKey => $oModule) {
         if ($oModule instanceof BsUniversalExportModule) {
             $oModuleOverview = $oModule->getOverview();
             $this->oOutputPage->addHtml($oModuleOverview->execute());
         } else {
             wfDebugLog('BS::UniversalExport', 'SpecialUniversalExport::outputInformation: Invalid view.');
         }
     }
 }
开发者ID:hfroese,项目名称:mediawiki-extensions-BlueSpiceExtensions,代码行数:22,代码来源:SpecialUniversalExport.class.php

示例7: setPageTitle

 /**
  * @param \OutputPage $out
  */
 public function setPageTitle(\OutputPage $out)
 {
     $topic = $this->findTopicTitle();
     $title = $this->workflow->getOwnerTitle();
     $out->setPageTitle($out->msg('flow-topic-first-heading', $title->getPrefixedText()));
     if ($this->permissions->isAllowed($topic, 'view')) {
         if ($this->action === 'undo-edit-topic-summary') {
             $key = 'flow-undo-edit-topic-summary';
         } else {
             $key = 'flow-topic-html-title';
         }
         $out->setHtmlTitle($out->msg($key, array(Message::rawParam($topic->getContent('wikitext')), $title->getPrefixedText())));
     } else {
         $out->setHtmlTitle($title->getPrefixedText());
     }
     $out->setSubtitle('&lt; ' . \Linker::link($title));
 }
开发者ID:TarLocesilion,项目名称:mediawiki-extensions-Flow,代码行数:20,代码来源:TopicSummary.php

示例8: renderFormHeader

 /**
  * Print extra field for 'title'
  *
  * @param OutputPage $wgOut
  */
 public function renderFormHeader($wgOut)
 {
     global $wgRequest;
     $oTmpl = new EasyTemplate(dirname(__FILE__) . "/templates/");
     $oTmpl->set_vars(array("formErrors" => $this->mFormErrors, "formData" => $this->mFormData, "isReload" => $wgRequest->getVal('wpIsReload', 0) == 1, "editIntro" => $wgOut->parse($this->mEditIntro)));
     $wgOut->setPageTitle(wfMsg("createpage"));
     $wgOut->addScriptFile('edit.js');
     if ($this->mPreviewTitle == null) {
         $wgOut->addHTML('<div id="custom_createpagetext">');
         $wgOut->addWikiText(wfMsgForContent('newarticletext'));
         $wgOut->addHTML('</div>');
     }
     $wgOut->addHTML($oTmpl->render("createFormHeader"));
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:19,代码来源:SpecialCreatePage.class.php

示例9: setPageTitle

 /**
  * @param \OutputPage $out
  */
 public function setPageTitle(\OutputPage $out)
 {
     if ($out->getPageTitle()) {
         // Don't override page title if another block has already set it.
         // If this should *really* be done, the specific block extending
         // this AbstractBlock should just implement this itself ;)
         return;
     }
     $out->setPageTitle($this->workflow->getArticleTitle()->getFullText());
 }
开发者ID:TarLocesilion,项目名称:mediawiki-extensions-Flow,代码行数:13,代码来源:Block.php

示例10: execute

 public function execute($par)
 {
     global $wgRequest;
     $this->out->setPageTitle(htmlspecialchars(wfMsg('translate-managegroups')));
     $group = $wgRequest->getText('group');
     $group = MessageGroups::getGroup($group);
     if (!$group instanceof FileBasedMessageGroup) {
         $group = null;
     }
     if ($group) {
         if ($wgRequest->getBool('rebuildall', false) && $wgRequest->wasPosted() && $this->user->isAllowed('translate-manage') && $this->user->matchEditToken($wgRequest->getVal('token'))) {
             $languages = explode(',', $wgRequest->getText('codes'));
             foreach ($languages as $code) {
                 $cache = new MessageGroupCache($group, $code);
                 $cache->create();
             }
         }
         $code = $wgRequest->getText('language', 'en');
         // Go to English for undefined codes.
         $codes = array_keys(Language::getLanguageNames(false));
         if (!in_array($code, $codes)) {
             $code = 'en';
         }
         if ($wgRequest->getVal('from') !== 'main') {
             $this->importForm($group, $code);
             return;
         }
     }
     // Main list
     global $wgLang, $wgOut;
     $groups = MessageGroups::singleton()->getGroups();
     TranslateUtils::addSpecialHelpLink($wgOut, 'Help:Extension:Translate/Group_management');
     $wgOut->wrapWikiMsg('<h2>$1</h2>', 'translate-manage-listgroups');
     $separator = wfMsg('word-separator');
     $languages = array_keys(Language::getLanguageNames(false));
     foreach ($groups as $group) {
         if (!$group instanceof FileBasedMessageGroup) {
             continue;
         }
         wfDebug(__METHOD__ . ": {$group->getId()}\n");
         $id = $group->getId();
         $link = $this->skin->link($this->getTitle(), $group->getLabel(), array('id' => "mw-group-{$id}"), array('group' => $id));
         $out = $link . $separator;
         $cache = new MessageGroupCache($group);
         if ($cache->exists()) {
             $timestamp = wfTimestamp(TS_MW, $cache->getTimestamp());
             $out .= wfMsg('translate-manage-cacheat', $wgLang->date($timestamp), $wgLang->time($timestamp));
             $modified = array();
             foreach ($languages as $code) {
                 $cache = new MessageGroupCache($group, $code);
                 if (!$cache->isValid()) {
                     $modified[] = $code;
                 }
             }
             if (count($modified)) {
                 $out = '[' . implode(",", $modified) . '] ' . $out;
                 if (!in_array('en', $modified) && $this->user->isAllowed('translate-manage')) {
                     $out .= $this->rebuildButton($group, $modified, 'main');
                 }
             } else {
                 // @todo FIXME: should be in CSS file.
                 $out = Html::rawElement('span', array('style' => 'color:grey'), $out);
             }
         } else {
             $out .= wfMsg('translate-manage-newgroup');
         }
         $wgOut->addHtml($out);
         $wgOut->addHtml('<hr>');
     }
     $wgOut->wrapWikiMsg('<h2>$1</h2>', 'translate-manage-listgroups-old');
     $wgOut->addHTML('<ul>');
     foreach ($groups as $group) {
         if ($group instanceof FileBasedMessageGroup) {
             continue;
         }
         $wgOut->addHtml(Xml::element('li', null, $group->getLabel()));
     }
     $wgOut->addHTML('</ul>');
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:79,代码来源:SpecialManageGroups.php


注:本文中的OutputPage::setPageTitle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。