本文整理汇总了PHP中SkinTemplate类的典型用法代码示例。如果您正苦于以下问题:PHP SkinTemplate类的具体用法?PHP SkinTemplate怎么用?PHP SkinTemplate使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SkinTemplate类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: addMarkButton
public static function addMarkButton(SkinTemplate &$sktemplate, array &$links)
{
$title = $sktemplate->getRelevantTitle();
$user = $sktemplate->getUser();
if ($user->isAllowedAll('changetags', 'markmajorchange')) {
$urlParams = array('action' => 'markmajorchange');
$links['actions']['markmajorchange'] = array('text' => $sktemplate->msg('markmajorchanges-mark-btn')->text(), 'href' => $title->getLocalURL($urlParams));
}
}
开发者ID:kolzchut,项目名称:mediawiki-extensions-MarkMajorChanges,代码行数:9,代码来源:MarkMajorChanges.hooks.php
示例2: todoAddTab
/**
* Add a 'todo' tab on user pages
* @param SkinTemplate $skin
* @param array $actions
* @return bool true to continue running hooks, false to abort operation
*/
function todoAddTab( $skin, &$actions ) {
if ( $skin->getTitle()->getNamespace() == NS_USER || $skin->getTitle()->getNamespace() == NS_USER_TALK ) {
$title = SpecialPage::getTitleFor( 'Todo', $skin->getTitle()->getText() );
$actions['todo'] = array(
'text' => wfMsg( 'todo-tab' ),
'href' => $title->getLocalUrl() );
}
return true;
}
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:15,代码来源:Todo.php
示例3: onSkinTemplateNavigation
public static function onSkinTemplateNavigation(SkinTemplate &$sktemplate, array &$links)
{
global $wgTitle, $articleProtectionNS, $wgOut;
if (!in_array($wgTitle->getNamespace(), $articleProtectionNS)) {
return true;
}
$article_details = $sktemplate->makeArticleUrlDetails(Title::newFromText('Special:ArticleProtection/' . $wgTitle->getFullText())->getFullText());
$links['views']['protection'] = array('class' => false, 'text' => "View editors", 'href' => $article_details['href']);
return true;
}
开发者ID:nathancarter,项目名称:ArticleProtection,代码行数:10,代码来源:ArticleProtection.hooks.php
示例4: onSkinTemplateBuildNavUrlsNav_urlsAfterPermalink
/**
* @param SkinTemplate $skintemplate
* @param $nav_urls
* @param $oldid
* @param $revid
* @return bool
*/
public static function onSkinTemplateBuildNavUrlsNav_urlsAfterPermalink(&$skintemplate, &$nav_urls, &$oldid, &$revid)
{
// check whether we’re in the right namespace, the $revid has the correct type and is not empty
// (which would mean that the current page doesn’t exist)
$title = $skintemplate->getTitle();
if ($title->isContentPage() && $revid !== 0 && !empty($revid)) {
$nav_urls['citeThisPage'] = array('args' => array('page' => $title->getPrefixedDBkey(), 'id' => $revid));
}
return true;
}
开发者ID:MediaWiki-stable,项目名称:1.26.1,代码行数:17,代码来源:CiteThisPage.hooks.php
示例5: initPage
/** Using Bootstrap */
function initPage(&$out)
{
SkinTemplate::initPage($out);
$this->skinname = 'bootstrap';
$this->stylename = 'bootstrap';
$this->template = 'BootstrapTemplate';
}
开发者ID:nzhenev,项目名称:Bootstrap-Skin,代码行数:8,代码来源:Bootstrap.php
示例6: initPage
/** Using RoundedBlue. */
function initPage(&$out)
{
SkinTemplate::initPage($out);
$this->skinname = 'RoundedBlue';
$this->stylename = 'RoundedBlue';
$this->template = 'RoundedBlueTemplate';
}
开发者ID:hnJaermuseet,项目名称:JM-booking,代码行数:8,代码来源:RoundedBlue.php
示例7: initPage
/** Using monobook. */
function initPage(&$out)
{
SkinTemplate::initPage($out);
$this->skinname = 'wolfbane';
$this->stylename = 'wolfbane';
$this->template = 'wolfbane';
}
开发者ID:BackupTheBerlios,项目名称:shoutwiki-svn,代码行数:8,代码来源:wolfbane.php
示例8: initPage
/** Using monoproject. */
function initPage(&$out)
{
SkinTemplate::initPage($out);
$this->skinname = 'Mono2';
$this->stylename = 'Mono2';
$this->template = 'Mono2Template';
}
开发者ID:akoeplinger,项目名称:release,代码行数:8,代码来源:Mono2.php
示例9: initPage
function initPage(&$out)
{
SkinTemplate::initPage($out);
$this->skinname = 'agp';
$this->stylename = 'agp';
$this->template = 'AGPTemplate';
}
开发者ID:saper,项目名称:organic-extensions,代码行数:7,代码来源:AGP.php
示例10: initPage
/** Using GuMax */
function initPage(&$out)
{
SkinTemplate::initPage($out);
$this->skinname = 'gumax';
$this->stylename = 'gumax';
$this->template = 'GuMaxTemplate';
}
开发者ID:Jobava,项目名称:diacritice-meta-repo,代码行数:8,代码来源:GuMax.php
示例11: initPage
/** Using gforge. */
function initPage(&$out)
{
SkinTemplate::initPage($out);
$this->skinname = 'gforge';
$this->stylename = 'gforge';
$this->template = 'GForgeTemplate';
}
开发者ID:neymanna,项目名称:fusionforge,代码行数:8,代码来源:GForge.php
示例12: initPage
/** Using cavendish. */
function initPage(&$out)
{
SkinTemplate::initPage($out);
$this->skinname = 'cavendish';
$this->stylename = 'cavendish';
$this->template = 'cavendishTemplate';
}
开发者ID:platform-project,项目名称:platform-project,代码行数:8,代码来源:cavendish.php
示例13: initPage
function initPage(OutputPage $out)
{
SkinTemplate::initPage($out);
$this->skinname = 'simple';
$this->stylename = 'simple';
$this->template = 'MonoBookTemplate';
}
开发者ID:amjadtbssm,项目名称:website,代码行数:7,代码来源:Simple.php
示例14: initPage
/**
* @author Inez Korczynski <[email protected]>
*/
public function initPage(&$out) {
wfDebugLog('lyricsminimal', '##### SkinLyricsMinimal initPage #####');
wfProfileIn(__METHOD__);
global $wgHooks, $wgCityId, $wgCat;
SkinTemplate::initPage($out);
$this->skinname = 'lyricsminimal';
$this->stylename = 'lyricsminimal';
$this->template = 'LyricsMinimalTemplate';
// Get category information (id, name, url)
$cats = wfGetBreadCrumb();
$idx = count($cats)-2;
if(isset($cats[$idx])) {
$wgCat = $cats[$idx];
wfDebugLog('lyricsminimal', 'There is category info');
} else {
$wgCat = array('id' => -1);
wfDebugLog('lyricsminimal', 'No category info');
}
// Function addVariables will be called to populate all needed data to render skin
$wgHooks['SkinTemplateOutputPageBeforeExec'][] = array(&$this, 'addVariables');
wfProfileOut(__METHOD__);
}
开发者ID:schwarer2006,项目名称:wikia,代码行数:32,代码来源:LyricsMinimal.php
示例15: initPage
function initPage(OutputPage $out)
{
parent::initPage($out);
$this->skinname = 'modern';
$this->stylename = 'modern';
$this->template = 'ModernTemplate';
}
开发者ID:amjadtbssm,项目名称:website,代码行数:7,代码来源:Modern.php
示例16: setupSkinUserCss
function setupSkinUserCss(OutputPage $out)
{
global $wgHandheldStyle;
parent::setupSkinUserCss($out);
// Append to the default screen common & print styles...
$out->addStyle('cavendishmw/main.css', 'screen');
}
开发者ID:AmeBel,项目名称:opencog.org,代码行数:7,代码来源:CavendishMW.php
示例17: setupSkinUserCss
/**
* Loads skin and user CSS files.
* @param OutputPage $out
*/
function setupSkinUserCss(OutputPage $out)
{
parent::setupSkinUserCss($out);
$styles = array('mediawiki.skinning.interface', 'skins.vector.styles');
Hooks::run('SkinVectorStyleModules', array($this, &$styles));
$out->addModuleStyles($styles);
}
开发者ID:MediaWiki-stable,项目名称:1.26.1,代码行数:11,代码来源:SkinVector.php
示例18: setupSkinUserCss
/**
* Loads skin and user CSS files.
* @param OutputPage $out
*/
function setupSkinUserCss(OutputPage $out)
{
parent::setupSkinUserCss($out);
$styles = array('mediawiki.skinning.interface', 'skins.mediawikibootstrap');
wfRunHooks('SkinMediawikibootstrapStyleModules', array($this, &$styles));
$out->addModuleStyles($styles);
}
开发者ID:Azany,项目名称:mediawiki-bootstrap,代码行数:11,代码来源:MediaWikiBootstrap.skin.php
示例19: setupSkinUserCss
function setupSkinUserCss(OutputPage $out)
{
global $wgLocalStylePath;
parent::setupSkinUserCss($out);
$out->addStyle('scratchwikiskin/main.css', 'screen');
$out->addHeadItem('skinscript', "<script type='text/javascript' src='{$wgLocalStylePath}/scratchwikiskin/skin.js'></script>");
}
开发者ID:pluzsu,项目名称:scratchwikiskin,代码行数:7,代码来源:ScratchWikiSkin.php
示例20: setupSkinUserCss
function setupSkinUserCss(OutputPage $out)
{
parent::setupSkinUserCss($out);
$out->addHeadItem('font-awesome', '<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css" />');
$out->addHeadItem('google-ads', '<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>');
$out->addModuleStyles(array('skins.liberty.styles'));
}
开发者ID:librewiki,项目名称:liberty-skin,代码行数:7,代码来源:SkinLiberty.php
注:本文中的SkinTemplate类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论