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


PHP OutputPage::addModules方法代码示例

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


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

示例1: beforePageDisplay

 /**
  * BeforePageDisplay hook
  * 
  * Adds the modules to the page
  * 
  * @param OutputPage $out output page
  * @param Skin $skin current skin
  */
 public static function beforePageDisplay($out, $skin)
 {
     if ($skin instanceof SkinSkinzam) {
         $out->addModules(array('jquery.scrollto', 'jquery.backstretch', 'ext.skinzam.global', 'ext.languageSelector'));
         // Add modules for enabled features
         foreach (self::$features as $name => $feature) {
             if (isset($feature['modules']) && self::isEnabled($name)) {
                 $out->addModules($feature['modules']);
             }
         }
     }
     return true;
 }
开发者ID:eFFemeer,项目名称:seizamcore,代码行数:21,代码来源:Skinzam.hooks.php

示例2: onBeforePageDisplay

 /**
  * BeforePageDisplay hook
  *
  * Add the modules to the page
  *
  * @param $out OutputPage output page
  * @param $skin Skin current skin
  *
  * @return true
  */
 public static function onBeforePageDisplay(OutputPage $out, $skin)
 {
     //Add modules:
     $out->addModuleStyles('ext.wr.ShareBar');
     $out->addModules('ext.wr.ShareBar.js');
     return true;
 }
开发者ID:kolzchut,项目名称:mediawiki-extensions-ShareBar,代码行数:17,代码来源:ShareBar.hooks.php

示例3: onBeforePageDisplay

 public static function onBeforePageDisplay(\OutputPage &$output, \Skin &$skin)
 {
     $title = $output->getTitle();
     // Disallow commenting on pages without article id
     if ($title->getArticleID() == 0) {
         return true;
     }
     if ($title->isSpecialPage()) {
         return true;
     }
     // These could be explicitly allowed in later version
     if (!$title->canTalk()) {
         return true;
     }
     if ($title->isTalkPage()) {
         return true;
     }
     if ($title->isMainPage()) {
         return true;
     }
     // Do not display when printing
     if ($output->isPrintable()) {
         return true;
     }
     // Disable if not viewing
     if ($skin->getRequest()->getVal('action', 'view') != 'view') {
         return true;
     }
     // Blacklist several namespace
     if (in_array($title->getNamespace(), array(NS_MEDIAWIKI, NS_TEMPLATE, NS_CATEGORY, NS_FILE, NS_USER))) {
         return true;
     }
     $output->addModules('ext.pagerating');
     return true;
 }
开发者ID:nbdd0121,项目名称:MW-PageRating,代码行数:35,代码来源:Hooks.php

示例4: onOutputPageBeforeHTML

 public static function onOutputPageBeforeHTML(OutputPage &$out, &$text)
 {
     global $wgEnableRecommendationsExt;
     if (!empty($wgEnableRecommendationsExt) && F::app()->checkSkin('venus')) {
         $out->addModules('ext.wikia.recommendations');
     }
     return true;
 }
开发者ID:yusufchang,项目名称:app,代码行数:8,代码来源:RecommendationsHooks.class.php

示例5: onBeforePageDisplay

 /**
  *
  * @param OutputPage $oOutputPage
  * @param SkinTemplate $oSkinTemplate
  * @return boolean
  */
 public function onBeforePageDisplay($oOutputPage, $oSkinTemplate)
 {
     if (!SpecialPage::getTitleFor('RSSFeeder')->equals($this->getTitle())) {
         return true;
     }
     $oOutputPage->addModules('ext.bluespice.rssStandards');
     return true;
 }
开发者ID:hfroese,项目名称:mediawiki-extensions-BlueSpiceExtensions,代码行数:14,代码来源:RSSStandards.class.php

示例6: onBeforePageDisplay

 /**
  * BeforePageDisplay hook
  * Adds the modules to the page
  *
  * @param $out OutputPage output page
  * @param $skin Skin current skin
  *
  * @return bool
  */
 public static function onBeforePageDisplay(OutputPage &$out, Skin &$skin)
 {
     global $wgSurveyGizmoBeaconID, $wgSurveyGizmoBeaconUrl;
     if (!empty($wgSurveyGizmoBeaconID) && !empty($wgSurveyGizmoBeaconUrl)) {
         $out->addModules('ext.surveyGizmo');
     }
     return true;
 }
开发者ID:kolzchut,项目名称:mediawiki-extensions-SurveyGizmo,代码行数:17,代码来源:SurveyGizmo.hooks.php

示例7: onBeforePageDisplay

 /**
  * Hook-Handler for MediaWiki 'BeforePageDisplay' hook. Sets context if needed.
  * @param OutputPage $oOutputPage
  * @param Skin $oSkin
  * @return bool
  */
 public function onBeforePageDisplay(&$oOutputPage, &$oSkin)
 {
     if (BsConfig::get('MW::BlueSpiceProjectFeedbackHelper::Active') == false) {
         return true;
     }
     $oOutputPage->addModules('ext.bluespice.blueSpiceprojectfeedbackhelper');
     return true;
 }
