From Uncyclopedia, the content-free encyclopedia

Revision as of 06:11, January 21, 2012 by PuppyOnTheRadio (talk | contribs)

Jump to: navigation, search


Hacks are tricks that aim to circumvent existing restrictions of the MediaWiki software. Due to the parody nature of Uncyclopedia, these are quite numerous. They are sorted by the magnitude of intervention, from custom tags to site-wide CSS hacks to in-place CSS/template magic.

Custom tags

Random choice tag

The <choose> tag is used as follows:

<option weight=5>Text3</option>

Every time the page is loaded, the tag is replaced with one of the options. Options with a greater value have a greater chance of popping up. If an option has no value, 1 is assumed.

Besides random selectors, this template is also useful for stripping categories out of templates. Typing


includes the template without adding the page to categories it implies. For examples that use random templates, see Mad Libs and Tourette's Syndrome.

Dynamic page list

The dynamic page list tag is a MediaWiki extension and is currently used on UnNews. It has the following syntax:

shownamespace=true (or false)
mode=ordered (or unordered)
suppresserrors=true (or false)

This tag gets page titles in the specified namespace and category and pastes them as a numbered/bulleted (controlled by the ordered parameter) list. This example lists all articles from Category:Encyclopedias in an ordered and unordered fashion. (It is a table with a dynamic page list tag in both cells.)

  1. Moby-Dick
  2. Deletion
  3. Encyclopedia

Forum tag

The forum extension is similar to dynamic page lists, except it displays more information about the entries. See Forum:Index (in fact, the tag should be used only on forum pages, or in Uncyclopedia:Maintenance, or Template:Oldcatlist).

Site-wide CSS hacks

These are managed via MediaWiki:Uncyclopedia.css (for skin-specific hacks, it is the Uncyclopedia equivalent of MediaWiki:Monobook.css (The skin called Monobook differs by the placement of Google ads and is used for other Wikia.)) and MediaWiki:Common.css (for site-wide hacks).

Non-white image frames

Normally, if a thumb/frame image is placed on a non-white background, the result is crappy. To circumwent default MediaWiki behavior, transclude the image in a nonwhite class div, like this:

<div class="nonwhite">[[Image:File.ext|thumb|Description]]</div>

This table shows the difference. The left column uses the default MediaWiki rules, while the right column uses the hack.


Uncyclopedia logo


Uncyclopedia logo

This has also been replicated in {{ImageNW}}.

Underlined and non-underlined links

Traditionally, wikilinks are not underlined if viewed by an anonymous user and underlined if viewed by a registered user. However, some pages may require this convention to be overridden. If class="(no)underlinelink" is applied to an HTML element — like a span, div, table or column — it will make all links inside that element (non-)underlined.

This column uses default behavior for links.

Stealth external links

Mostly used for Template:User, this class allows technicaly external (links to Uncyclopedia that require parameters) links to appear almost exactly like wikilinks. This class can be used in table, div, span, tt, etc.

normal class="plainlinks" class="stealthexternallink"
Wiki link
External link
Interwiki link
Broken link


Also, a slight edit to class="new" allows it to be imparted on, and indeed overwrite, wikilinks:

normal class="new"
Wiki link
Broken link
Wiki link
Broken link

Custom Logos

Several namespaces have custom logos using body[class=ns-0] #p-logo a redefinitions. You can't edit them, but you can suggest them at Uncyclopedia:Logos.


Here is a stupid little piece of code to make clickish-able buttons in some browsers (click the mouse button down and hold it, in Mozilla and Opera maybe):

Clickable link

Just text

You can define any border color/width, font, or background color you like. Just do not define a border-style in the text (the css swaps it from outset to inset) or it will not be changed.

Note: Recently changed from :hover to :active, more akin to a form button)

This technique is used in the template {{Keypress}}.

Bold Administrators

The names of the administrators are currently bold on Special:Recentchanges. This is done with a gay css trick:

ul.special li a[title="User:Algorithm"],
ul.special li a[title="User:BobBobBob"],
ul.special li a[title="User:Volte"] { font-weight: bold }

You can copy the list to your user css and do fun things with it if you so desire.

Find and greet noobs

If you are a greeter whore (the type who likes to subst: in {{Welcome}} to aim for the top of Special:Mostlinked), this little trick will show missing talk pages for logged in users bold bright green (in Mozilla and maybe Opera) in recent changes. Just add it to your css:

ul.special li a[title ^="User talk:"].new { color:#00ff00;font-weight:bold }
ul.special li a[title ="Special:Contributions"] + a[title ^="User talk:"].new { color:#CC2200;font-weight:normal }

The first line triggers for all missing (class="new") User_talk: links on Recent Changes (and some other special pages). The second line triggers for all anonymous IP talk pages (which you don't want to greet). Therefor, if you tweak the styles of the first line, you should undo any tweaks in the second to reduce false positives. Eg: { color:#00ff00;border:2px dashed red;background-color:pink;text-decoration:blink; } and { color:#CC2200;border:none;background-color:transparent;text-decoration:none; }

Hiding/showing stuff

You can add code to your user uncyclopedia.css and show or hide many features, if you so desire. Here are some you may wish to adjust:


In {{S}} (used in some other templates) and {{vfp}}, there are (optionally somtimes) score boxes to tally votes. For some people who tally votes this can be distracting. To hide these you can use:

.scorebox {display: none;}


In {{VFH}}, there is a hidden (by default) div which shows the appropriate code for placing {{FA}} (the featured-article template, including date and link to 'featured' version). You can display it with:

.featurecode {display: inline;}


In user signatures, you can make hidden text that is shown when the user hovers over a part of your sig.

<span class="sigexpand">Sig<span class="sighidden">nature</span></span>

turns to:


In-place CSS/template hacks

Modifying these does not require adminship.

Title override

The {{title}} template can be used to replace the displayed title of an article:

Usage: {{title|new title|align=ALIGNMENT}}. This page uses title|align=center as an example. Both parameters are optional.

Fake "From Wikipedia" text

Originally created for the Cell church page, the {{fromwp}} template, which needs to be included at the top of the page, prints a fake "From Wikipedia, the free encyclopedia" subheader. It is used on this page.

Conditional templates

These templates output its value only if a certain condition is met.

  • {{if|condition|text|alternate text}}
  • {{switch|key|case a=value|case b=value|...|default=value}}
  • {{ifie|text}}
  • {{ifnotie|text}}

The if template outputs the text if "condition" is not an empty string; otherwise, it prints the alternate text. The ifie/ifnotie templates output the text if the user is/isn't using Internet Explorer.

This is only shown in IE.
This is only shown in browsers with better CSS support, such as Opera and Firefox.

There exist tag-like versions of ifie/ifnotie for those who need advanced formatting (if one tries adding HTML attributes in a template parameter, the entire parameter gets stripped). Usage:

  • {{ie-begin}}text{{ie-end}}
  • {{notie-begin}}text{{notie-end}}
Nuvola apps important
This box is only visible in IE.
Nuvola apps important green
This box is only visible in browsers with better CSS support.

See also

Personal tools