本文整理汇总了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');
}
示例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');
}
示例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');
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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');
}
示例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;
}
示例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;
}
示例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;
}
示例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');
}
示例14: setupSkinUserCss
function setupSkinUserCss(OutputPage $out)
{
$out->addStyle('simple/main.css', 'screen');
$out->addStyle('simple/rtl.css', '', '', 'rtl');
}
示例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;
}