Difference between revisions of "Replacing sidebar content"
(New page: <?php /**{{php}}{{Category:Examples}} ...) |
(html comment colouring not working, change to php) |
||
Line 165: | Line 165: | ||
<?php } ?> | <?php } ?> | ||
− | < | + | <? /* Search |
<div id="p-search" class="portlet"> | <div id="p-search" class="portlet"> | ||
<h5><label for="searchInput"><?php $this->msg('search') ?></label></h5> | <h5><label for="searchInput"><?php $this->msg('search') ?></label></h5> | ||
Line 178: | Line 178: | ||
</div> | </div> | ||
</div> | </div> | ||
− | + | */ ?> | |
− | < | + | |
+ | <? /* Toolbox | ||
<div class="portlet" id="p-tb"> | <div class="portlet" id="p-tb"> | ||
<h5><?php $this->msg('toolbox') ?></h5> | <h5><?php $this->msg('toolbox') ?></h5> | ||
Line 234: | Line 235: | ||
</div> | </div> | ||
</div> | </div> | ||
− | + | */ ?> | |
− | < | + | <? /* Language links |
<?php | <?php | ||
if( $this->data['language_urls'] ) { ?> | if( $this->data['language_urls'] ) { ?> | ||
Line 251: | Line 252: | ||
</div> | </div> | ||
<?php } ?> | <?php } ?> | ||
− | + | */ ?> | |
<?php | <?php |
Revision as of 03:59, 25 August 2007
<?php /**Template:Php
* MonoBook nouveau * * Translated from gwicke's previous TAL template version to remove * dependency on PHPTAL. * * @todo document * @addtogroup Skins */
if( !defined( 'MEDIAWIKI' ) ) die( -1 );
/** */ require_once('includes/SkinTemplate.php');
/**
* Inherit main code from SkinTemplate, set the CSS and template filter. * @todo document * @addtogroup Skins */
class SkinMonoBook extends SkinTemplate { /** Using monobook. */ function initPage( &$out ) { SkinTemplate::initPage( $out ); $this->skinname = 'monobook'; $this->stylename = 'monobook'; $this->template = 'MonoBookTemplate'; } }
/**
* @todo document * @addtogroup Skins */
class MonoBookTemplate extends QuickTemplate { /** * Template filter callback for MonoBook skin. * Takes an associative array of data set from a SkinTemplate-based * class, and a wrapper for MediaWiki's localization database, and * outputs a formatted page. * * @access private */ function execute() { global $wgUser; $skin = $wgUser->getSkin();
// Suppress warnings to prevent notices about missing indexes in $this->data wfSuppressWarnings();
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> text('xhtmldefaultnamespace') ?>" data['xhtmlnamespaces'] as $tag => $ns) { ?>xmlns:xml:lang="text('lang') ?>" lang="text('lang') ?>" dir="text('dir') ?>"> html('headlinks') ?>
data['displaytitle']!=""?$this->html('title'):$this->text('title') ?>
msg('tagline') ?>
msg('views') ?>
-
data['content_actions'] as $key => $tab) { ?>
- class="">tooltipAndAccesskey('ca-'.$key) ?>>
msg('personaltools') ?>
-
data['personal_urls'] as $key => $item) { ?>
- class="active">tooltipAndAccesskey('pt-'.$key) ?> class="">
-
$val) { ?>
- class="active" >tooltipAndAccesskey($val['id']) ?>>
msg('toolbox') ?>
-
data['notspecialpage']) { ?>
- tooltipAndAccesskey('t-whatlinkshere') ?>>msg('whatlinkshere') ?> data['nav_urls']['recentchangeslinked'] ) { ?>
- tooltipAndAccesskey('t-recentchangeslinked') ?>>msg('recentchangeslinked') ?> data['nav_urls']['trackbacklink'])) { ?>
- tooltipAndAccesskey('t-trackbacklink') ?>>msg('trackbacklink') ?> data['feeds']) { ?>
- data['feeds'] as $key => $feed) { ?>tooltipAndAccesskey('feed-'.$key) ?>> data['nav_urls'][$special]) { ?>
- tooltipAndAccesskey('t-'.$special) ?>>msg($special) ?> data['nav_urls']['print']['href'])) { ?>
- tooltipAndAccesskey('t-print') ?>>msg('printableversion') ?> data['nav_urls']['permalink']['href'])) { ?>
- tooltipAndAccesskey('t-permalink') ?>>msg('permalink') ?> data['nav_urls']['permalink']['href'] === '') { ?>
- tooltip('t-ispermalink') ?>>msg('permalink') ?>
*/ ?> data['language_urls'] ) { ?>
*/ ?> parse($nav->fetchContent(0,false,false),$wgTitle,$opt,true,true); echo $out->getText(); return true; } ?>
html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?> html('reporttime') ?> data['debug'] ): ?> <?php wfRestoreWarnings(); } // end of execute() method } // end of class ?>