Template:Ooucat: Difference between revisions

From Tardis Wiki, the free Doctor Who reference
No edit summary
(annotating)
Line 1: Line 1:
<div id="glow"><div style="font-family:'Georgia'; 'Times New Roman', serif; text-align:center;font-size:175%;line-height:110%;color:#2f2cb8;">'''''{{PAGENAME}}'''<br> is an <u>out-of-universe</u> category.''</div><br><div style="font-size:105%;line-height:110%;"> Don't put it in an '''[[Doctor Who universe|in-universe]]''' category {{#switch:{{#sub:{{PAGENAME}}|8|2}}
<div id="glow"><div style="font-family:'Georgia'; 'Times New Roman', serif; text-align:center;font-size:175%;line-height:110%;color:#2f2cb8;">'''''{{PAGENAME}}'''<br> is an <u>out-of-universe</u> category.''</div><br><div style="font-size:105%;line-height:110%;"> Don't put it in an '''[[Doctor Who universe|in-universe]]''' category <!--
|by=or any category that doesn't have the word '''''stories''''' in it.  Categories about stories should only be in ''other'' categories about stories.|re=like '''[[:category:{{#sub:{{PAGENAME}}|0|10}}]]''', or any category that doesn't have the word '''''stories''''' in it.  Categories about stories should only be in ''other'' categories about stories.| =nor any other category but '''[[:category:real world]]'''.


|se={{#switch:{{#sub:{{PAGENAME}}|15|3}}
Here the template takes a turn for the complicated by having two switching elements, one nested within the other.  The overarching, or umbrella, switch determines the two letters that are at positions 8 and 9 in the page name
 
-->{{#switch:{{#sub:{{PAGENAME}}|8|2}}<!--
 
Depending on what it finds, immediately after the word "stories", it will change the message.  If it finds the word "by", as in [[category:Stories by decade]], it doesn't try to offer a category in the text.
 
-->|by=or any category that doesn't have the word '''''stories''''' in it.  Categories about stories should only be in ''other'' categories about stories.<!--
 
If it finds the letters "re", which only happens in the case of the oddly-named [[category:far future stories]], then it offers a unique solution
 
-->|re=like '''[[:category:{{#sub:{{PAGENAME}}|0|10}}]]''', or any category that doesn't have the word '''''stories''''' in it.  Categories about stories should only be in ''other'' categories about stories.<!--
 
If it finds NOTHING at the 8th position, then that, too, indicates a unique case.  This time, [[category:stories]].  Again, a unique message is offered.
 
-->| =nor any other category but '''[[:category:real world]]'''.<!--
 
If it finds that the letters are "se", then that indicates the most common syntax for a "stories set in" category.  However, there are two main constructions, and so a second switch has to go in here.  If it finds that the three letters after the 15th position -- that is, the word after "stories set in" -- is the word "the", then it knows that the construction is like "stories set in THE 1890s", and it offers an inline category that is based only on the expression AFTER the word "the".  So, in the case of "stories set in the 1890s", the code returns [[category:1890s]].  Note, too, that it checks to see whether there IS such a category first.  If it finds one, it links to it.  If it does find it, then it merely bolds the expression, category:1890s. 
 
-->|se={{#switch:{{#sub:{{PAGENAME}}|15|3}}


|the={{#ifexist:category:{{#sub:{{PAGENAME}}|19|}} |like '''[[:category:{{#sub:{{PAGENAME}}|19|}}]]'''
|the={{#ifexist:category:{{#sub:{{PAGENAME}}|19|}} |like '''[[:category:{{#sub:{{PAGENAME}}|19|}}]]'''
|like '''category:{{#sub:{{PAGENAME}}|19|}}'''}} or any category that doesn't have the word '''''stories''''' in it.  Categories about stories should only be in ''other'' categories about stories.
|like '''category:{{#sub:{{PAGENAME}}|19|}}'''}} or any category that doesn't have the word '''''stories''''' in it.  Categories about stories should only be in ''other'' categories about stories.<!--
 
the default of this nested switch are categories like those in the form, "stories set in <wherever/whenever>".  This works just like the above.  All the categories whose first two words are "stories set", but which don't have a fourth word "the", will be handled by this rule.  So, things like "stories set in New York City" or "stories set in 2010", or even things like "stories set on Earth" respond to the following code:


|#default={{#ifexist:category:{{#sub:{{PAGENAME}}|15|}} |like '''[[:category:{{#sub:{{PAGENAME}}|15|}}]]'''
-->|#default={{#ifexist:category:{{#sub:{{PAGENAME}}|15|}} |like '''[[:category:{{#sub:{{PAGENAME}}|15|}}]]'''
|like '''category:{{#sub:{{PAGENAME}}|15|}}'''}} or any category that doesn't have the word '''''stories''''' in it.  Categories about stories should only be in ''other'' categories about stories.}}}}</div></div>
|like '''category:{{#sub:{{PAGENAME}}|15|}}'''}} or any category that doesn't have the word '''''stories''''' in it.  Categories about stories should only be in ''other'' categories about stories.}}}}</div></div>
<noinclude>
<noinclude>This template is placed on category pages that have the word "stories" in their titles.  It reacts very differently depending on the category page on which it's placed.  Its various forms can't be shown to you on this page.  If you're curious about this code, take a look!  It's fully annotated. 
[[category:Templates]]</noinclude>
[[category:Templates]]</noinclude>

Revision as of 05:35, 25 February 2011

Ooucat
is an out-of-universe category.

Don't put it in an in-universe category nor any other category but category:real world.

This template is placed on category pages that have the word "stories" in their titles. It reacts very differently depending on the category page on which it's placed. Its various forms can't be shown to you on this page. If you're curious about this code, take a look! It's fully annotated.