Templating/103

From Uncyclopedia, the content-free encyclopedia
Jump to navigation Jump to search
Ambox warning pn.svg
This article is being considered for deletion in accordance with Uncyclopedia's deletion policy

This article may not fit in Uncyclopedia, or may not be funny with little chance for redemption. Please share your thoughts on the matter at this article's entry on the Votes for deletion page.


AuntJemima.png
Welcome to Aunt Jemima's Templating Academy!

Your comprehensive guide to Templates on Uncyclopedia.

Talk page (award) templates and maintenance (advisory) templates are really just more annoying boxes with fancy names. They are usually larger than userboxen, and vary in width from 200px to 100%.

For Example:

These are just a few examples of the myriad of templates already made. You should look through them all before you make any of your own in the mainspace.

Jolly black santa.jpg
Jolly Black Santa's Christmas Wish
I am sure there are many guys who are bored and horny. Maybe you are on vacation and didn't go home for the holidays. Maybe you are married, or bi, or just plain curious about being with a guy. Maybe you are tipsy and feel adventerous. Anyway, I am here alone, a 42 yo JBS, two hundred and eighty-five pounds, 5'9", from the South Pole. Age, race, experience level not important; I am only looking for a good time. If you're serious, let's talk. No games.

Wishing you and yours a Happy Holidays and a Zana Christmas,

Zana.jpg
I banned Zana Dark and all I got was this lousy template.


Lazer Not Charged – Firing Aborted


To initiate a Royal Rainbow,
quickly stuff taco into mouth
Shoop

The templates you create can be passed parameters after the pipe character (Shift+Backslash), and that is what makes them adaptable.

Talk Page Templates (Awards)

This is a really fun way to emote on another user's talk page with something possibly more obnoxious than an emoji.

{{DudeAbides}} uses a standard size award class="cookie" and looks like this with no parameters:

If you pass your username as the first parameter, the template inserts a simple signature and {{DudeAbides|<insert name here>}} appears like this (the code is displayed on purpose):

A parameter that is not preceded by a variable is designated by the order it is passed to the template. In the previous example there was only one parameter so it is designated as variable 1 automatically, but it can also be passed as 1=<insert name here>. It should be noted that variables are always case sensitive.

Coding a template with parameters is much simpler if you code it without parameters or variables first to see how it looks.

