Difference between revisions of "User:MogDog66/template:Random Image"

From Team Fortress Wiki
Jump to: navigation, search
(Added documentation, just in case someone stumbles upon this and wants to use it)
(I might want to actually get all the directions on there ~_~)
Line 17: Line 17:
 
{{doc begin}}
 
{{doc begin}}
 
This template is a shortened and modified version of <code>[[Template:Random skin colour]]</code>
 
This template is a shortened and modified version of <code>[[Template:Random skin colour]]</code>
 +
 +
If you have any further questions about this template, feel free to ask me by posting on my [[User_talk:MogDog66|talk]] page, or by asking me on the [[Team_Fortress_Wiki:IRC|IRC]] channel.
  
 
== Function ==
 
== Function ==
Line 27: Line 29:
 
:*Fill out the list of values with your desired list. If there are more than 10, simply add more.
 
:*Fill out the list of values with your desired list. If there are more than 10, simply add more.
 
::*<b>Example:</b> <code>| 11 = [custom value]</code>
 
::*<b>Example:</b> <code>| 11 = [custom value]</code>
:*Change {{code|mod 10}} to use the proper number of values you used.  
+
:*Change <b>both</b> {{code|mod 10}}'s to use the proper number of values you used.  
 
::*<b>Example:</b> <code><nowiki>{{#if:{{{font|}}}|{{#switch:{{#expr:(({{NUMBEROFEDITS:R}} </nowiki><b><u>mod 8</u></b><nowiki>) + {{{offset|0}}}) +  
 
::*<b>Example:</b> <code><nowiki>{{#if:{{{font|}}}|{{#switch:{{#expr:(({{NUMBEROFEDITS:R}} </nowiki><b><u>mod 8</u></b><nowiki>) + {{{offset|0}}}) +  
 
1}}</nowiki></code>
 
1}}</nowiki></code>
:::<small><i>Note:The above example uses 8, yours may be anything. Additionally, the important part to note has been put in bold and underline</i></small>
+
:::<small><i>Note:The above example uses 8, yours may be anything.The important part to note has been put in bold and underline. Additionally, this example only uses the first {{code|mod 10}} example, the same rules must be applied to the second as well</i></small>
 +
:*Delete (or add) any extra values that have changed.
 +
::<b>Example:</b> <code><i><nowiki>| 1 | 2 | 3 | 4 | 5 | 6 | 7 = 000000
 +
| 8 = FFFFFF</nowiki></i></code>
 +
:::<small><i>Note: The above example is formatted is there were only 8 values, yours must be changed according to your number of values</i></small>

Revision as of 08:21, 20 March 2011

File:Grenadiersoftcap.PNG

Documentation for MogDog66/template:Random Image

This template is a shortened and modified version of Template:Random skin colour

If you have any further questions about this template, feel free to ask me by posting on my talk page, or by asking me on the IRC channel.

Function

  • This template uses the number of edits on the page to select a number, which in turn designates the value assigned to the number.

Conversion

To use this template for yourself you must do the following:

  • Create the proper directory under your userpage .
  • Example: User:username/template/randomimage
  • Fill out the list of values with your desired list. If there are more than 10, simply add more.
  • Example: | 11 = [custom value]
  • Change both mod 10's to use the proper number of values you used.
  • Example: {{#if:{{{font|}}}|{{#switch:{{#expr:(({{NUMBEROFEDITS:R}} mod 8) + {{{offset|0}}}) + 1}}
Note:The above example uses 8, yours may be anything.The important part to note has been put in bold and underline. Additionally, this example only uses the first mod 10 example, the same rules must be applied to the second as well
  • Delete (or add) any extra values that have changed.
Example: | 1 | 2 | 3 | 4 | 5 | 6 | 7 = 000000 | 8 = FFFFFF
Note: The above example is formatted is there were only 8 values, yours must be changed according to your number of values