开发者ID:hfroese,项目名称:mediawiki-extensions-BlueSpiceExtensions,代码行数:14,代码来源:BlueSpiceProjectFeedbackHelper.class.php

示例8: onBeforePageDisplay

 /**
  * Add JS module to the output
  * @param \OutputPage $out An output object passed from a hook
  * @return bool
  */
 public static function onBeforePageDisplay(\OutputPage $out)
 {
     // use resource loader for i18n messages in JS
     $out->addModules('ext.cookiePolicyMessages');
     // use AssetsManager for script loading to avoid race conditions (SOC-528)
     \Wikia::addAssetsToOutput('cookie_policy_js');
     return true;
 }
开发者ID:yusufchang,项目名称:app,代码行数:13,代码来源:CookiePolicy.hooks.php

示例9: onBeforePageDisplay

 /**
  * Adds module
  * @param OutputPage $out
  * @param SkinTemplate $skin
  * @return boolean
  */
 public static function onBeforePageDisplay(&$out, &$skin)
 {
     if (!$out->getTitle()->equals($out->getUser()->getUserPage())) {
         return true;
     }
     $out->addModules("ext.bluespice.avatars.js");
     return true;
 }
开发者ID:hfroese,项目名称:mediawiki-extensions-BlueSpiceExtensions,代码行数:14,代码来源:Avatars.class.php

示例10: onBeforePageDisplay

 /**
  * Hook-Handler for MediaWiki 'BeforePageDisplay' hook. Sets context if needed.
  * @param OutputPage $oOutputPage
  * @param Skin $oSkin
  * @return bool
  */
 public function onBeforePageDisplay(&$oOutputPage, &$oSkin)
 {
     if (!SpecialPage::getTitleFor('Preferences')->equals($oOutputPage->getTitle())) {
         return true;
     }
     $oOutputPage->addModules('ext.bluespice.userpreferences');
     return true;
 }
开发者ID:hfroese,项目名称:mediawiki-extensions-BlueSpiceExtensions,代码行数:14,代码来源:UserPreferences.class.php

示例11: initPage

 public function initPage(OutputPage $out)
 {
     global $wgLocalStylePath;
     $this->skinname = 'cbptranscription';
     $this->stylename = 'CbpTranscription';
     $this->template = 'CbpTranscriptionTemplate';
     $out->addModules('skins.cbptranscription');
     parent::initPage($out);
 }
开发者ID:tomcbe,项目名称:cbp-transcription-desk,代码行数:9,代码来源:CbpTranscription.php

示例12: hookOutputPageBeforeHTML

function hookOutputPageBeforeHTML(OutputPage &$out, &$text)
{
    if ($out->getTitle()->getNamespace() == 6) {
        //6 is the File Namespace
        $out->includeJQuery();
        $out->addModules('ext.SemanticImageAnnotator');
    }
    return true;
}
开发者ID:whysasse,项目名称:kmwiki,代码行数:9,代码来源:SemanticImageAnnotator.php

示例13: onBeforePageDisplay

 /**
  * Add welcome module to the load queue of all pages
  */
 public static function onBeforePageDisplay(OutputPage &$out, Skin &$skin)
 {
     global $wgExampleEnableWelcome;
     if ($wgExampleEnableWelcome) {
         $out->addModules('ext.Example.welcome.init');
     }
     // Always return true, indicating that parser initialization should
     // continue normally.
     return true;
 }
开发者ID:coderwassananmol,项目名称:mediawiki-extensions-examples,代码行数:13,代码来源:Example.hooks.php

示例14: onBeforePageDisplay

 /**
  * Adds VisualEditor JS to the output.
  *
  * This is attached to the MediaWiki 'BeforePageDisplay' hook.
  *
  * @param OutputPage $output
  * @param Skin $skin
  * @return boolean
  */
 public static function onBeforePageDisplay(OutputPage &$output, Skin &$skin)
 {
     // Wikia change
     if (self::isAvailable($skin)) {
         $output->addModules(array('ext.visualEditor.wikia.viewPageTarget.init'));
     }
     //$output->addModules( array( 'ext.visualEditor.viewPageTarget.init' ) );
     //$output->addModuleStyles( array( 'ext.visualEditor.viewPageTarget.noscript' ) );
     return true;
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:19,代码来源:VisualEditor.hooks.php

示例15: onBeforePageDisplay

 /**
  * This function adds additional modules containing CSS before the page is displayed
  */
 public function onBeforePageDisplay(OutputPage &$out, Skin &$ski)
 {
     $title_object = $out->getTitle();
     $page_title = $title_object->getPrefixedURL();
     if ($page_title === 'Special:UserPage' || $page_title === 'Special:AllCollections' || $page_title === 'Special:SingleManuscriptPages' || $page_title === 'Special:AllCollations' || $page_title === 'Special:RecentManuscriptPages' || $page_title === 'Special:AllStylometricAnalysis') {
         $out->addModuleStyles(array('ext.userpagecss', 'ext.manuscriptdeskbasecss'));
         $out->addModules("ext.javascriptloaderdots");
     }
     return true;
 }
开发者ID:akvankorlaar,项目名称:manuscriptdesk,代码行数:13,代码来源:SummaryPages.hooks.php


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