Uncyclopedia logo
57,071pages on
this wiki
this wiki
Forum page
Wikia's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.
To contact staff directly or to report bugs, please use Special:Contact.
Note: This topic has been unedited for 897 days. It is considered archived - the discussion is over. Do not add to unless it really needs a response.
How do they get different Image:Wiki.pngs for different parts of the Wiki? GangstaEB Get up with me! 03:20, 25 June 2006 (UTC)
- There are two methods in use, currently. To change the logo for a namespace, you edit your default site-wide skin (Uncyclopedia:MediaWiki:Uncyclopedia.css for Uncyclopedia, but MediaWiki:Monobook.css for most other wikia). For example, these two lines change the logo on the Image: and Image_talk: namespaces.
body.ns-6 #p-logo a { background-image: url(/images/d/d5/Uncyclomedia_Commons.png) !important; }
body.ns-7 #p-logo a { background-image: url(/images/d/d5/Uncyclomedia_Commons.png) !important; }
- However, this only works for full namespaces.
- The other method, to change it on a per-page basis, is to use javascript. The site-wide js for Uncyclopedia is: Uncyclopedia:MediaWiki:Uncyclopedia.js but note that on other wikia it is usually MediaWiki:Monobook.js. The simplest example is something like:
if(document.title.indexOf("Main Page - ") == 0) {
document.write('<style type="text/css">/*<![CDATA[*1/ #p-logo a { background-image: url(/images/d/d5/Uncyclomedia_Commons.png) !important; } /*]]>*/</style>');
}
- Which triggers if the title of the page is "Main Page". But that makes it hard to tweak the code or do multiple style changes (like background colors) (However, it can be utilized to show a random logo on each page load where the other methods cannot).
- A slightly more advanced method is to point to a full style sheet:
if(document.title.indexOf("Main Page - ") == 0) {
document.write('<style type="text/css">/*<![CDATA[*/ @import "/index.php?title=MediaWiki:Skin/Something.css&action=raw&ctype=text/css&smaxage=18000"; /*]]>*/</style>');
}
- You then need to create MediaWiki:Skin/Something.css (or whever you point to it. Note: it should be protected, MediaWiki: namespace is protected automatically, but User namespace is semiprotected for pages ending in .css or .js, example: User:Splarka/Something.css) with contents like:
#p-logo a { background-image: url(/images/d/d5/Uncyclomedia_Commons.png) !important; }
- Which will change the logo. Note:you can have this process semi-automated. A script written on Uncyclopedia and now used on the central Wikia here can be utilized to automatically point to a .css in MediaWiki namespace. See MediaWiki:Monobook.js.
- You can find some examples (ranging from logo changes to full restyles) at: [1]. NOTE however that it is against Wikia policy to block the google ads via this method on any page. --Splarka (talk) 04:19, 25 June 2006 (UTC)
- Question. For the changing of the logo for a namespace, how are you able to determine which number to use. For example, it says above :
body.ns-6 #p-logo a { background-image: url(/images/d/d5/Uncyclomedia_Commons.png) !important; }
body.ns-7 #p-logo a { background-image: url(/images/d/d5/Uncyclomedia_Commons.png) !important; }
- My question is why is it body.ns-6 and body.ns-7? How are you able to determine which namespace this is and how can you select only the specific namespace you want to have the namespace changed. --Meghunter99Talk to me! 17:04, September 1, 2009 (UTC)
http://www.wikia.com/api.php?action=query&meta=siteinfo&siprop=namespaces --Uberfuzzy
17:19, September 1, 2009 (UTC)
also, http://www.wikia.com/wiki/Help:Namespace#What_namespaces_do_all_wikis_have.3F
- What about custom added namespaces that aren't listed there. Is there a way to find out the number of that kind of particular namespace. For reference, I'm referring to this namespace. Thanks! --Meghunter99Talk to me! 17:45, September 1, 2009 (UTC)
- You can use the API. I got that here by following a link here.
- Huh? I just noticed the date format has changed (see signatures at top and bottom of this page). JohnBeckett 00:17, September 2, 2009 (UTC)
- I see there is an explanation for the date formatting change here. JohnBeckett 00:25, September 2, 2009 (UTC)
- What about custom added namespaces that aren't listed there. Is there a way to find out the number of that kind of particular namespace. For reference, I'm referring to this namespace. Thanks! --Meghunter99Talk to me! 17:45, September 1, 2009 (UTC)
- OK, thanks so much! --Meghunter99Talk to me! 00:51, September 2, 2009 (UTC)