328 lines
12 KiB
PHP
328 lines
12 KiB
PHP
<?php
|
|
/*
|
|
* ----------------------------------------------------------------------------
|
|
* Wikrby Classic Skin Created by Steve
|
|
* Recreated by Dillion Patrick (dkpat.dev)
|
|
* Credit Given, and all licensing retained for the original skin design
|
|
* "GUMaxVN" as created by Paul Y. Gu.
|
|
*
|
|
*'GuMaxVN' style sheet for CSS2-capable browsers.
|
|
* Loosely based on the monobook style
|
|
* @Version 2.0
|
|
* @Author Paul Y. Gu, <gu.paul@gmail.com>
|
|
* @Copyright paulgu.com 2007 - http://www.paulgu.com/
|
|
* @License: GPL (http://www.gnu.org/copyleft/gpl.html)
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
* http://www.gnu.org/copyleft/gpl.html
|
|
* ----------------------------------------------------------------------------
|
|
*/
|
|
|
|
if( !defined( 'MEDIAWIKI' ) )
|
|
die( -1 );
|
|
|
|
$wgValidSkinNames['Wikirby'] = 'Wikirby';
|
|
|
|
/**
|
|
* Inherit main code from SkinTemplate, set the CSS and template filter.
|
|
* @todo document
|
|
* @addtogroup Skins
|
|
*/
|
|
class SkinWikirby extends SkinTemplate {
|
|
}
|
|
/**
|
|
* @todo document
|
|
* @addtogroup Skins
|
|
*/
|
|
class WikirbyTemplate extends BaseTemplate {
|
|
var $skin;
|
|
/**
|
|
* 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() {
|
|
$this->skin = $this->data['skin'];
|
|
// Suppress warnings to prevent notices about missing indexes in $this->data
|
|
Wikimedia\AtEase\AtEase::suppressWarnings();
|
|
$this->html( 'headelement' );
|
|
?>
|
|
<!-- ##### gumax-wrapper ##### -->
|
|
<div id="gumax-wrapper">
|
|
<!-- ===== gumax-page ===== -->
|
|
<div class="gumax-page"><a name="gumax-top"><!-- --></a>
|
|
<!-- ///// gumax-header ///// -->
|
|
<div id="gumax-header">
|
|
<a name="top" id="contentTop"></a>
|
|
<!-- Login -->
|
|
<div id="gumax-p-login">
|
|
<ul<?php $this->html('userlangattributes') ?>>
|
|
<?php foreach($this->getPersonalTools() as $key => $item) { ?>
|
|
<?php echo $this->makeListItem($key, $item); ?>
|
|
<?php } ?>
|
|
</ul>
|
|
</div>
|
|
<!-- end of Login -->
|
|
<!-- gumax-p-logo -->
|
|
<div id="gumax-p-logo">
|
|
<div id="p-logo">
|
|
<?php
|
|
$logoAttribs = array() + Linker::tooltipAndAccesskeyAttribs('p-logo');
|
|
$logoAttribs['style'] = "background-image: url(https://wikirby.com/w/skins/WiKirby/images/logo.png);";
|
|
$logoAttribs['href'] = $this->data['nav_urls']['mainpage']['href'];
|
|
echo Html::element( 'a', $logoAttribs );
|
|
?>
|
|
</div>
|
|
</div>
|
|
<!-- end of gumax-p-logo -->
|
|
<!-- Search -->
|
|
<?php
|
|
global $wgUseTwoButtonsSearchForm;
|
|
?>
|
|
<div id="gumax-p-search">
|
|
<div id="gumax-searchBody" class="gumax-pBody">
|
|
<form action="<?php $this->text('wgScript') ?>" id="searchform">
|
|
<input type='hidden' name="title" value="<?php $this->text('searchtitle') ?>"/>
|
|
<?php echo $this->makeSearchInput(array( "id" => "searchInput" )); ?>
|
|
|
|
<?php
|
|
echo $this->makeSearchButton("go", array( "id" => "searchGoButton", "class" => "searchButton" ));
|
|
echo $this->makeSearchButton("fulltext", array( "id" => "mw-searchButton", "class" => "searchButton" ));
|
|
?>
|
|
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<!-- end of Search -->
|
|
<div class="visualClear"></div>
|
|
</div>
|
|
<!-- ///// end of gumax-header ///// -->
|
|
<div id="gumax-spacer"><!-- --></div>
|
|
<div id="contentHeadLeft"><div id="contentHeadRight"><div id="contentHeadCenter"></div></div></div>
|
|
<div id="contentBodyLeft"><div id="contentBodyRight"><div id="contentBodyCenter">
|
|
<div id="contentMain">
|
|
<!-- gumax-content -->
|
|
<div id="gumax-content">
|
|
<table class="gumax-caption" width="100%"><tr><td>
|
|
<!-- gumax-content-actions -->
|
|
<div id="gumax-content-actions" >
|
|
<?php $this->cactions(); ?>
|
|
</div></td></tr></table>
|
|
<div id="gumax-spacer"><!-- --></div>
|
|
<table class="gumax-row" width="100%"><tr><td class="gumax-row-left" valign="top">
|
|
<!-- Navigation Menu -->
|
|
<div id="gumax-p-navigation">
|
|
<?php foreach ($this->data['sidebar'] as $bar => $cont) {
|
|
if($bar == 'SEARCH' || $bar == 'LANGUAGES') continue;
|
|
?>
|
|
<div class='gumax-portlet'>
|
|
<h5><?php $out = wfMessage( $bar )->text(); if (wfMessage($bar)->inContentLanguage()->isBlank()) echo $bar; else echo $out; ?></h5>
|
|
<ul>
|
|
<?php foreach($cont as $key => $val) {
|
|
/* <li id="<?php echo htmlspecialchars($val['id']) ?>"<?php
|
|
if ( $val['active'] ) { ?> class="active" <?php }
|
|
// var_dump($val);
|
|
?>><a href="<?php echo htmlspecialchars($val['href']) ?>"><?php echo htmlspecialchars($val['text']) ?></a></li>
|
|
*/
|
|
echo $this->makeListItem($key, $val);
|
|
} ?>
|
|
</ul>
|
|
</div>
|
|
<?php } ?>
|
|
|
|
</div>
|
|
<!-- end of Navigation Menu -->
|
|
</td><td class="gumax-row-right" valign="top">
|
|
|
|
<!-- gumax-content-body -->
|
|
<div id="gumax-content-body">
|
|
<!-- content -->
|
|
<div id="content">
|
|
<a name="top" id="top"></a>
|
|
<?php if($this->data['sitenotice']) { ?><div id="siteNotice"><?php $this->html('sitenotice') ?></div><?php } ?>
|
|
<h1 id="firstHeading" class="firstHeading"><?php $this->html('title') ?></h1>
|
|
<div id="bodyContent">
|
|
<div id="siteSub"><?php $this->msg('tagline') ?></div>
|
|
<div id="contentSub"<?php $this->html('userlangattributes') ?>><?php $this->html('subtitle') ?></div>
|
|
<?php if($this->data['undelete']) { ?><div id="contentSub2"><?php $this->html('undelete') ?></div><?php } ?>
|
|
<?php if($this->data['newtalk'] ) { ?><div class="usermessage"><?php $this->html('newtalk') ?></div><?php } ?>
|
|
<?php if($this->data['showjumplinks']) { ?><div id="jump-to-nav"><?php $this->msg('jumpto') ?> <a href="#column-one"><?php $this->msg('jumptonavigation') ?></a>, <a href="#searchInput"><?php $this->msg('jumptosearch') ?></a></div><?php } ?>
|
|
<!-- start content -->
|
|
<?php $this->html('bodytext') ?>
|
|
<?php if($this->data['catlinks']) { $this->html('catlinks'); } ?>
|
|
<!-- end content -->
|
|
<?php if($this->data['dataAfterContent']) { $this->html ('dataAfterContent'); } ?>
|
|
<div class="visualClear"></div>
|
|
</div>
|
|
</div>
|
|
<!-- end of content -->
|
|
</div>
|
|
<!-- end of gumax-content-body -->
|
|
</td></tr></table>
|
|
<div id="gumax-spacer"><!-- --></div>
|
|
<!-- ///// gumax-footer ///// -->
|
|
<div id="gumax-footer">
|
|
<!-- personal tools -->
|
|
<div id="gumax-personal-tools">
|
|
<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']) { ?>
|
|
<li id="feedlinks"><?php foreach($this->data['feeds'] as $key => $feed) {
|
|
?><span id="feed-<?php echo htmlspecialchars($key) ?>"><a href="<?php
|
|
echo htmlspecialchars($feed['href']) ?>"><?php echo htmlspecialchars($feed['text'])?></a> </span>
|
|
<?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
|
|
}
|
|
|
|
Hooks::run( 'WikirbyTemplateToolboxEnd', array( &$this ) );
|
|
Hooks::run( 'SkinTemplateToolboxEnd', array( &$this ) );
|
|
?>
|
|
|
|
</ul>
|
|
</div>
|
|
<!-- end of personal tools -->
|
|
<?php $this->html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?>
|
|
</div>
|
|
<!-- ///// end of gumax-footer ///// -->
|
|
</div>
|
|
<!-- end of gumax-content -->
|
|
</div>
|
|
</div></div></div>
|
|
<div id="contentFootLeft"><div id="contentFootRight"><div id="contentFootCenter"></div></div></div>
|
|
<div id="gumax-spacer"><!-- --></div><a name="gumax-bottom"><!-- --></a>
|
|
<div id="gumax-f-list">
|
|
<div id="footer" role="contentinfo"<?php $this->html( 'userlangattributes' ) ?>>
|
|
<?php $footericons = $this->getFooterIcons("icononly");
|
|
if ( count( $footericons ) > 0 ): ?>
|
|
<ul id="footer-icons" class="noprint">
|
|
<?php foreach ( $footericons as $blockName => $footerIcons ): ?>
|
|
<li id="footer-<?php echo htmlspecialchars( $blockName ); ?>ico">
|
|
<?php foreach ( $footerIcons as $icon ): ?>
|
|
<?php echo $this->getSkin()->makeFooterIcon( $icon ); ?>
|
|
<?php endforeach; ?>
|
|
</li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
<?php endif; ?>
|
|
<?php foreach( $this->getFooterLinks() as $category => $links ): ?>
|
|
<ul id="footer-<?php echo $category ?>">
|
|
<?php foreach( $links as $link ): ?>
|
|
<li id="footer-<?php echo $category ?>-<?php echo $link ?>">
|
|
<?php $this->html( $link ) ?>
|
|
</li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
<?php endforeach; ?>
|
|
<div style="clear:both"></div>
|
|
</div>
|
|
|
|
<ul>
|
|
<li id="f-poweredby"><a href="http://mediawiki.org">Powered by MediaWiki</a></li>
|
|
<li id="f-designby">Design by Steve</li>
|
|
</ul>
|
|
</div>
|
|
<!-- end of gumax-f-list -->
|
|
<!-- gumax-f-message -->
|
|
<!-- end of gumax-f-message -->
|
|
</div>
|
|
<!-- ===== end of gumax-page ===== -->
|
|
|
|
<?php
|
|
}
|
|
|
|
/**
|
|
* Prints the cactions bar.
|
|
* Shared between MonoBook and Modern
|
|
*/
|
|
function cactions() {
|
|
?>
|
|
<div id="p-cactions" class="portlet">
|
|
<div class="pBody">
|
|
<ul><?php
|
|
foreach($this->data['content_actions'] as $key => $tab) {
|
|
$linkAttribs = array( 'href' => $tab['href'] );
|
|
if( isset( $tab["tooltiponly"] ) && $tab["tooltiponly"] ) {
|
|
$title = Linker::titleAttrib( "ca-$key" );
|
|
if ( $title !== false ) {
|
|
$linkAttribs['title'] = $title;
|
|
}
|
|
} else {
|
|
$linkAttribs += Linker::tooltipAndAccesskeyAttribs( "ca-$key" );
|
|
}
|
|
$linkHtml = Html::element( 'a', $linkAttribs, $tab['text'] );
|
|
/* Surround with a <li> */
|
|
// $liAttribs = array( 'id' => Sanitizer::escapeId( "ca-$key" ) );
|
|
if( $tab['class'] ) {
|
|
$liAttribs['class'] = $tab['class'];
|
|
}
|
|
echo '
|
|
' . Html::rawElement( 'li', $liAttribs, $linkHtml );
|
|
} ?>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<?php $this->html('reporttime') ?>
|
|
<?php if ( $this->data['debug'] ): ?>
|
|
<!-- Debug output:
|
|
<?php $this->text( 'debug' ); ?>
|
|
|
|
-->
|
|
<?php endif; ?>
|
|
</body></html>
|
|
<?php
|
|
Wikimedia\AtEase\AtEase::suppressWarnings( true );
|
|
} // end of execute() method
|
|
} // end of class
|
|
?>
|