Forums: Index Help desk About exporting and categories?
Fandom's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.

50px-Replacement filing cabinet.svg

Note: This topic has been unedited for 1648 days. It is considered archived - the discussion is over. Do not add to unless it really needs a response.

Hi, On a category page, is it possible to hide the automatically generated alphabetical list of articles in the category? If so can that be done selectively by category? Spacebar22 11:24, December 21, 2009 (UTC)

I have two questions.

  1. Exporting, is it possible to transfer a page to another without losing the history? Each time I do that, I only get the last editor. 20:53, 20 December 2006 (UTC)
  2. Categories, is it possible to add a page to a category without showing the category space? This would be really useful at Uncyclopedia and its sister sites, thanks. 20:53, 20 December 2006 (UTC)

(sorry for not logging in) Putting style="display:none" doesn't work, because it makes the opposite. It SHOWS the category box without adding it to the category. Smiddle 21:00, 20 December 2006 (UTC)

On Special:Export there is a checkbox at the bottom that says [x] Include only the current revision, not the full history, if you uncheck that it should give you the full history.
What exactly do you want to hide? If you wanted to hide all categories you could try (in a site-wide CSS):
#catlinks {display: none; }
But this would cause navigation problems for those who use categories. If you wanted to hide all the links (on all pages) to just one category, you could try something like:
#catlinks a[title="Category:Hidden category"] {display: none; }
But this isn't supported by all browsers, and would be a bit hit-and-miss. Also, if it was the only category on a page, the category box might look weird.
If you want to hide just one link to just one category, then you are getting into javascript which is a pain, and unreliable. If you really need to have a page marked as being in a category without showing it, you could put the talk page in the category instead, or make a subpage as a categorized redirect, eg: Page in category Category:Hidden could have (I believe) Page/redir with contents:
#REDIRECT:Page [[:Category:Hidden]]

--Splarka (talk) 03:10, 21 December 2006 (UTC)

I want to hide the category box at the bottom of a page. For example on this page, the box saying "Category: Help desk". I'll try the redirect thing. And when I export pages I directly go to Special:Export/Page, thanks for the tip. Smiddle 11:13, 21 December 2006 (UTC)

I think I know where you're coming from for the category thing. If you want to hide the category box on a specific page while keeping it in the category, you need to do a little Javascript. This piece of Javascript comes from Uncyclopedia:
/* New reskin parser script, from : 
1) Add the page title and namespace exactly ("Name space:Page name") as new skin, use 
spaces *NOT* underscores: ("Main Page": "", should be first line). The next parameter 
is optionally an existing "MediaWiki:Skin/"-prefixed file (in which case you can skip 
step 2).
2) Create MediaWiki:Skin/Name_Space:Page_Name.css and place reskin CSS content there.

skin = {
    "SOMEPAGE": ""

var re = RegExp("(.*) - SITENAME");
var matches = re.exec(document.title);
var skinName;

if (matches) {
    if (skin[matches[1]] != undefined) {
        skinName = (skin[matches[1]].length > 0) ? skin[matches[1]] : matches[1] + '.css';
        document.write('<style type="text/css">/*<![CDATA[*/ @import "/index.php?title=MediaWiki:Skin/' + skinName + '&action=raw&ctype=text/css"; /*]]>*/</style>');
Enter it into MediaWiki:Monobook.js, replacing SOMEPAGE with the page name and SITENAME with the site name. Then go to MediaWiki:Skin/SOMEPAGE.css replacing SOMEPAGE with the page name. Enter in the following code:
#catlinks {display: none; }
Then you're done! Remember to clear your cache! --lE☺N2323 23:49, 21 December 2006 (UTC)
Hey, you never know what! It's Splarka (Splaka on Uncyclo)'s invention all along (like always)! To Splarka: How do you make all these inventions. By the way, I think that the invention started off here. --lE☺N2323 23:57, 21 December 2006 (UTC)
Per my quote above: "If you want to hide just one link to just one category, then you are getting into javascript which is a pain, and unreliable." ^_^.
Also, yes, that diff is where it started on Uncyclopedia (although en.Wikipedia had been doing something similar with their main page about as long, but I didn't know about it). The script you pasted above was actually a souped up version of it conceptualized by myself and designed/written by Uncyclopedia:User:Volte with some help from Uncyclopedia:User:Algorithm, to make it easier than a crapload of if() functions.
FYI, this and other javsscript tricks will be mostly unneeded when we upgrade to MediaWiki 1.9+. In rev:17119 a semi-unique class is added to the body tag of every MediaWiki page. This means per-page css styling can be done simply by editing the site-wide MediaWiki:Common.css (or in Monobook.css for skin specific styling).
I've written a javascript to simulate this: User:Splarka/tricks#Per-Page_CSS_support (note that the classes will not be named exactly when the upgrade occurs). --Splarka (talk) 03:16, 22 December 2006 (UTC)
When those updates come along. Can something browser specific be done? I mean, say a little server side thing that adds the name of the current browser and or engine into the class of the html tag kinda like (<html class="ie 7 trident">, <html class="ie 5 trident">, <html class="firefox 1_5 gekko">, <html class="firefox 2 gekko">, <html class="opera 9 presto">, <html class="konqueror khtml">, or <html class="safari webkit"> (per browser of course)). Because some layouts such as the one on The Gaiapedia render with glitches in some browsers but can't be fixed because the fix will break the layout for other browsers. Our Sidebar breaks in Opera, but if I fix it, then it will break in Safari, and any other KHTML/WebKit browser. I've had no luck getting a dev to add a little browser specific fix to the html of the page, but if this was added, then all I would need to do would be to use this to fix it:
html.opera #column-one, html.presto #column-one {
     float: left;
And then anyone using opera or a browser with opera's rendering engine (presto) would have the opera fix applied to it, and our wiki could then be viewed in all browsers. Dantman (Talk) 08:15, 23 December 2006 (UTC)
I'll try that Javascript thing, thanks. Smiddle 08:43, 22 December 2006 (UTC)

One-line suggestion on the category question

You could just link to the page from the category. Robin Patterson 12:29, 21 April 2007 (UTC)

Uh... I was meaning something like you edit the page, and you'd find something like:

Smiddle 12:40, 21 April 2007 (UTC)

Community content is available under CC-BY-SA unless otherwise noted.