Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F2480
nsattrs.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 21 2014, 8:57 PM
2014-11-21 20:57:58 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
nsattrs.patch
View Options
diff -ud /home/mick/mediawiki-1.5.2/includes/DefaultSettings.php includes/DefaultSettings.php
--- /home/mick/mediawiki-1.5.2/includes/DefaultSettings.php 2005-11-03 04:32:48.000000000 +0200
+++ includes/DefaultSettings.php 2005-11-21 01:32:05.000000000 +0200
@@ -1350,6 +1350,15 @@
$wgExtraNamespaces = NULL;
/**
+ * You can use this array to alter wiki's upper left logo depending on the namespace
+ * you are in.
+ *
+ * Example:
+ * $wgNamespaceLogos = array ( 100 => '/url_path_to/logo.gif');
+**/
+$wgNamespaceLogos = NULL;
+
+/**
* Limit images on image description pages to a user-selectable limit. In order
* to reduce disk usage, limits can only be selected from a list. This is the
* list of settings the user can choose from:
diff -ud /home/mick/mediawiki-1.5.2/includes/Skin.php includes/Skin.php
--- /home/mick/mediawiki-1.5.2/includes/Skin.php 2005-08-25 03:45:45.000000000 +0300
+++ includes/Skin.php 2005-11-21 01:14:33.000000000 +0200
@@ -339,7 +339,12 @@
* URL to the logo
*/
function getLogo() {
- global $wgLogo;
+ global $wgLogo, $wgNamespaceLogos, $wgTitle;
+ if( is_array($wgNamespaceLogos) ){
+ if (array_key_exists( $wgTitle->getNamespace(), $wgNamespaceLogos ) ) {
+ $wgLogo= $wgNamespaceLogos[$wgTitle->getNamespace()];
+ }
+ }
return $wgLogo;
}
@@ -1311,7 +1316,8 @@
wfProfileIn( $fname );
$bar = array();
- $lines = explode( "\n", wfMsgForContent( 'sidebar' ) );
+ global $wgNsLogos, $wgTitle;
+ $lines = explode( "\n", wfMsgForContent( 'sidebar' )."\n".wfMsgForContent('nsbar_'.$wgTitle->getNamespace()) );
foreach ($lines as $line) {
if (strpos($line, '*') !== 0)
continue;
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2056
Default Alt Text
nsattrs.patch (1 KB)
Attached To
Mode
T6042: Namespace specific GUI Changes
Attached
Detach File
Event Timeline
Log In to Comment