summaryrefslogtreecommitdiff
path: root/skins/ArchLinux.php
diff options
context:
space:
mode:
Diffstat (limited to 'skins/ArchLinux.php')
-rw-r--r--skins/ArchLinux.php58
1 files changed, 31 insertions, 27 deletions
diff --git a/skins/ArchLinux.php b/skins/ArchLinux.php
index 2b6bda72..a4eaef45 100644
--- a/skins/ArchLinux.php
+++ b/skins/ArchLinux.php
@@ -1,13 +1,9 @@
<?php
/**
- * ArchLinux nouveau
- *
- * Translated from gwicke's previous TAL template version to remove
- * dependency on PHPTAL.
+ * ArchLinux skin
*
* @todo document
- * @package MediaWiki
- * @subpackage Skins
+ * @addtogroup Skins
*/
if( !defined( 'MEDIAWIKI' ) )
@@ -16,6 +12,7 @@ if( !defined( 'MEDIAWIKI' ) )
/**
* Inherit main code from SkinTemplate, set the CSS and template filter.
* @todo document
+ * @addtogroup Skins
* @package MediaWiki
* @subpackage Skins
*/
@@ -31,6 +28,7 @@ class SkinArchLinux extends SkinTemplate {
/**
* @todo document
+ * @addtogroup Skins
* @package MediaWiki
* @subpackage Skins
*/
@@ -44,6 +42,8 @@ class ArchLinuxTemplate extends QuickTemplate {
* @access private
*/
function execute() {
+ global $wgUser;
+ $skin = $wgUser->getSkin();
// Suppress warnings to prevent notices about missing indexes in $this->data
wfSuppressWarnings();
@@ -68,6 +68,7 @@ class ArchLinuxTemplate extends QuickTemplate {
<!--[if lt IE 7]><script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath') ?>/common/IEFixes.js?<?php echo $GLOBALS['wgStyleVersion'] ?>"></script>
<meta http-equiv="imagetoolbar" content="no" /><![endif]-->
<style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/archlinux.css";</style>
+ <?php print Skin::makeGlobalVariablesScript( $this->data ); ?>
<script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath' ) ?>/common/wikibits.js?<?php echo $GLOBALS['wgStyleVersion'] ?>"><!-- wikibits js --></script>
<?php if($this->data['jsvarurl' ]) { ?>
<script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('jsvarurl' ) ?>"><!-- site js --></script>
@@ -138,7 +139,7 @@ class ArchLinuxTemplate extends QuickTemplate {
<div id="content">
<a name="top" id="top"></a>
<?php if($this->data['sitenotice']) { ?><div id="siteNotice"><?php $this->html('sitenotice') ?></div><?php } ?>
- <h1 class="firstHeading"><?php $this->data['displaytitle']!=""?$this->text('title'):$this->html('title') ?></h1>
+ <h1 class="firstHeading"><?php $this->data['displaytitle']!=""?$this->html('title'):$this->text('title') ?></h1>
<div id="bodyContent">
<h3 id="siteSub"><?php $this->msg('tagline') ?></h3>
<div id="contentSub"><?php $this->html('subtitle') ?></div>
@@ -159,9 +160,9 @@ class ArchLinuxTemplate extends QuickTemplate {
<div class="pBody">
<ul>
<?php foreach($this->data['content_actions'] as $key => $tab) { ?>
- <li id="ca-<?php echo Sanitizer::escapeId($key) ?>"<?php
+ <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
+ ?>><a href="<?php echo htmlspecialchars($tab['href']) ?>"<?php echo $skin->tooltipAndAccesskey('ca-'.$key) ?>><?php
echo htmlspecialchars($tab['text']) ?></a></li>
<?php } ?>
</ul>
@@ -174,7 +175,7 @@ class ArchLinuxTemplate extends QuickTemplate {
<?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
+ echo htmlspecialchars($item['href']) ?>"<?php echo $skin->tooltipAndAccesskey('pt-'.$key) ?><?php
if(!empty($item['class'])) { ?> class="<?php
echo htmlspecialchars($item['class']) ?>"<?php } ?>><?php
echo htmlspecialchars($item['text']) ?></a></li>
@@ -182,17 +183,16 @@ class ArchLinuxTemplate extends QuickTemplate {
</ul>
</div>
</div>
-
<script type="<?php $this->text('jsmimetype') ?>"> if (window.isMSIE55) fixalpha(); </script>
<?php foreach ($this->data['sidebar'] as $bar => $cont) { ?>
- <div class='portlet' id='p-<?php echo Sanitizer::escapeId($bar) ?>'>
+ <div class='portlet' id='p-<?php echo Sanitizer::escapeId($bar) ?>'<?php echo $skin->tooltip('p-'.$bar) ?>>
<h5><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar, $out)) echo $bar; else echo $out; ?></h5>
<div class='pBody'>
<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>
+ ?>><a href="<?php echo htmlspecialchars($val['href']) ?>"<?php echo $skin->tooltipAndAccesskey($val['id']) ?>><?php echo htmlspecialchars($val['text']) ?></a></li>
<?php } ?>
</ul>
</div>
@@ -202,12 +202,10 @@ class ArchLinuxTemplate extends QuickTemplate {
<h5><label for="searchInput"><?php $this->msg('search') ?></label></h5>
<div id="searchBody" class="pBody">
<form action="<?php $this->text('searchaction') ?>" id="searchform"><div>
- <input id="searchInput" name="search" type="text" <?php
- if($this->haveMsg('accesskey-search')) {
- ?>accesskey="<?php $this->msg('accesskey-search') ?>"<?php }
+ <input id="searchInput" name="search" type="text"<?php echo $skin->tooltipAndAccesskey('search');
if( isset( $this->data['search'] ) ) {
?> value="<?php $this->text('search') ?>"<?php } ?> />
- <input type='submit' name="go" class="searchButton" id="searchGoButton" value="<?php $this->msg('go') ?>" />&nbsp;
+ <input type='submit' name="go" class="searchButton" id="searchGoButton" value="<?php $this->msg('searcharticle') ?>" />&nbsp;
<input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="<?php $this->msg('searchbutton') ?>" />
</div></form>
</div>
@@ -220,23 +218,23 @@ class ArchLinuxTemplate extends QuickTemplate {
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 echo $skin->tooltipAndAccesskey('t-whatlinkshere') ?>><?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 echo $skin->tooltipAndAccesskey('t-recentchangeslinked') ?>><?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 echo $skin->tooltipAndAccesskey('t-trackbacklink') ?>><?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 Sanitizer::escapeId($key) ?>"><a href="<?php
- echo htmlspecialchars($feed['href']) ?>"><?php echo htmlspecialchars($feed['text'])?></a>&nbsp;</span>
+ echo htmlspecialchars($feed['href']) ?>"<?php echo $skin->tooltipAndAccesskey('feed-'.$key) ?>><?php echo htmlspecialchars($feed['text'])?></a>&nbsp;</span>
<?php } ?></li><?php
}
@@ -244,20 +242,20 @@ class ArchLinuxTemplate extends QuickTemplate {
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 echo $skin->tooltipAndAccesskey('t-'.$special) ?>><?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
+ ?>"<?php echo $skin->tooltipAndAccesskey('t-print') ?>><?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
+ ?>"<?php echo $skin->tooltipAndAccesskey('t-permalink') ?>><?php $this->msg('permalink') ?></a></li><?php
} elseif ($this->data['nav_urls']['permalink']['href'] === '') { ?>
- <li id="t-ispermalink"><?php $this->msg('permalink') ?></li><?php
+ <li id="t-ispermalink"<?php echo $skin->tooltip('t-ispermalink') ?>><?php $this->msg('permalink') ?></li><?php
}
wfRunHooks( 'ArchLinuxTemplateToolboxEnd', array( &$this ) );
@@ -296,13 +294,19 @@ class ArchLinuxTemplate extends QuickTemplate {
?>
</ul>
</div>
- <script type="text/javascript"> if (window.runOnloadHook) runOnloadHook();</script>
+
+ <?php $this->html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?>
</div>
<?php $this->html('reporttime') ?>
+<?php if ( $this->data['debug'] ): ?>
+<!-- Debug output:
+<?php $this->text( 'debug' ); ?>
+-->
+<?php endif; ?>
</body></html>
<?php
wfRestoreWarnings();
} // end of execute() method
} // end of class
-?>
+?> \ No newline at end of file