Template:Power-box

From xat wiki
Revision as of 13:31, 30 June 2015 by Andre (talk | contribs) (Created page with "<noinclude> == Introduction == This template is the new basis for articles on powers to: *Keep a consistent layout and allow it to be changed without having to edit 344 (and c...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Introduction

This template is the new basis for articles on powers to:

  • Keep a consistent layout and allow it to be changed without having to edit 344 (and counting) articles
  • Have untranslatable stuff preset and save space
  • Make adding new articles as fast and efficient and possible.

This template was made without parserfunctions, so it may seem a little complicated at first (it's definitly more complicated than it should be, but I was told parserfunctions are not a necessity).

With this template, I also made it possible to include more than 10 smiley previews under articles (up to 30) and this is the part what makes this so complicated, I'll describe why below.

Instructions

Attributes:

  • power - name of the power
  • heading - short description of a power
  • info - detailed information of a power
  • pw1-pw3 - there are 3 tables total for smiley previews, each containing 10 smilies. It's necessary to disable these tables if there aren't sufficient amount of smilies present for a power. To disable a table, simpy add |pw3= on the first line (for consistency) of the template:
{{power-box
|pw3=

To disable 2 tables, use:

{{power-box
|pw3=|pw2=

And if no smilies exist (appart from power smiley itself), add them all the way to 1.

  • s1-s30 - As described above, the total amount of smiley previews is 30, if there aren't as many, then appropriate amount must be disabled on the third line (for consistency), for example, if there are a total of 11 smilies for a power, then we must disable 1 table and 19 smilies:
{{power-box
|pw3=
|s30=|s29=|s28=|s27=|s26=|s25=|s24=|s23=|s22=|s21=|s20=|s19=|s18=|s17=|s16=|s15=|s14=|s13=|s12=
  • smiley1-30 - used for listing smilies for preview, by continuing the above example, where 11 smilies are available:
{{power-box
|pw3=
|s30=|s29=|s28=|s27=|s26=|s25=|s24=|s23=|s22=|s21=|s20=|s19=|s18=|s17=|s16=|s15=|s14=|s13=|s12=
|smiley1=smileycodegoeshere
|smiley2=smileycodegoeshere
|smiley3=smileycodegoeshere
|smiley4=smileycodegoeshere
|smiley5=smileycodegoeshere
|smiley6=smileycodegoeshere
|smiley7=smileycodegoeshere
|smiley8=smileycodegoeshere
|smiley9=smileycodegoeshere
|smiley10=smileycodegoeshere
|smiley11=smileycodegoeshere
  • pawns - list of limited (or not) pawns/hats (optional)

Base

This base can be used for easy copy-paste editing and this should also give a better understanding on how to edit it.

{{power-box
|pw3=|pw2=
|s30=|s29=|s28=|s27=|s26=|s25=|s24=|s23=|s22=|s21=|s20=|s19=|s18=|s17=|s16=|s15=|s14=|s13=|s12=|s11=|s10=|s9=
|smiley1=smileycodegoeshere
|smiley2=smileycodegoeshere
|smiley3=smileycodegoeshere
|smiley4=smileycodegoeshere
|smiley5=smileycodegoeshere
|smiley6=smileycodegoeshere
|smiley7=smileycodegoeshere
|smiley8=smileycodegoeshere
|name=
|heading= <translate> 
HEADING GOES HERE
</translate>
|info= <translate> 
MAIN CONTENT GOES HERE
</translate>
|pawns= <translate> 
INFO ON LIMITED PAWNS GOES HERE IF THERE ARE ANY
</translate>
}}

Finally

Use the preview button to make sure the article has no errors in it.

That's it for now. My dear editors, if you have any questions, contact me on facebook, chat or e-mail me at [email protected]