{| class="cookie" style="text-align:center; background: #333; color: #{{X|PSM}}; border: 5px solid #AAA; padding: .2em; margin: 2px; float:{{{f|none}}}; margin: {{#if:{{{f|}}}|{{#ifeq:{{{f|}}}|none|2px|2px {{#ifeq:{{{f|}}}|right|0|1em}} 2px {{#ifeq:{{{f|}}}|left|0|1em}}}}|2px auto 2px auto}}; clear:{{{clear|{{{f|none}}}}}}; min-width:278px; max-width:420px"
| style="padding:0 2px" |  [[File:DudeAbides.jpg|100px]] 
|'''Job Well ''Dude'''''&hellip; <br>Your rug really tied this room together.  <br>'''Thanks.''' {{#if:{{{1|}}}|~ {{CL|#AAA|User:{{{1}}}|{{{1}}}}}| }}
|}<noinclude>

Use this template to thank your fellow users for helping with an article for which you're the primary author.

Also, if you just want to insert obscure Coen Brothers references into things for no apparent reason.

'''Usage:'''

''Unsigned:'' {{tlx|DudeAbides}}

''Signed:'' {{tlx|DudeAbides|Chronarion}} ''(This assumes that you are, in fact, {{u|Chonarion}})''

[[Category:User templates/Award|{{PAGENAME}}]]
[[Category:Award templates|{{PAGENAME}}]]
</noinclude>

Notice this template was coded with a wiki shorthand table and makes use of the #IF parser, you will learn about that in another lesson.

Maintenance Templates (Advisory)

{{Nigga Please}} uses a spawn template to create the box. It also contains a link to edit the page. You can use links like this to encourage people to edit pages, but be careful what you wish for.


Notice the edit link in this template was coded to work no matter which page the template is transcluded on. That's real smart, we're gonna go over that some more later.

{{UB|class=NP|f={{{1|}}}|bg=tan|border=2px dashed cornflowerblue|if=right|fs=14px|[[File:NiggaPlease.jpg|100px|Nigga Please]]|os=background-color: #000; border-top: 3px inset red; border-bottom: 3px inset green; border-right: 3px inset red; border-left: 3px inset green; margin:4px|c=#FFF|'''{{big|This page is {{A/L|c=#ACF|Bullshit|BS}}.}}''' Quit fucking around and please {{l|Edit={{cl|#ACF|add some actual "content" to it.}}|NP|#ACF}}}}<noinclude>[[Category:User templates/Opinion]]</noinclude>

More Examples:

These advisory templates are for AJTA Members and Completionists to use when rewriting articles:

Template:Mother


Template:Father


Using the Box Template


{{A/B}} is a template you can use to make other basic box templates:



Beautiful! You can copy and paste the following code in your own templates:


Try It Yourself!

{{A/B 
| CLASS=CLASSNAME 
| ID=IDNAME 
| M=10px auto 
| B=1px dashed tomato 
| BG=#C9BCA8 
| P=2px 
| CB=2px dotted #444 
| CBG=gainsboro 
| CP=0 8px 
| W=70% 
| MW=288px 
| C=COLOR 
| CL=LINKCOLOR 
| CH=HOVERCOLOR 
| IS=File:styles 
| S=override:box-styles 
| CS=override:content-styles
| CONTENT 
}} TABULARCONTENT
{{A/B/}}

Templates Within Templates

{{Wicked}} uses five named parameters: header, message, text, user, and note. Guess what you're supposed to input.

This is how that template appears:

Wikilogo.png
Welcome to Aunt Jemima's Templating Academy!
You don't have to be a Completionist to use this template.  
YOUR TEXT HERE! This template is adaptable.  ~[[User:<insert name here>|<insert name here>]] NOTE

Let's take it a step further. That template is alright looking but it's a little awkwardly spaced and isn't quite obnoxious enough. We can fix that!

First, we're going to make a new template with the following code: Templating/W

{| align=right style="background: gold; border: 2px solid black; padding: .2em; margin-bottom: 3px; width: auto;"
| style="padding-right: 4px; padding-left: 4px;" |

{{Wicked|text=<br>'''YOUR TEXT HERE!''' This template is adaptable.|user={{USERNAME}}|note=NOTE}}
|}

I created it as a mainspace subpage of this article, located here, only I modified the code a bit because I can. Look at it now:

{| style="float:{{{float|right}}}; clear:{{{float|right}}}; background: {{{background|gold}}}; border: {{{border|2px solid black}}}; padding: {{{padding|.2em}}}; margin: {{{margin|5px auto}}}; width: {{{width|auto}}};"
| style="padding-right: {{{side|4px}}}; padding-left: {{{side|4px}}};" |

{{Wicked|text={{{Text|<br>'''YOUR TEXT HERE!''' This template is adaptable.}}}|sig={{{User|{{USERNAME}}}}}|header= {{{Header|Welcome to Uncyclopedia!}}}|message={{{Message|This ain't your mom's Wikipedia...}}}}}|}<noinclude>


Use this template to welcome fellow users to the wiki. Also, if you just want to insert '''your mom''' jokes and  obscure gamer meme into conversation for no apparent reason. 

==Parameters==
*Header= Welcome to Uncyclopedia!
*Message=''This ain't your mom's Wikipedia...'' 
*Text = '''''YOUR TEXT HERE!''' This template is adaptable.''
*User = ''Zana Dark'' (exact user name) ''nerd, lol'' by default
*float = left, right, or none, ''right'' by default
*background= background color, ''gold'' by default
*border= border style, ''2px solid black'' by default
*padding = padding width, ''.2em'' by default
*margin= margin width, ''5px auto'' by default
*width= width of box, ''auto'' by default
*side = extra side padding between boxes, ''4px'' by default
*Note = An extra note after the username

[[Category:Template Help]]
[[Category:Award templates|{{PAGENAME}}]]
</noinclude>

The variables are the location the parameters are 'passed' and are surrounded by three curly braces, like this: {{{VARIABLE}}}.

A default entry is specified after the pipe character in case no parameter is passed, like this: {{{VARIABLE|DEFAULT}}}.

And finally, here is the new adaptable template in action:

Templating/W

Templating/W passes your newly input parameters to the original Template:Wicked and renders the code accordingly. Don't worry, if you're confused you can always just cheat on the kid next to you for the final, okay?

{{:Templating/Welcome
 |Header=HEADER
 |Message=MESSAGE
 |Text=TEXT
 |User=USERNAME
 |background=gainsboro
 |border=1px solid #666
 |padding=5px
 |margin=5px 10px
 |side=3px
 |Note=&nbsp;NOTE

Use this template to say whatever you want. And now, more obnoxious!

Another Example:

{{User:Zana Dark/Templates/Postcard}} is a template from my userspace, it appears like this:


Crystalturd.jpg :: THE RANDOM POSTCARD ::

Awww you're making me blush.
I appreciate you taking the time to read my crap!
-Zana Dark

Here it is with alternate parameters:


Crystalturd.jpg :: THE RANDOM POSTCARD ::

<< This Template Uses A Random Image Over There On The Left
You will learn more about that later, so exciting.
-Zana Dark


RELOAD IMAGE

Holy Parameters, Batman!

{{Templating/H}} is a template you can use to make hideable templates if you read the documentation, ZOMG!

Alright, on to the next lesson!


104: Navigation Templates >>