Facebook Nations Wiki
No edit summary
Line 1: Line 1:
 
{{Protect}}
 
{{Protect}}
Infobox templates can be created or modified using module templates, rather than coding them directly. Place these templates within the infobox template page in place of their corresponding code segments, filling all fields as instructed.<br>
+
Infobox templates can be created or modified using module templates, rather than coding them directly. Place these templates within the infobox template page in place of their corresponding code segments, filling all fields as instructed.<br />
   
 
==Module Templates==
 
==Module Templates==
Line 14: Line 14:
 
A typical modular infobox code will look like this.
 
A typical modular infobox code will look like this.
 
<pre><nowiki>
 
<pre><nowiki>
{{InfoboxStart|Module_Demo|{{{fontsize|}}}|{{{width|}}}|{{{theme|}}}|{{{BG3|}}}|{{{alltxtclr|}}}}}</nowiki>
+
{{InfoboxStart|Module_Demo|{{{fontsize|}}}|{{{width|}}}|{{{theme|}}}|{{{BG3|}}}|{{{alltxtclr|}}}}}
<nowiki>{{InfoboxImage|{{{imageBG|}}}|{{{BG1|}}}|{{{image|}}}}}</nowiki>
+
{{InfoboxImage|{{{imageBG|}}}|{{{BG1|}}}|{{{image|}}}}}
<nowiki>{{InfoboxHeader|{{{headerfont|}}}|{{{theme|}}}|{{{BG1|}}}|{{{name|}}}|{{{hdrtxtclr|}}}}}</nowiki>
+
{{InfoboxHeader|{{{headerfont|}}}|{{{theme|}}}|{{{BG1|}}}|{{{name|}}}|{{{hdrtxtclr|}}}}}
<nowiki>{{InfoboxSubheader|{{{hideb|}}}|{{{subhdrfont|}}}|{{{theme|}}}|{{{BG2|}}}|{{{sbhdrtxtclr|}}}|Biographical Information}}</nowiki>
+
{{InfoboxSubheader|{{{hideb|}}}|{{{subhdrfont|}}}|{{{theme|}}}|{{{BG2|}}}|{{{sbhdrtxtclr|}}}|Biographical Information}}
<nowiki>{{InfoboxField|{{{birth|}}}|{{{BG3|}}}|{{{fldtxtclr|}}}|Date of Birth}}</nowiki>
+
{{InfoboxField|{{{birth|}}}|{{{BG3|}}}|{{{fldtxtclr|}}}|Date of Birth}}
<nowiki>{{InfoboxField|{{{death|}}}|{{{BG3|}}}|{{{fldtxtclr|}}}|Date of Death}}</nowiki>
+
{{InfoboxField|{{{death|}}}|{{{BG3|}}}|{{{fldtxtclr|}}}|Date of Death}}
<nowiki>{{InfoboxSubheader|{{{hidep|}}}|{{{subhdrfont|}}}|{{{theme|}}}|{{{BG2|}}}|{{{sbhdrtxtclr|}}}|Physical Description}}</nowiki>
+
{{InfoboxSubheader|{{{hidep|}}}|{{{subhdrfont|}}}|{{{theme|}}}|{{{BG2|}}}|{{{sbhdrtxtclr|}}}|Physical Description}}
<nowiki>{{InfoboxField|{{{eyes|}}}|{{{BG3|}}}|{{{fldtxtclr|}}}|Eye Color}}</nowiki>
+
{{InfoboxField|{{{eyes|}}}|{{{BG3|}}}|{{{fldtxtclr|}}}|Eye Color}}
<nowiki>{{InfoboxField|{{{hair|}}}|{{{BG3|}}}|{{{fldtxtclr|}}}|Hair Color}}</nowiki>
+
{{InfoboxField|{{{hair|}}}|{{{BG3|}}}|{{{fldtxtclr|}}}|Hair Color}}
<nowiki>{{InfoboxEnd|{{{headerfont|}}}|{{{theme|}}}|{{{BG1|}}}|Module Demo}}</nowiki></pre>
+
{{InfoboxEnd|{{{headerfont|}}}|{{{theme|}}}|{{{BG1|}}}|Module Demo}}</nowiki></pre>
  +
<br>
 
 
The inclusion code (the code included on a page to add the infobox) will be the same as for a standard infobox. The order of the parameters is irrelevant, however, as a general rule display options (colors, width, etc.) should come first, while fields and hide parameters should follow in the order they and their corresponding subheaders will appear.
 
The inclusion code (the code included on a page to add the infobox) will be the same as for a standard infobox. The order of the parameters is irrelevant, however, as a general rule display options (colors, width, etc.) should come first, while fields and hide parameters should follow in the order they and their corresponding subheaders will appear.
   

Revision as of 19:15, 12 August 2011

ProtectedTab

Infobox templates can be created or modified using module templates, rather than coding them directly. Place these templates within the infobox template page in place of their corresponding code segments, filling all fields as instructed.

Module Templates

The templates, in the order they would normally be called, are: (usage instruction on each page)
Template:InfoboxStart
Template:InfoboxImage
Template:InfoboxHeader
Template:InfoboxSubheader (may be repeated)
Template:InfoboxField (may be repeated)
Template:InfoboxEnd

Examples

A typical modular infobox code will look like this.

{{InfoboxStart|Module_Demo|{{{fontsize|}}}|{{{width|}}}|{{{theme|}}}|{{{BG3|}}}|{{{alltxtclr|}}}}}
{{InfoboxImage|{{{imageBG|}}}|{{{BG1|}}}|{{{image|}}}}}
{{InfoboxHeader|{{{headerfont|}}}|{{{theme|}}}|{{{BG1|}}}|{{{name|}}}|{{{hdrtxtclr|}}}}}
{{InfoboxSubheader|{{{hideb|}}}|{{{subhdrfont|}}}|{{{theme|}}}|{{{BG2|}}}|{{{sbhdrtxtclr|}}}|Biographical Information}}
{{InfoboxField|{{{birth|}}}|{{{BG3|}}}|{{{fldtxtclr|}}}|Date of Birth}}
{{InfoboxField|{{{death|}}}|{{{BG3|}}}|{{{fldtxtclr|}}}|Date of Death}}
{{InfoboxSubheader|{{{hidep|}}}|{{{subhdrfont|}}}|{{{theme|}}}|{{{BG2|}}}|{{{sbhdrtxtclr|}}}|Physical Description}}
{{InfoboxField|{{{eyes|}}}|{{{BG3|}}}|{{{fldtxtclr|}}}|Eye Color}}
{{InfoboxField|{{{hair|}}}|{{{BG3|}}}|{{{fldtxtclr|}}}|Hair Color}}
{{InfoboxEnd|{{{headerfont|}}}|{{{theme|}}}|{{{BG1|}}}|Module Demo}}


The inclusion code (the code included on a page to add the infobox) will be the same as for a standard infobox. The order of the parameters is irrelevant, however, as a general rule display options (colors, width, etc.) should come first, while fields and hide parameters should follow in the order they and their corresponding subheaders will appear.

{{Module_Demo
|width=
|theme=
|imageBG=
|BG1=
|BG2=
|BG3=
|alltxtclr=
|hdrtxtclr=
|sbhdrtxtclr=
|fldtxtclr=
|fontsize=
|headerfont=
|subhdrfont=
|image=
|name=
|hideb=
|birth=
|death=
|hidep=
|eyes=
|hair=}}