Replacing sidebar content

From Organic Design wiki
Revision as of 04:22, 25 August 2007 by Nad (talk | contribs) (oops, delimiters not quite right)

<?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') ?> <?php $this->text('pagetitle') ?> data['printable']) ) { ?>media="print" href="text('stylepath') ?>/common/commonPrint.css?" /> data ); ?> data['jsvarurl' ]) { ?> data['pagecss' ]) { ?> data['usercss' ]) { ?> data['userjs' ]) { ?> data['userjsprev']) { ?> data['trackbackhtml']) print $this->data['trackbackhtml']; ?> html('headscripts') ?> data['body_ondblclick']) { ?>ondblclick="text('body_ondblclick') ?>" data['body_onload' ]) { ?>onload="text('body_onload') ?>" class="mediawiki text('nsclass') ?> text('dir') ?> text('pageclass') ?>">

data['sitenotice']) { ?>
html('sitenotice') ?>

data['displaytitle']!=""?$this->html('title'):$this->text('title') ?>

msg('tagline') ?>

html('subtitle') ?>
data['undelete']) { ?>
html('undelete') ?>
data['newtalk'] ) { ?>
html('newtalk') ?>
data['showjumplinks']) { ?> html('bodytext') ?> data['catlinks']) { ?>
msg('views') ?>
msg('personaltools') ?>
MastodonRSSCodeEmail
data['sidebar'] as $bar => $cont) { ?>
tooltip('p-'.$bar) ?>>
tooltipAndAccesskey('search'); if( isset( $this->data['search'] ) ) { ?> value="text('search') ?>" />  
*/ ?>
msg('toolbox') ?>

*/ ?> data['language_urls'] ) { ?>

msg('otherlanguages') ?>
    data['language_urls'] as $langlink) { ?>

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 ?>