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


PHP OutputPage::addStyle方法代码示例

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


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

示例1: setupSkinUserCss

 function setupSkinUserCss(OutputPage $out)
 {
     $out->addStyle('common/shared.css', 'screen');
     $out->addStyle('CbpTranscription/main.css', 'screen');
     $out->addStyle('CbpTranscription/print.css', 'print');
     $out->addStyle('CbpTranscription/rtl.css', 'screen', '', 'rtl');
 }
开发者ID:tomcbe,项目名称:cbp-transcription-desk,代码行数:7,代码来源:CbpTranscription.php

示例2: setupSkinUserCss

 function setupSkinUserCss(OutputPage $out)
 {
     global $wgStyleVersion, $wgJsMimeType, $wgStylePath;
     // Do not call parent::setupSkinUserCss(), we have our own print style
     $out->addStyle('common/shared.css', 'screen');
     $out->addStyle('modern/main.css', 'screen');
     $out->addStyle('modern/print.css', 'print');
     $out->addStyle('modern/rtl.css', 'screen', '', 'rtl');
 }
开发者ID:rocLv,项目名称:conference,代码行数:9,代码来源:Modern.php

示例3: setupSkinUserCss

 function setupSkinUserCss(OutputPage $out)
 {
     global $wgScriptPath;
     $path = "{$wgScriptPath}/extensions/skins/Daddio";
     // Do not call parent::setupSkinUserCss(), we have our own print style
     $out->addStyle('common/shared.css', 'screen');
     $out->addStyle("{$path}/daddio/main.css", 'screen');
     $out->addStyle("{$path}/daddio/print.css", 'print');
     $out->addStyle("{$path}/daddio/rtl.css", 'screen', '', 'rtl');
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:10,代码来源:Daddio.class.php

示例4: setupSkinUserCss

 /**
  *
  */
 function setupSkinUserCss(OutputPage $out)
 {
     if (3 == $this->qbSetting()) {
         # Floating left
         $out->addStyle('common/quickbar.css');
     } elseif (4 == $this->qbSetting()) {
         # Floating right
         $out->addStyle('common/quickbar-right.css');
     }
     parent::setupSkinUserCss($out);
 }
开发者ID:rocLv,项目名称:conference,代码行数:14,代码来源:Standard.php

示例5: onBeforePageDisplay

 /**
  * Add JS and CSS to File Page (except mobile skin - see onWikiaMobileAssetsPackages)
  *
  * @param OutputPage $out
  * @param $skin
  * @return bool
  */
 public static function onBeforePageDisplay(OutputPage $out, $skin)
 {
     global $wgEnableVideoPageRedesign;
     $app = F::app();
     wfProfileIn(__METHOD__);
     if ($app->wg->Title->getNamespace() == NS_FILE) {
         $assetsManager = AssetsManager::getInstance();
         $wikiaFilePageJs = 'wikia_file_page_js';
         foreach ($assetsManager->getURL($wikiaFilePageJs) as $url) {
             $out->addScript("<script src=\"{$url}\"></script>");
         }
         // load assets when File Page redesign is enabled
         if ($app->checkSkin('oasis') && !empty($wgEnableVideoPageRedesign)) {
             $filePageTabbedCss = 'file_page_tabbed_css';
             $filePageTabbedJs = 'file_page_tabbed_js';
             foreach ($assetsManager->getURL($filePageTabbedCss) as $url) {
                 $out->addStyle($url);
             }
             foreach ($assetsManager->getURL($filePageTabbedJs) as $url) {
                 $out->addScript("<script src=\"{$url}\"></script>");
             }
         }
     }
     wfProfileOut(__METHOD__);
     return true;
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:33,代码来源:FilePageHooks.class.php

示例6: onBeforePageDisplay

 public function onBeforePageDisplay(OutputPage $out, $skin)
 {
     global $wgExtensionsPath;
     wfProfileIn(__METHOD__);
     $out->addScript('<script src="' . $wgExtensionsPath . '/wikia/ScavengerHunt/js/scavenger-game.js"></script>');
     $out->addScript('<script src="' . $wgExtensionsPath . '/wikia/ScavengerHunt/js/sprite.js"></script>');
     $out->addStyle(AssetsManager::getInstance()->getSassCommonURL('extensions/wikia/ScavengerHunt/css/scavenger-game.scss'));
     wfProfileOut(__METHOD__);
     return true;
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:10,代码来源:ScavengerHunt.class.php

示例7: onBeforePageDisplay

 /**
  * Add welcome module to the load queue of all pages
  */
 public static function onBeforePageDisplay(OutputPage &$out, Skin &$skin)
 {
     global $wgExampleEnableWelcome;
     if ($wgExampleEnableWelcome) {
         $src = $dir . '/css/tempostyles.css';
         $out->addStyle($src);
     }
     // Always return true, indicating that parser initialization should
     // continue normally.
     return true;
 }
开发者ID:Jerimee,项目名称:keeptempo-mwiki-ext,代码行数:14,代码来源:tempotwo.hooks.php

示例8: onBeforePageDisplay

 /**
  * @param OutputPage $out
  * @param $skin
  * @return bool
  */
 public static function onBeforePageDisplay($out, $skin)
 {
     wfProfileIn(__METHOD__);
     if (F::app()->checkSkin('monobook', $skin)) {
         // not used on mobileskin
         // part of oasis skin so not needed there
         $out->addStyle(AssetsManager::getInstance()->getSassCommonURL('skins/oasis/css/core/thumbnails.scss'));
     }
     wfProfileOut(__METHOD__);
     return true;
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:16,代码来源:ThumbnailHooks.class.php

示例9: setupSkinUserCss

 /**
  * @param $out OutputPage
  */
 function setupSkinUserCss(OutputPage $out)
 {
     /* add Tuleap styles */
     foreach ($GLOBALS['HTML']->getAllStyleSheets() as $sheet) {
         $out->addStyle($sheet['css'], $sheet['media']);
     }
     parent::setupSkinUserCss($out);
     $out->addModuleStyles(array('mediawiki.skinning.interface', 'skins.monobook.styles'));
     // TODO: Migrate all of these
     $out->addStyle('Tuleap123/main.css', 'screen');
     $out->addStyle('Tuleap123/TuleapSkin.css', 'screen');
     $out->addStyle('Tuleap123/IE60Fixes.css', 'screen', 'IE 6');
     $out->addStyle('Tuleap123/IE70Fixes.css', 'screen', 'IE 7');
 }
开发者ID:uniteddiversity,项目名称:tuleap,代码行数:17,代码来源:Tuleap123.php

示例10: onBeforePageDisplay

 /**
  * @param OutputPage $oOut
  * @param Skin $oSkin
  * @return boolean
  */
 public function onBeforePageDisplay(&$oOut, &$oSkin)
 {
     $oTitle = $oSkin->getTitle();
     $aNamespaces = MWNamespace::getCanonicalNamespaces();
     $iCurrentNs = $oTitle->getNamespace();
     if ($oTitle->isTalkPage()) {
         $iCurrentNs--;
     }
     if (!isset($aNamespaces[$iCurrentNs])) {
         return true;
     }
     $oStyleSheetTitle = Title::newFromText($aNamespaces[$iCurrentNs] . '_css', NS_MEDIAWIKI);
     if ($oStyleSheetTitle->exists()) {
         $oOut->addStyle($oStyleSheetTitle->getLocalUrl(array('action' => 'raw', 'ctype' => 'text/css')));
     }
     return true;
 }
开发者ID:hfroese,项目名称:mediawiki-extensions-BlueSpiceExtensions,代码行数:22,代码来源:NamespaceCss.class.php

示例11: onBeforePageDisplay

 public function onBeforePageDisplay(OutputPage $out, $skin)
 {
     wfProfileIn(__METHOD__);
     // don't load it on edit pages (perf improvement)
     if (F::app()->checkSkin('oasis', $skin) && !BodyController::isEditPage()) {
         $assetsManager = F::build('AssetsManager', array(), 'getInstance');
         $scssPackage = 'relatedvideos_scss';
         $jsPackage = 'relatedvideos_js';
         foreach ($assetsManager->getURL($scssPackage) as $url) {
             $out->addStyle($url);
         }
         foreach ($assetsManager->getURL($jsPackage) as $url) {
             $out->addScript("<script src=\"{$url}\"></script>");
         }
     }
     wfProfileOut(__METHOD__);
     return true;
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:18,代码来源:RelatedVideos.hooks.php

示例12: onBeforePageDisplay

 public static function onBeforePageDisplay(OutputPage $out, Skin $sk)
 {
     wfProfileIn(__METHOD__);
     $title = $out->getTitle();
     if ($title instanceof Title && $title->isContentPage()) {
         $storage = PlaceStorage::newFromTitle($out->getTitle());
         $model = $storage->getModel();
         /* @var $model PlaceModel */
         if ($model instanceof PlaceModel && !$model->isEmpty()) {
             $out->addMeta('geo.position', implode(',', $model->getLatLon()));
         }
     }
     if ($title instanceof Title && $title->getNamespace() == NS_CATEGORY) {
         $out->addScript('<script src="' . F::app()->wg->extensionsPath . '/wikia/Places/js/GeoEnableButton.js"></script>');
         $out->addStyle(AssetsManager::getInstance()->getSassCommonURL('extensions/wikia/Places/css/GeoEnableButton.scss'));
     }
     wfProfileOut(__METHOD__);
     return true;
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:19,代码来源:PlacesHooks.class.php

示例13: setupSkinUserCss

 /**
  * @param $out OutputPage
  */
 function setupSkinUserCss(OutputPage $out)
 {
     global $wgHandheldStyle;
     /* add Tuleap styles */
     foreach ($GLOBALS['HTML']->getAllStyleSheets() as $sheet) {
         $out->addStyle($sheet['css'], $sheet['media']);
     }
     parent::setupSkinUserCss($out);
     $out->addModuleStyles('skins.monobook');
     // Ugh. Can't do this properly because $wgHandheldStyle may be a URL
     if ($wgHandheldStyle) {
         // Currently in testing... try 'chick/main.css'
         $out->addStyle($wgHandheldStyle, 'handheld');
     }
     // TODO: Migrate all of these
     $out->addStyle('Tuleap/main.css', 'screen');
     $out->addStyle('Tuleap/TuleapSkin.css', 'screen');
     $out->addStyle('Tuleap/IE60Fixes.css', 'screen', 'IE 6');
     $out->addStyle('Tuleap/IE70Fixes.css', 'screen', 'IE 7');
 }
开发者ID:uniteddiversity,项目名称:tuleap,代码行数:23,代码来源:Tuleap.php

示例14: setupSkinUserCss

 function setupSkinUserCss(OutputPage $out)
 {
     $out->addStyle('simple/main.css', 'screen');
     $out->addStyle('simple/rtl.css', '', '', 'rtl');
 }
开发者ID:amjadtbssm,项目名称:website,代码行数:5,代码来源:Simple.php

示例15: onBeforePageDisplay

 /**
  * @param OutputPage $out
  * @param $skin
  * @return bool
  */
 public function onBeforePageDisplay($out, $skin)
 {
     wfProfileIn(__METHOD__);
     if ($this->app->checkSkin('monobook', $skin)) {
         // not used on mobileskin
         // part of oasis skin so not needed there
         $out->addStyle(AssetsManager::getInstance()->getSassCommonURL('extensions/wikia/VideoHandlers/css/VideoHandlers.scss'));
     }
     wfProfileOut(__METHOD__);
     return true;
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:16,代码来源:VideoHandlerHooks.class.php


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