Last modified: 2011-03-13 18:04:39 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T6042, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 4042 - Namespace specific GUI Changes
Namespace specific GUI Changes
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
unspecified
All All
: Lowest enhancement with 7 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
: 2291 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-11-20 23:52 UTC by Nick Kossifidis
Modified: 2011-03-13 18:04 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Patch for Skin.php (1.72 KB, patch)
2005-11-20 23:55 UTC, Nick Kossifidis
Details
patch for r16100 adding namespace-specific interfaces (1.8-svn) (2.59 KB, patch)
2006-08-17 05:26 UTC, Dan Li
Details

Description Nick Kossifidis 2005-11-20 23:52:58 UTC
I thought it would be usefull if someone could use different logos and sidebars
in different namespaces (e.g. different logo for the Help namespace and a
sidebar with the help categories) but i couldn't find a way to do it. So i
created a patch that does the folowing:

You can change the logo on a namespace using the $wgNamespaceLogos array.

$wgNamespaceLogos = array(<namespace_number> => <url_path_to/logo.gif>)

You can attach a custom sidebar to a namespace by creating a message
"nsbar_<namespace_number>" in the MediaWiKi namespace (that has the same format
as the "sidebar" message).

Hope you find it useful :-)

Nick
Comment 1 Nick Kossifidis 2005-11-20 23:55:34 UTC
Created attachment 1087 [details]
Patch for Skin.php

To apply the patch, save the patch to a file e.g. nsattrs.patch, go to the
mediawiki directory and run:

patch -p0 < nsattrs.patch
Comment 2 Nick Kossifidis 2005-11-21 16:47:37 UTC
Note: The above patch is for version 1.5.2
Comment 3 Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-08-10 22:53:46 UTC
*** Bug 2291 has been marked as a duplicate of this bug. ***
Comment 4 Dan Li 2006-08-17 05:26:13 UTC
Created attachment 2238 [details]
patch for r16100 adding namespace-specific interfaces (1.8-svn)

This patch does pretty much the same thing as the 1.5.2 patch, for 1.8.

Logos (same):
- $wgNamespaceLogos -- array: NS_* => [logo url]

Sidebar (different):
- sidebar[NS_*] (instead of nsbar_[NS_*]) -- sidebar sounds better than nsbar,
IMHO
- sidebar[NS_*] replaces sidebar, instead of augmenting it, but falls back to
sidebar if it doesn't exist
Comment 5 Chad H. 2009-12-21 14:19:43 UTC
Going to close this as WONTFIX, because I don't think this is something we need in core.

However, there are a few good workarounds to do what you want. Since we include the namespace as a class on <body> (in addition to in the Javascript globals we provide), it's very easy to write custom CSS and use Javascript to manipulate the page on a per-namespace basis. Same goes for the sidebar: you can write a function to hook into SkinBuildSidebar to customize the sidebar; this does break the sidebar cache, though.
Comment 6 Aryeh Gregor (not reading bugmail, please e-mail directly) 2009-12-21 14:24:45 UTC
Note that for instance, you can do a per-namespace logo with CSS like this:

body.ns-1 #p-logo a { background-image: url(my_talk_logo_url.png) !important; }

That will use the given image for the logo in ns1 (i.e., Talk:).  The logo is only added in the first place using CSS anyway.  So a whole new config option just for this is overboard.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links