ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

ModEnc:Templates: Difference between revisions

From ModEnc
Jump to navigation Jump to search
Updated accordingly.
No edit summary
Line 3: Line 3:
If you have ideas for more templates, feel free to suggest them on the [[ModEnc_talk:Templates|talk-page]] or code them yourself. But don't forget to update this list.
If you have ideas for more templates, feel free to suggest them on the [[ModEnc_talk:Templates|talk-page]] or code them yourself. But don't forget to update this list.


==<nowiki>{{categories}}</nowiki>==
Click on a link to see information on how to include the template in question.
Adds the table of categories seen on the main page. Should not be necessary somewhere else.<br>
{{categories}}


==<nowiki>{{disambig}}</nowiki>==
==List==
Adds the disambiguation-notice. Example usage [[AR2|here]]. <br><br>
; [[Template:Disambig]] : Disambiguation template, for disambiguation pages <!--- duh -->
{{disambig}}
; [[Template:Discussed]] : Work in Progress template, for pages under discussion
; [[Template:Flag]] : INI-Flag template, for all INI flag pages
; [[Template:HorizontalBar]] : Horizontal bar template, standard horizontal bar with custom text
; [[Template:Meanings]] : Primary meaning template, for cases where disambiguation would be too much
; [[Template:ModBar]] : Mod information bar template, information sidebar for mod-pages
; [[Template:NotVerified]] : Not verified template, for pages whose information is unverified
; [[Template:RockPatch]] : RockPatch pages template, the standard RockPatch header pointing to the main pages
; [[Template:RockPatchTagRef]] : RockPatch tag reference template, for the RockPatch tag reference <!-- it's sad that people need sentences like these -->
; [[Template:SideBar]] : Side bar template, creating a sidebar which includes another page as content
; [[Template:Wishlist/TOC]] : Wishlist TOC template, the RockPatch Wishlist's table of contents


==Template-Templates==
These are the designs used for ModEnc's templates. If you want to create a new one, please base it on one of these.


