Take the footerlinks from vector and monobook and make them skin generic.
authorDaniel Friesen <dantman@users.mediawiki.org>
Sat, 4 Dec 2010 18:37:05 +0000 (18:37 +0000)
committerDaniel Friesen <dantman@users.mediawiki.org>
Sat, 4 Dec 2010 18:37:05 +0000 (18:37 +0000)
includes/SkinTemplate.php
skins/MonoBook.php
skins/Vector.php

index 1a713fd..5a78f90 100644 (file)
@@ -411,6 +411,21 @@ class SkinTemplate extends Skin {
                $tpl->set( 'privacy', $this->privacyLink() );
                $tpl->set( 'about', $this->aboutLink() );
 
+               $tpl->set( 'footerlinks', array(
+                       'info' => array(
+                               'lastmod',
+                               'viewcount',
+                               'numberofwatchingusers',
+                               'credits',
+                               'copyright',
+                       ),
+                       'places' => array(
+                               'privacy',
+                               'about',
+                               'disclaimer',
+                       ),
+               ) );
+
                if ( $wgDebugComments ) {
                        $tpl->setRef( 'debug', $out->mDebugtext );
                } else {
index 24ae2ea..663279a 100644 (file)
@@ -70,6 +70,11 @@ class MonoBookTemplate extends QuickTemplate {
                // Suppress warnings to prevent notices about missing indexes in $this->data
                wfSuppressWarnings();
 
+               // Generate additional footer links
+               $footerlinks = $this->data["footerlinks"];
+               // fold footerlinks into a single array using a bit of trickery
+               $footerlinks = call_user_func_array('array_merge', array_values($footerlinks));
+
                $this->html( 'headelement' );
 ?><div id="globalWrapper">
 <div id="column-content"><div id="content"<?php $this->html("specialpageattributes") ?>>
@@ -175,10 +180,6 @@ if($this->data['copyrightico']) { ?>
 <?php }
 
                // Generate additional footer links
-               $footerlinks = array(
-                       'lastmod', 'viewcount', 'numberofwatchingusers', 'credits', 'copyright',
-                       'privacy', 'about', 'disclaimer', 'tagline',
-               );
                $validFooterLinks = array();
                foreach( $footerlinks as $aLink ) {
                        if( isset( $this->data[$aLink] ) && $this->data[$aLink] ) {
index edad705..b57432e 100644 (file)
@@ -412,25 +412,10 @@ class VectorTemplate extends QuickTemplate {
                }
 
                // Generate additional footer links
-               $footerlinks = array(
-                       'info' => array(
-                               'lastmod',
-                               'viewcount',
-                               'numberofwatchingusers',
-                               'credits',
-                               'copyright',
-                               'tagline',
-                       ),
-                       'places' => array(
-                               'privacy',
-                               'about',
-                               'disclaimer',
-                       ),
-                       'icons' => array(
-                               'poweredbyico',
-                               'copyrightico',
-                       ),
-               );
+               $footerlinks = $this->data["footerlinks"];
+               // footerlinks doesn't include icons for now, so we'll just append the default
+               $footerlinks["icons"] = array( 'poweredbyico', 'copyrightico', );
+               
                $footerlinksClasses = array(
                        'icons' => array( 'noprint' )
                );