Welcome to SmashWiki! Log in or create an account and join the community, and don't forget to read this first!
Notices
The Skill parameter has been removed from Smasher infoboxes, and in its place are the new "Best historical ranking" and "Best tournament result" parameters. SmashWiki needs help adding these new parameters to Smasher infoboxes, refer to the guidelines here for what should be included in these new parameters.
When adding results to Smasher pages, include each tournament's entrant number in addition to the player's placement, and use the {{Trn}} template with the matching game specified. Please also fix old results on Smasher pages that do not abide to this standard. Refer to our Smasher article guidelines to see how results tables should be formatted.
Check out our project page for ongoing projects that SmashWiki needs help with.

User:Toomai/Wiki tips and tricks: Difference between revisions

From SmashWiki, the Super Smash Bros. wiki
Jump to navigationJump to search
(Not sure if this belongs, but might as well give it a try)
 
mNo edit summary
Line 9: Line 9:
*ALWAYS preview before saving! Mistakes in a single place can make tables look horrendous, especially if you've got merged cells.
*ALWAYS preview before saving! Mistakes in a single place can make tables look horrendous, especially if you've got merged cells.
*Putting <code>class="wikitable sortable"</code> in a table's header (that is, right after the <code>{|</code>) will allow users to sort the table. This doesn't work if cells are merged, however.
*Putting <code>class="wikitable sortable"</code> in a table's header (that is, right after the <code>{|</code>) will allow users to sort the table. This doesn't work if cells are merged, however.
*Generally, things in a table look better when they're centered. Putting <code>style="text-align:center"</code> in the header will center all the text in every cell.
*Generally, things in a table look better when they're centered (with the exception of large blocks of text). Putting <code>style="text-align:center"</code> in the header will center all the text in every cell.
*Use <code>!</code> instead of <code>|</code> when starting cells that are headers. However, you still need to use a <code>|</code> to seperate parameters (such as colouring) from the cell's content. Example:
*Use <code>!</code> instead of <code>|</code> when starting cells that are headers. However, you still need to use a <code>|</code> to seperate parameters (such as colouring) from the cell's content. Example:
<pre>
<pre>
Line 40: Line 40:
|<code><nowiki>Blah <s>cross <sup>yoik</s> doof</sup> bladoonga</nowiki></code>||Blah <s>cross <sup>yoik</s> doof</sup> bladoonga
|<code><nowiki>Blah <s>cross <sup>yoik</s> doof</sup> bladoonga</nowiki></code>||Blah <s>cross <sup>yoik</s> doof</sup> bladoonga
|}
|}
*While adding colour can sometimes be distracting, there are times when it can have a positive effect. Here are some simple colours:
*Colour on the internet is represented by a six-digit hexadecimal number (prefanced on wikis by "#"). Hex numbers use the letters A to F as extra digits - A is 10, while F is 15. Basically, the first two digits are the amount of red, the next two are the green, and the last two are the blue. So, 000000 is pure black, 7F0000 is 50% red (brown), and FFBF7F is 100% red, 75% green, and 50% blue (tan). While adding colour can sometimes be distracting, there are times when it can have a positive effect. Here are some simple colours:
{|class="wikitable" style="text-align:center"
{|class="wikitable" style="text-align:center"
!Colour!!Slight fade!!Medium fade!!Strong fade
!Colour!!Slight fade!!Medium fade!!Strong fade
|-
|-
|style="background-color:#ff0000"|ff0000||style="background-color:#ff3f3f"|ff3f3f||style="background-color:#ff7f7f"|ff7f7f||style="background-color:#ffbfbf"|ffbfbf
|style="background-color:#ff0000"|FF0000||style="background-color:#ff3f3f"|FF3F3F||style="background-color:#ff7f7f"|FF7F7F||style="background-color:#ffbfbf"|FFBFBF
|-
|-
|style="background-color:#ff7f00"|ff7f00||style="background-color:#ff9f3f"|ff9f3f||style="background-color:#ffbf7f"|ffbf7f||style="background-color:#ffdfbf"|ffdfbf
|style="background-color:#ff7f00"|FF7F00||style="background-color:#ff9f3f"|FF9F3F||style="background-color:#ffbf7f"|FFBF7F||style="background-color:#ffdfbf"|FFDFBF
|-
|-
|style="background-color:#ffff00"|ffff00||style="background-color:#ffff3f"|ffff3f||style="background-color:#ffff7f"|ffff7f||style="background-color:#ffffbf"|ffffbf
|style="background-color:#ffff00"|FFFF00||style="background-color:#ffff3f"|FFFF3F||style="background-color:#ffff7f"|FFFF7F||style="background-color:#ffffbf"|FFFFBF
|-
|-
|style="background-color:#00ff00"|00ff00||style="background-color:#3fff3f"|3fff3f||style="background-color:#7fff7f"|7fff7f||style="background-color:#bfffbf"|bfffbf
|style="background-color:#00ff00"|00FF00||style="background-color:#3fff3f"|3FFF3F||style="background-color:#7fff7f"|7FFF7F||style="background-color:#bfffbf"|BFFFBF
|-
|-
|style="background-color:#00ffff"|00ffff||style="background-color:#3fffff"|3fffff||style="background-color:#7fffff"|7fffff||style="background-color:#bfffff"|bfffff
|style="background-color:#00ffff"|00FFFF||style="background-color:#3fffff"|3FFFFF||style="background-color:#7fffff"|7FFFFF||style="background-color:#bfffff"|BFFFFF
|-
|-
|style="background-color:#0000ff"|0000ff||style="background-color:#3f3fff"|3f3fff||style="background-color:#7f7fff"|7f7fff||style="background-color:#bfbfff"|bfbfff
|style="background-color:#0000ff"|0000FF||style="background-color:#3f3fff"|3F3FFF||style="background-color:#7f7fff"|7F7FFF||style="background-color:#bfbfff"|BFBFFF
|-
|-
|style="background-color:#ff00ff"|ff00ff||style="background-color:#ff3fff"|ff3fff||style="background-color:#ff7fff"|ff7fff||style="background-color:#ffbfff"|ffbfff
|style="background-color:#ff00ff"|FF00FF||style="background-color:#ff3fff"|FF3FFF||style="background-color:#ff7fff"|FF7FFF||style="background-color:#ffbfff"|FFBFFF
|}
|}