==<nowiki>{{discussed|http://www.fullurl.tld}}</nowiki>==
===Block===
Adds the "Work in Progress"-template. The parameter does not accept PHP-variable-parts (i.e. attachments like ?var=value), which renders it useless for forum-posts. I'll think of a solution for this.<br>
This design is used for blocks at the top, like RockPatch's. Include a width="" statement if necessary.
{{discussed|http://www.fullurl.tld}}
<pre>{| align="center" cellspacing="0" cellpadding="4" style="border-collapse: collapse; border: 1px dashed #000000;background:#F0F0F0;"
!Headline here
|-
|Body here
|}</pre>
{| align="center" cellspacing="0" cellpadding="4" style="border-collapse: collapse; border: 1px dashed #000000;background:#F0F0F0;"
!Headline here
|-
|Body here
|}


==<nowiki>{{flag|name=|files=|values=|special=|default=|types=|games=}}</nowiki>==
Adds the standard header for INI-flags. Example usage [[BuildLimit|here]].<br>
If there is no value, put "None"; capitalization is important in this case, as there may also be the value "none", which would be lower-case only.<br>
'''Note:''' This is to be put directly at the page's beginning - no extra horizontal lines, to empty lines, nothing. Either relocate the TOC via <nowiki>__TOC__</nowiki> or disable it entirely via <nowiki>__NOTOC__</nowiki>.
<br><br>
----
{{flag|name=Flag's name|files=Which files can it be used in?|values=Possible values|special=Special values, like -1 for unlimited|default=Default value|types=Can be added to which Types/sections?|games=Works in which games?}}
==<nowiki>{{meanings|Bracket-input}}</nowiki>==
In some cases, a word is strongly associated with a certain meaning, but can still mean something else. In that case, a disambiguation page may not be the best choice - use <nowiki>{{meanings}}</nowiki> instead.<br>
{{meanings|Bracket-input}}
As you can see, <nowiki>{{meanings}}</nowiki> creates a link to a page named exactly as the current page, with an additional bracket; the bracket's content has to be determined by the parameter. On the [[Cost]]-page, this is used to add an additional link to [[Cost (Multiplier)]], but you could also append a real disambiguation page throught the use of <nowiki>{{meanings|disambiguation}}</nowiki>.


==<nowiki>{{NotVerified}}</nowiki>==
{| align="right" width="20%" style="border-collapse: collapse; border: 1px dashed #000000; background:#F0F0F0; margin: 2.8em 0 0 3.2em; padding: 1em 1em 1.5em 1em ;"
Adds the warning header for speculative or incomplete pages.
!Headline
{{NotVerified}}
|-
|Body
|}
===Vertical Bar===
This design is used for sidebars, like the mod-information bar.
<pre>{| align="right" width="20%" style="border-collapse: collapse; border: 1px dashed #000000; background:#F0F0F0; margin: 2.8em 0 0 3.2em; padding: 1em 1em 1.5em 1em ;"
!Headline
|-
|Body
|}</pre>




==<nowiki>{{RockPatch}}</nowiki>==
===Horizontal Bar===
Adds the footer for RockPatch-related pages on ModEnc.
This design is used for simple messages, like the disambiguation one.
{{RockPatch}}
<pre>{|width="100%" style="background:#F0F0F0;border-bottom-color:#000000;border-bottom-style:solid;border-bottom-width:1px;border-top-color:#000000;border-top-style:solid;border-top-width:1px;"
|width="3%"|
|'''''Some custom message.'''''
|}</pre>
{|width="100%" style="background:#F0F0F0;border-bottom-color:#000000;border-bottom-style:solid;border-bottom-width:1px;border-top-color:#000000;border-top-style:solid;border-top-width:1px;"
|width="3%"|
|'''''Some custom message.'''''
|}


==<nowiki>{{Wishlist/TOC}}</nowiki>==
 
Adds the wishlist Table Of Contents.
===Further content===
{{Wishlist/TOC}}
In addition to one of the above layouts, this should be included in templates:
<pre>&lt;includeonly&gt;[[Category:CategoryName]]&lt;/includeonly&gt;
&lt;noinclude&gt;Usage:
&lt;pre&gt;&lt;/pre&gt;
Copy-paste the code above and use as instructed.&lt;br&gt;
Template includes Category:CategoryName automatically.
&lt;/noinclude&gt;</pre>
Use the &lt;includeonly&gt; block to include a category to which all pages including this template will be added, and the &lt;noinclude&gt; part to give a tutorial on how to use this template. Use the &lt;pre&gt; part to post a blank, copy-paste ready version of the template.
 
Look at already existing template-pages for examples.

Revision as of 21:07, 2 May 2006

This is a list of Templates available on ModEnc. It will be updated everytime a new one is added. Usage of these templates is simple: Just put {{templatename}} somewhere in a page's text, and it gets replaced by the template. In some cases, you have to give a parameter.

If you have ideas for more templates, feel free to suggest them on the talk-page or code them yourself. But don't forget to update this list.

Click on a link to see information on how to include the template in question.

List

Template:Disambig
Disambiguation template, for disambiguation pages
Template:Discussed
Work in Progress template, for pages under discussion
Template:Flag
INI-Flag template, for all INI flag pages
Template:HorizontalBar
Horizontal bar template, standard horizontal bar with custom text
Template:Meanings
Primary meaning template, for cases where disambiguation would be too much
Template:ModBar
Mod information bar template, information sidebar for mod-pages
Template:NotVerified
Not verified template, for pages whose information is unverified
Template:RockPatch
RockPatch pages template, the standard RockPatch header pointing to the main pages
Template:RockPatchTagRef
RockPatch tag reference template, for the RockPatch tag reference
Template:SideBar
Side bar template, creating a sidebar which includes another page as content
Template:Wishlist/TOC
Wishlist TOC template, the RockPatch Wishlist's table of contents

Template-Templates

These are the designs used for ModEnc's templates. If you want to create a new one, please base it on one of these.

Block

This design is used for blocks at the top, like RockPatch's. Include a width="" statement if necessary.

{| align="center" cellspacing="0" cellpadding="4" style="border-collapse: collapse; border: 1px dashed #000000;background:#F0F0F0;"
!Headline here
|-
|Body here
|}
Headline here
Body here


Headline
Body

Vertical Bar

This design is used for sidebars, like the mod-information bar.

{| align="right" width="20%" style="border-collapse: collapse; border: 1px dashed #000000; background:#F0F0F0; margin: 2.8em 0 0 3.2em; padding: 1em 1em 1.5em 1em ;" 
!Headline
|-
|Body
|}


Horizontal Bar

This design is used for simple messages, like the disambiguation one.

{|width="100%" style="background:#F0F0F0;border-bottom-color:#000000;border-bottom-style:solid;border-bottom-width:1px;border-top-color:#000000;border-top-style:solid;border-top-width:1px;"
|width="3%"|
|'''''Some custom message.'''''
|}
Some custom message.


Further content

In addition to one of the above layouts, this should be included in templates:

<includeonly>[[Category:CategoryName]]</includeonly>
<noinclude>Usage:
<pre></pre>
Copy-paste the code above and use as instructed.<br>
Template includes Category:CategoryName automatically.
</noinclude>

Use the <includeonly> block to include a category to which all pages including this template will be added, and the <noinclude> part to give a tutorial on how to use this template. Use the <pre> part to post a blank, copy-paste ready version of the template.

Look at already existing template-pages for examples.