User:GTA Ganxtaize/monobook.php

<?php /** * monobook_ads nouveau * * Translated from gwicke's previous TAL template version to remove * dependency on PHPTAL. * * @todo document * @package MediaWiki * @subpackage Skins */

if( !defined( 'MEDIAWIKI' ) ) die( -1 );

/** */ require_once('includes/SkinTemplate.php');

/** * Inherit main code from SkinTemplate, set the CSS and template filter. * @todo document * @package MediaWiki * @subpackage Skins */ class Skinmonobook_ads extends SkinTemplate { /** Using monobook_ads. */	function initPage( &$out ) { SkinTemplate::initPage( $out ); $this->skinname = 'monobook_ads'; $this->stylename = 'monobook_ads'; $this->template = 'monobook_adsTemplate'; } }

/** * @todo document * @package MediaWiki * @subpackage Skins */ class monobook_adsTemplate extends QuickTemplate { /**	 * Template filter callback for monobook_ads 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 { // 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') ?>"> text('mimetype') ?>; charset=text('charset') ?>" /> html('headlinks') ?> text('pagetitle') ?> /*<![CDATA[*/ @import "text('stylepath') ?>/text('stylename') ?>/main.css?"; /*]]>*/ data['printable']) ) { ?>media="print" href="<?php $this->text('stylepath') ?>/common/commonPrint.css?<?php echo $GLOBALS['wgStyleVersion'] ?>" /> <link rel="stylesheet" type="text/css" media="handheld" href="<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/handheld.css?<?php echo $GLOBALS['wgStyleVersion'] ?>" /> <?php global $wgVersion; if( version_compare( $wgVersion, '1.9.0rc1', '>=' ) ) { print Skin::makeGlobalVariablesScript( $this->data ); } ?> <script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath' ) ?>/common/wikibits.js?<?php echo $GLOBALS['wgStyleVersion'] ?>"> <?php	if($this->data['jsvarurl' ]) { ?> <script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('jsvarurl' ) ?>"> <?php	} ?> <?php	if($this->data['pagecss'  ]) { ?> <style type="text/css"><?php $this->html('pagecss'  ) ?> <?php	} if($this->data['usercss'  ]) { ?> <style type="text/css"><?php $this->html('usercss'  ) ?> <?php	} if($this->data['userjs'   ]) { ?> <script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('userjs' ) ?>"> <?php	} if($this->data['userjsprev']) { ?> <script type="<?php $this->text('jsmimetype') ?>"><?php $this->html('userjsprev') ?> <?php	} if($this->data['trackbackhtml']) print $this->data['trackbackhtml']; ?> <?php $this->html('headscripts') ?> <body <?php if($this->data['body_ondblclick']) { ?>ondblclick="<?php $this->text('body_ondblclick') ?>"<?php } ?> <?php if($this->data['body_onload'   ]) { ?>onload="<?php     $this->text('body_onload')     ?>"<?php } ?> class="mediawiki <?php $this->text('nsclass') ?> <?php $this->text('dir') ?> <?php $this->text('pageclass') ?>"> </a> <?php if($this->data['sitenotice']) { ?> <?php $this->html('sitenotice') ?> <?php } ?> <h1 class="firstHeading"><?php $this->data['displaytitle']!=""?$this->html('title'):$this->text('title') ?> <script type="text/javascript"> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> <h3 id="siteSub"><?php $this->msg('tagline') ?> <?php $this->html('subtitle') ?> <?php if($this->data['undelete']) { ?> <?php    $this->html('undelete') ?> <?php } ?> <?php if($this->data['newtalk'] ) { ?> <?php $this->html('newtalk') ?> <?php } ?> <?php if($this->data['showjumplinks']) { ?> <?php $this->msg('jumpto') ?> <a href="#column-one"><?php $this->msg('jumptonavigation') ?></a>, <a href="#searchInput"><?php $this->msg('jumptosearch') ?></a> <?php } ?> <?php $this->html('bodytext') ?> <?php if($this->data['catlinks']) { ?> <?php      $this->html('catlinks') ?> <?php } ?> <?php $this->msg('views') ?> <ul> <?php			foreach($this->data['content_actions'] as $key => $tab) { ?> <li id="ca-<?php echo Sanitizer::escapeId($key) ?>"<?php if($tab['class']) { ?> class="<?php echo htmlspecialchars($tab['class']) ?>"<?php } ?>><a href="<?php echo htmlspecialchars($tab['href']) ?>"><?php echo htmlspecialchars($tab['text']) ?></a></li> <?php			 } ?> </ul> <?php $this->msg('personaltools') ?> <ul> <?php 			foreach($this->data['personal_urls'] as $key => $item) { ?> <li id="pt-<?php echo Sanitizer::escapeId($key) ?>"<?php if ($item['active']) { ?> class="active"<?php } ?>><a href="<?php				echo htmlspecialchars($item['href']) ?>"<?php if(!empty($item['class'])) { ?> class="<?php				echo htmlspecialchars($item['class']) ?>"<?php } ?>><?php echo htmlspecialchars($item['text']) ?></a></li> <?php			} ?> </ul> <a style="background-image: url(<?php $this->text('logopath') ?>);" <?php ?>href="<?php echo htmlspecialchars($this->data['nav_urls']['mainpage']['href'])?>" <?php ?>title="<?php $this->msg('mainpage') ?>"></a> <script type="<?php $this->text('jsmimetype') ?>"> if (window.isMSIE55) fixalpha; <?php foreach ($this->data['sidebar'] as $bar => $cont) { ?> <div class='portlet' id='p-<?php echo Sanitizer::escapeId($bar) ?>'> <?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar, $out)) echo $bar; else echo $out; ?> <ul> <?php 			foreach($cont as $key => $val) { ?> <li id="<?php echo Sanitizer::escapeId($val['id']) ?>"<?php if ( $val['active'] ) { ?> class="active" <?php } ?>><a href="<?php echo htmlspecialchars($val['href']) ?>"><?php echo htmlspecialchars($val['text']) ?></a></li> <?php			} ?> </ul> <?php } ?> <label for="searchInput"><?php $this->msg('search') ?> <form action="<?php $this->text('searchaction') ?>" id="searchform"> <input id="searchInput" name="search" type="text" <?php if($this->haveMsg('accesskey-search')) { ?>accesskey="<?php $this->msg('accesskey-search') ?>"<?php } if( isset( $this->data['search'] ) ) { ?> value="<?php $this->text('search') ?>"<?php } ?> /> <input type='submit' name="go" class="searchButton" id="searchGoButton"	value="<?php $this->msg('searcharticle') ?>" /> <input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="<?php $this->msg('searchbutton') ?>" /> <?php $this->msg('toolbox') ?> <ul> <?php if($this->data['notspecialpage']) { ?> <li id="t-whatlinkshere"><a href="<?php				echo htmlspecialchars($this->data['nav_urls']['whatlinkshere']['href'])				?>"><?php $this->msg('whatlinkshere') ?></a></li> <?php if( $this->data['nav_urls']['recentchangeslinked'] ) { ?> <li id="t-recentchangeslinked"><a href="<?php				echo htmlspecialchars($this->data['nav_urls']['recentchangeslinked']['href'])				?>"><?php $this->msg('recentchangeslinked') ?></a></li> <?php 		} }		if(isset($this->data['nav_urls']['trackbacklink'])) { ?> <li id="t-trackbacklink"><a href="<?php				echo htmlspecialchars($this->data['nav_urls']['trackbacklink']['href'])				?>"><?php $this->msg('trackbacklink') ?></a></li> <?php 	} if($this->data['feeds']) { ?> <?php foreach($this->data['feeds'] as $key => $feed) { ?><span id="feed-<?php echo Sanitizer::escapeId($key) ?>"><a href="<?php					echo htmlspecialchars($feed['href']) ?>"><?php echo htmlspecialchars($feed['text'])?></a> <?php } ?></li><?php }

foreach( array('contributions', 'blockip', 'emailuser', 'upload', 'specialpages') as $special ) {

if($this->data['nav_urls'][$special]) { ?><li id="t-<?php echo $special ?>"><a href="<?php echo htmlspecialchars($this->data['nav_urls'][$special]['href'])				?>"><?php $this->msg($special) ?></a></li> <?php		} }

if(!empty($this->data['nav_urls']['print']['href'])) { ?> <li id="t-print"><a href="<?php echo htmlspecialchars($this->data['nav_urls']['print']['href'])				?>"><?php $this->msg('printableversion') ?></a></li><?php }

if(!empty($this->data['nav_urls']['permalink']['href'])) { ?> <li id="t-permalink"><a href="<?php echo htmlspecialchars($this->data['nav_urls']['permalink']['href'])				?>"><?php $this->msg('permalink') ?></a></li><?php } elseif ($this->data['nav_urls']['permalink']['href'] === '') { ?> <li id="t-ispermalink"><?php $this->msg('permalink') ?></li><?php }

wfRunHooks( 'monobook_adsTemplateToolboxEnd', array( &$this ) ); ?>			</ul> <?php if( $this->data['language_urls'] ) { ?> <?php $this->msg('otherlanguages') ?> <ul> <?php		foreach($this->data['language_urls'] as $langlink) { ?> <li class="<?php echo htmlspecialchars($langlink['class'])?>"><?php ?><a href="<?php echo htmlspecialchars($langlink['href']) ?>"><?php echo $langlink['text'] ?></a></li> <?php		} ?> </ul> <?php	} ?> <script type="text/javascript"> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> <script type="text/javascript"> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> <?php if($this->data['poweredbyico']) { ?> <?php $this->html('poweredbyico') ?> <?php 	} if($this->data['copyrightico']) { ?> hi<?php $this->html('copyrightico') ?> <?php	}

// Generate additional footer links ?>			<a href="http://www.ipbwiki.com/forums/index.php?showtopic=407">Skin by Peter</a> <?php $footerlinks = array(			'lastmod', 'viewcount', 'numberofwatchingusers', 'credits', 'copyright',			'privacy', 'about', 'disclaimer', 'tagline',		); foreach( $footerlinks as $aLink ) { if( isset( $this->data[$aLink] ) && $this->data[$aLink] ) { ?>				<li id="<?php echo$aLink?>"><?php $this->html($aLink) ?></li> <?php 		} } ?>			</ul> <?php $this->html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?> <?php $this->html('reporttime') ?> <?php if ( $this->data['debug'] ): ?>

<?php endif; ?> <?php wfRestoreWarnings; } // end of execute method } // end of class ?>