Revision as of 12:50, March 20, 2010

If this kind of thing would do better elsewhere, go ahead and move it.

If you've got a tip or trick to add, go ahead and put it.

General

  • Always use the preview button. One wrong key can cause an entire page to go out of whack.

Tables

  • ALWAYS preview before saving! Mistakes in a single place can make tables look horrendous, especially if you've got merged cells.
  • Putting class="wikitable sortable" in a table's header (that is, right after the {|) will allow users to sort the table. This doesn't work if cells are merged, however.
  • Generally, things in a table look better when they're centered (with the exception of large blocks of text). Putting style="text-align:center" in the header will center all the text in every cell.
  • Use ! instead of | when starting cells that are headers. However, you still need to use a | to seperate parameters (such as colouring) from the cell's content. Example:
!make it red|put text here!!make it yellow|put text here

Images

  • Normally, clicking an image leads to the image itself. However, by adding the link parameter, you can make images at just like normal links. Usually, it's best to leave images as linking to themselves, since linking them forces people to look at the source to find out where an image came from. However, there are cases where linking them is better (such as the Tier list templates).
This image leads to Image:Icon-mario.gif This image leads to Mario (SSBB)
File:Icon-mario.gif File:Icon-mario.gif
[[Image:Icon-mario.gif|50px]] [[Image:Icon-mario.gif|50px|link=Mario (SSBB)]]

Formatting

  • Formats have to be closed in the opposite order they were opened. Otherwise, odd stuff happens.
This Looks like this
Text '''[[Main page]]''' Text Text Main page Text
Text '''[[Main page''']] Text Text Main page''' Text
Blah <s>cross <sup>yoik</sup> doof</s> bladoonga Blah cross yoik doof bladoonga
Blah <s>cross <sup>y</s>o<s>ik</sup> doof</s> bladoonga Blah cross yoik doof bladoonga
Blah <s>cross <sup>yoik</s> doof</sup> bladoonga Blah cross yoik doof bladoonga
  • Colour on the internet is represented by a six-digit hexadecimal number (prefanced on wikis by "#"). Hex numbers use the letters A to F as extra digits - A is 10, while F is 15. Basically, the first two digits are the amount of red, the next two are the green, and the last two are the blue. So, 000000 is pure black, 7F0000 is 50% red (brown), and FFBF7F is 100% red, 75% green, and 50% blue (tan). While adding colour can sometimes be distracting, there are times when it can have a positive effect. Here are some simple colours:
Colour Slight fade Medium fade Strong fade
FF0000 FF3F3F FF7F7F FFBFBF
FF7F00 FF9F3F FFBF7F FFDFBF
FFFF00 FFFF3F FFFF7F FFFFBF
00FF00 3FFF3F 7FFF7F BFFFBF
00FFFF 3FFFFF 7FFFFF BFFFFF
0000FF 3F3FFF 7F7FFF BFBFFF
FF00FF FF3FFF FF7FFF FFBFFF

Templates/Infoboxes

  • Use if statements to prevent errors when something's not specified. For example, if you want "Unknown" to be displayed if the type parameter is unspecified, use
{{#if:{{{type|}}}|{{{type}}}|Unknown}}
         ^           ^       ^
         |           |       |
        parameter  if true   if false
  • If you need to put a | somewhere, but its location causes things to mess up, use {{!}}.