Template:Factions/doc: Difference between revisions

From MediaWiki
Jump to navigationJump to search
Derik (talk | contribs)
No edit summary
Dinobot Scorn (talk | contribs)
 
(72 intermediate revisions by 32 users not shown)
Line 1: Line 1:
<p>'''<tt>{{factions}}</tt>''' creates a small 30x30 clickable icon of a character's faction symbol to the right of the page title.  Up to 10 icons can be created this way.<ref>10 is an arbitrary number.  Arbitrary-length MediaWiki templates like this are generally encouraged to have no more than 20 parameters though.  And really... if a character has more than 10 factions, the icons cease to communicate information and simply become noise.</ref>
'''<tt><nowiki>{{factions}}</nowiki></tt>''' creates a small 30x30 clickable icon of a character's faction symbol to the right of the page title.  Up to 10 icons can be created this way.<ref>10 is an arbitrary number.  Arbitrary-length MediaWiki templates like this are generally encouraged to have no more than 20 parameters though.  And really... if a character has more than 10 factions, the icons cease to communicate information and simply become noise.</ref>
</p>
<div style="width: 90%; margin: 0 auto .2em auto; background-color:#efefef; border: 2px solid #eeeeee; padding: 2px; text-align: left;">'''Note:''' ''This template is based on an almost-identical template on [[wikia:starwars:Template:Eras|Wookiepedia]] used to place "Era" icons in the titlebar.''</div>
<div style="width: 90%; margin: 0 auto .2em auto; background-color:#efefef; border: 2px solid #eeeeee; padding: 2px; text-align: left;">'''Note:''' ''This template is based on an almost-identical template on [http://starwars.wikia.com/wiki/Template:Eras Wookiepedia] used to place "Era" icons in the titlebar.''</div>
<pre>{{factions
<pre>{{factions
|Autobot
|autobot
|Decepticon}}
|decepticon}}
</pre>
</pre>
<div id="title-factionicons" style="float: right; display: none;"><div style="position: relative;">[[Autobot|<img alt="" src="/w2/images2/thumb/f/fe/Symbol_autobot_reg.png/30px-Symbol_autobot_reg.png" width="30" height="30" border="0"/>]]</div><div style="position: relative;">[[Decepticon|<img alt="" src="/w2/images2/thumb/d/d7/Symbol_decept_reg.jpg/28px-Symbol_decept_reg.jpg" width="28" height="30" border="0"/>]]</div><div style="position: relative;">[[Predacon|<img alt="" src="/w2/images2/thumb/0/01/Predacon_symbol.png/24px-Predacon_symbol.png" width="24" height="30" border="0"/>]]</div><div style="position: relative;">[[Maximal|<img alt="" src="/w2/images2/thumb/3/33/Maximal_symbol.png/23px-Maximal_symbol.png" width="23" height="30" border="0"/>]]</div><div style="position: relative;">[[Vehicon|<img alt="" src="/w2/images2/thumb/5/58/Vehicon_symbol.png/30px-Vehicon_symbol.png" width="30" height="29" border="0"/>]]</div></div>
{{factions|autobot|decepticon}}
<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>


<ul>
==Faction icon names==
<li class="toclevel-1"><a href="#Faction_icon_names"><span class="tocnumber">1</span> <span class="toctext">Faction icon names</span></a></li>
Faction names used by this template are lowercase.  Any mis-typed text not recognized as the template will be rendered as text.  (You will notice, it's hard to miss.)
<li class="toclevel-1"><a href="#Custom_faction_icons"><span class="tocnumber">2</span> <span class="toctext">Custom faction icons</span></a></li>
<li class="toclevel-1"><a href="#General_considerations"><span class="tocnumber">3</span> <span class="toctext">General considerations</span></a></li>
<li class="toclevel-1"><a href="#Technical_notes"><span class="tocnumber">4</span> <span class="toctext">Technical notes</span></a></li>


<li class="toclevel-1"><a href="#Trivia"><span class="tocnumber">5</span> <span class="toctext">Trivia</span></a></li>
To add additional names, first edit {{tl|Factions/icons}} using the syntax described there, then add to this list.
<li class="toclevel-1"><a href="#Footnotes"><span class="tocnumber">6</span> <span class="toctext">Footnotes</span></a></li>
{| class="prettytable sortable" border="1"
</ul>
|-
</td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
!FACTION NAME
<a name="Faction_icon_names"></a><h2><span class="editsection">[[[Template:Factions/doc|edit]]]</span> <span class="mw-headline">Faction icon names</span></h2>
!TEMPLATE TEXT
!ICON
|-
|Autobot||autobot||{{Factions/icons|option=autobot}}
|-
|Decepticon||decepticon||{{Factions/icons|option=decepticon}}
|-
|Optimus ||optimus ||{{Factions/icons|option=optimus}}
|-
|Malignus ||malignus ||{{Factions/icons|option=malignus }}
|-
|Quintesson ||quintesson ||{{Factions/icons|option=quintesson }}
|-
|War for Cybertron Quintesson ||quintessonwfc ||{{Factions/icons|option=quintessonwfc }}
|-
|Autobot Generation 2||autobotg2 ||{{Factions/icons|option=autobotg2 }}
|-
|Decepticon Generation 2||decepticong2 ||{{Factions/icons|option=decepticong2 }}
|-
|Cybertronian Generation 2 ||cybEmpireG2 ||{{Factions/icons|option=cybEmpireG2 }}
|-
|Cybertron Alliance||allianceg2 ||{{Factions/icons|option=allianceg2 }}
|-
|Maximal ||maximal ||{{Factions/icons|option=maximal }}
|-
|Predacon ||predacon ||{{Factions/icons|option=predacon }}
|-
|Maximal (Beast Machines)||maximalbm ||{{Factions/icons|option=maximalbm }}
|-
|Vehicon ||vehicon ||{{Factions/icons|option=vehicon }}
|-
|Dinobot ||dinobot ||{{Factions/icons|option=dinobot }}
|-
|Mutant ||mutant ||{{Factions/icons|option=mutant }}
|-
|Wreckers ||wreckers ||{{Factions/icons|option=wreckers }}
|-
|Mini-Con ||minicon ||{{Factions/icons|option=minicon }}
|-
|Unicron-allied ||unicron ||{{Factions/icons|option=unicron }}
|-
|Unicron (faction)||unicronfact ||{{Factions/icons|option=unicronfact }}
|-
|Blentron sub-group ||blentron ||{{Factions/icons|option=blentron }}
|-
|Velocitron ||velocitron ||{{Factions/icons|option=velocitron }}
|-
|Jungle Planet ||jungleplanet ||{{Factions/icons|option=jungleplanet }}
|-
|Earth ||cybearth ||{{Factions/icons|option=cybearth }}
|-
|Gigantion ||gigantion ||{{Factions/icons|option=gigantion }}
|-
|Ultracon ||ultracon ||{{Factions/icons|option=ultracon }}
|-
|Elite Guard ||eliteguard ||{{Factions/icons|option=eliteguard }}
|-
|Sector Seven||sector7 ||{{Factions/icons|option=sector7 }}
|-
|Doctor Morocco||drmorocco ||{{Factions/icons|option=drmorocco }}
|-
|Autobot (TransTech)||ttautobot ||{{Factions/icons|option=ttautobot }}
|-
|Decepticon (TransTech)||ttdecepticon ||{{Factions/icons|option=ttdecepticon }}
|-
|Autobot (Shattered Glass)||sgAutobot ||{{Factions/icons|option=sgAutobot }}
|-
|Decepticon (Shattered Glass)||sgDecepticon ||{{Factions/icons|option=sgDecepticon }}
|-
|G.I. Joe ||gijoe ||{{Factions/icons|option=gijoe }}
|-
|Cobra ||cobra ||{{Factions/icons|option=cobra }}
|-
|EDC ||edc ||{{Factions/icons|option=edc }}
|-
|First Transformers||1stTF ||{{Factions/icons|option=1stTF }}
|-
|Go-Bots||go-bot1 ||{{Factions/icons|option=go-bot1 }}
|-
|Go-Bots||go-bot2 ||{{Factions/icons|option=go-bot2 }}
|-
|Galactic Republic||galacticrepublic ||{{Factions/icons|option=galacticrepublic }}
|-
|Rebel Alliance||rebelalliance ||{{Factions/icons|option=rebelalliance }}
|-
|Empire||empire ||{{Factions/icons|option=empire }}
|-
|NEST||NEST||{{Factions/icons|option=NEST }}
|-
|Unit:E||unite||{{Factions/icons|option=unite}}
|-
|Kiss Players Autobot||kiss||{{Factions/icons|option=kiss }}
|-
|Kiss Players Decepticon||kisscon||{{Factions/icons|option=kisscon }}
|-
|Protectors||protectors||{{Factions/icons|option=protector}}
|-
|Hall of Fame inductees (real-life)||hofgold||{{Factions/icons|option=hofgold}}
|-
|Hall of Fame inductees (characters)||hofsilver||{{Factions/icons|option=hofsilver}}
|-
|Star Seekers||starseeker||{{Factions/icons|option=starseeker}}
|-
|Lightning Strike Coalition||lightningstrike||{{Factions/icons|option=lightningstrike}}
|-
|Predacon (Prime)||predaconprime||{{Factions/icons|option=predaconprime}}
|-
|Rescue Bots||rescuebot||{{Factions/icons|option=rescuebot}}
|-
|Ammonite||ammonite||{{Factions/icons|option=ammonite}}
|-
|KSI||ksi||{{Factions/icons|option=ksi}}
|-
|Autobird||autobird||{{Factions/icons|option=autobird}}
|-
|Deceptihog||deceptihog||{{Factions/icons|option=deceptihog}}
|-
|Functionist Council||functionist||{{Factions/icons|option=functionist}}
|-
|Animorph||animorph||{{Factions/icons|option=Animorph}}
|-
|Toys"R"Us||TRU||{{Factions/icons|option=TRU}}
|-
|Cybertronian Knights||knight||{{Factions/icons|option=knight}}
|-
|Combatron||combatron||{{Factions/icons|option=combatron}}
|-
|Offworlder Zone Security Administration||ozsa||{{Factions/icons|option=ozsa}}
|-
|Team Stunticon||teamstunticon||{{Factions/icons|option=teamstunticon}}
|-
|Stunticon (Prime)||primestunticon||{{Factions/icons|option=primestunticon}}
|-
|Ghostbusters||ghostbusters||{{Factions/icons|option=ghostbusters}}
|-
|Mercenary||mercenary||{{Factions/icons|option=mercenary}}
|-
|Primus Vanguard||primusvanguard||{{Factions/icons|option=primusvanguard}}
|-
|Straxus||straxus||{{Factions/icons|option=straxus}}
|-
|Wreckers (IDW)||wreckersidw||{{Factions/icons|option=wreckersidw}}
|-
|Terrorcon (ROTB)||terrorcon||{{Factions/icons|option=terrorcon}}
|-
|Mayhem Attack Squad||mayhem||{{Factions/icons|option=mayhem}}
|-
|Obsolete<ref name="obsolete">These template texts are obsolete. Please use the standard "autobot" and "decepticon" texts.</ref>||autobotfilm||{{Factions/icons|option=autobotfilm}}
|-
|Obsolete<ref name="obsolete" />||decepticonfilm||{{Factions/icons|option=decepticonfilm}}
|}


<p>Faction names used by this template are case-insensitive.
==Custom faction icons==
</p><p>Any mis-typed text not recognized as the template will be rendered as text.  (You will notice, it's hard to miss.)
There are some characters who have their ''own'' faction symbol, (example: [[Moon (BW)|Moon]]) essentially used nowhere else.  Rather than clutter the template with these, it is possible to declare a ''custom'' faction icon via the following format;
</p>
<table class="wikitable">
 
<tr>
<th>FACTION NAME </th><th> TEMPLATE TEXT </th><th> ICON
</th></tr>
<tr>
<th>Autobot </th><th> autobot </th><th> <div style="position: relative;">[[Autobot|<img alt="" src="/w2/images2/thumb/f/fe/Symbol_autobot_reg.png/30px-Symbol_autobot_reg.png" width="30" height="30" border="0"/>]]</div>
 
</th></tr>
<tr>
<th>Decepticon </th><th> decepticon </th><th> <div style="position: relative;">[[Decepticon|<img alt="" src="/w2/images2/thumb/d/d7/Symbol_decept_reg.jpg/28px-Symbol_decept_reg.jpg" width="28" height="30" border="0"/>]]</div>
</th></tr>
<tr>
<th>Optimus </th><th> optimus </th><th> <div style="position: relative;">[[Optimus|<img alt="" src="/w2/images2/thumb/7/7e/Optimus_symbol.png/28px-Optimus_symbol.png" width="28" height="29" border="0"/>]]</div>
</th></tr>
<tr>
<th>Malignus </th><th> malignus </th><th> <div style="position: relative;">[[Malignus|<img alt="" src="/w2/images2/thumb/7/7c/Malignus_symbol.png/29px-Malignus_symbol.png" width="29" height="30" border="0"/>]]</div>
 
</th></tr>
<tr>
<th>Quintesson </th><th> quintesson </th><th> <div style="position: relative;">[[Quintesson|<img alt="" src="/w2/images2/thumb/b/b0/Quintesson_symbol.png/25px-Quintesson_symbol.png" width="25" height="30" border="0"/>]]</div>
</th></tr>
<tr>
<th>Autobot Generation 2 </th><th> autobotg2 </th><th> <div style="position: relative;">[[Autobot|<img alt="" src="/w2/images2/thumb/0/09/Auto-g2.png/30px-Auto-g2.png" width="30" height="26" border="0"/>]]</div>
</th></tr>
<tr>
<th>Decepticon Generation 2 </th><th> decepticong2 </th><th> <div style="position: relative;">[[Decepticon|<img alt="" src="/w2/images2/thumb/a/a9/Con-g2.png/30px-Con-g2.png" width="30" height="29" border="0"/>]]</div>
 
</th></tr>
<tr>
<th>Cybertronian Generation 2 </th><th> cybEmpireG2 </th><th> <div style="position: relative;">[[Cybertronian Empire|<img alt="" src="/w2/images2/thumb/9/9f/Cybertronian.png/30px-Cybertronian.png" width="30" height="29" border="0"/>]]</div>
</th></tr>
<tr>
<th>Maximal </th><th> maximal </th><th> <div style="position: relative;">[[Maximal|<img alt="" src="/w2/images2/thumb/3/33/Maximal_symbol.png/23px-Maximal_symbol.png" width="23" height="30" border="0"/>]]</div>
</th></tr>
<tr>
<th>Predacon (Beast Wars)</th><th> predacon </th><th> <div style="position: relative;">[[Predacon|<img alt="" src="/w2/images2/thumb/0/01/Predacon_symbol.png/24px-Predacon_symbol.png" width="24" height="30" border="0"/>]]</div>
 
</th></tr>
<tr>
<th>Blendtron </th><th> blendtron </th><th> <div style="position: relative;">[[Blendtron|<img alt="" src="/w2/images2/thumb/c/cb/Blendtron_symbol.png/29px-Blendtron_symbol.png" width="29" height="30" border="0"/>]]</div>
</th></tr>
<tr>
<th>Maximal (Beast Machines) </th><th> maximalbm </th><th> <div style="position: relative;">[[Maximal|<img alt="" src="/w2/images2/thumb/5/5c/Maximal_symbol_bm.png/19px-Maximal_symbol_bm.png" width="19" height="30" border="0"/>]]</div>
</th></tr>
<tr>
<th>Vehicon </th><th> vehicon </th><th> <div style="position: relative;">[[Vehicon|<img alt="" src="/w2/images2/thumb/5/58/Vehicon_symbol.png/30px-Vehicon_symbol.png" width="30" height="29" border="0"/>]]</div>
 
</th></tr>
<tr>
<th>Dinobot </th><th> dinobot </th><th> <div style="position: relative;">[[Dinobot|<img alt="" src="/w2/images2/thumb/6/6e/Dinobots_symbol.png/30px-Dinobots_symbol.png" width="30" height="30" border="0"/>]]</div>
</th></tr>
<tr>
<th>Mutant </th><th> mutant </th><th> <div style="position: relative;">[[Filthy muties|<img alt="" src="/w2/images2/thumb/8/8b/Mutants_symbol.png/25px-Mutants_symbol.png" width="25" height="29" border="0"/>]]</div>
</th></tr>
<tr>
<th>Predacon (Robots in Disguise) </th><th> predaconrid </th><th> <div style="position: relative;">[[Predacon|<img alt="" src="/w2/images2/thumb/0/01/Predacon_symbol.png/24px-Predacon_symbol.png" width="24" height="30" border="0"/>]]</div>
 
</th></tr>
<tr>
<th>Wreckers </th><th> wreckers </th><th> <div style="position: relative;">[[Wrecker|<img alt="" src="/w2/images2/thumb/d/d8/Wreckers_symbol.png/30px-Wreckers_symbol.png" width="30" height="26" border="0"/>]]</div>
</th></tr>
<tr>
<th>Mini-Con </th><th> minicon </th><th> <div style="position: relative;">[[Mini-Con|<img alt="" src="/w2/images2/thumb/d/d5/Minicon_symbol.png/30px-Minicon_symbol.png" width="30" height="30" border="0"/>]]</div>
</th></tr>
<tr>
<th>Unicron </th><th> unicron </th><th> <div style="position: relative;">[[Unicron|<img alt="" src="/w2/images2/thumb/a/a8/Unicronsymbol_dwmtmte.png/30px-Unicronsymbol_dwmtmte.png" width="30" height="30" border="0"/>]]</div>
 
</th></tr>
<tr>
<th>Velocitron </th><th> velocitron </th><th> <div style="position: relative;">[[Velocitron|<img alt="" src="/w2/images2/thumb/0/05/Cyber_Key_symbol_Velocitron.png/30px-Cyber_Key_symbol_Velocitron.png" width="30" height="24" border="0"/>]]</div>
</th></tr>
<tr>
<th>Jungle Planet </th><th> jungleplanet </th><th> <div style="position: relative;">[[Jungle Planet|<img alt="" src="/w2/images2/thumb/2/23/Cyber_Key_symbol_Jungle_Planet.png/30px-Cyber_Key_symbol_Jungle_Planet.png" width="30" height="30" border="0"/>]]</div>
</th></tr>
<tr>
<th>Gigantion </th><th> gigantion </th><th> <div style="position: relative;">[[Gigantion|<img alt="" src="/w2/images2/thumb/1/12/Cyber_Key_symbol_Gigantion.png/30px-Cyber_Key_symbol_Gigantion.png" width="30" height="30" border="0"/>]]</div>
 
</th></tr>
<tr>
<th>Ultracon </th><th> ultracon </th><th> <div style="position: relative;">[[Ultracon|<img alt="" src="/w2/images2/thumb/4/4b/Ultracon_symbol.png/24px-Ultracon_symbol.png" width="24" height="29" border="0"/>]]</div>
</th></tr>
<tr>
<th>Sector Seven</th><th> sector7 </th><th> <div style="position: relative;">[[Sector Seven|<img alt="" src="/w2/images2/thumb/5/52/Sector7logo.png/30px-Sector7logo.png" width="30" height="24" border="0"/>]]</div>
</th></tr>
<tr>
<th>Autobot (TransTech) </th><th> ttautobot </th><th> <div style="position: relative;">[[TransTech|<img alt="" src="/w2/images2/thumb/9/92/Transtech_Autobot_symbol.png/28px-Transtech_Autobot_symbol.png" width="28" height="30" border="0"/>]]</div>
 
</th></tr>
<tr>
<th>Decepticon (TransTech) </th><th> ttdecepticon </th><th> <div style="position: relative;">[[TransTech|<img alt="" src="/w2/images2/thumb/1/1d/Transtech_Decepticon_symbol.png/20px-Transtech_Decepticon_symbol.png" width="20" height="29" border="0"/>]]</div>
</th></tr>
<tr>
<th>Autobot (Shattered Glass) </th><th> sgAutobot </th><th> <div style="position: relative;">[[Autobot|<img alt="" src="/w2/images2/thumb/c/c4/Autobot_Shattered_Glass.png/30px-Autobot_Shattered_Glass.png" width="30" height="30" border="0"/>]]</div>
</th></tr>
<tr>
<th>Decepticon (Shattered Glass) </th><th> sgDecepticon </th><th> <div style="position: relative;">[[Decepticon|<img alt="" src="/w2/images2/thumb/3/3e/Decepticon_Shattered_Glass.png/28px-Decepticon_Shattered_Glass.png" width="28" height="30" border="0"/>]]</div>
 
</th></tr>
<tr>
<th>G.I. Joe </th><th> gijoe </th><th> <div style="position: relative;">[[G.I. Joe|<img alt="" src="/w2/images2/thumb/5/58/Joelogo.gif/90px-Joelogo.gif" width="90" height="23" border="0"/>]]</div>
</th></tr>
<tr>
<th>Cobra </th><th> cobra </th><th> <div style="position: relative;">[[Can the world oppose deadly Eskimos?|<img alt="" src="/w2/images2/thumb/0/09/Cobralogo.gif/30px-Cobralogo.gif" width="30" height="27" border="0"/>]]</div>
</th></tr>
<tr>
<th>EDC </th><th> edc </th><th> <div style="position: relative;">[[Earth Defense Command|<img alt="" src="/w2/images2/thumb/b/b4/EDC_Symbol.png/30px-EDC_Symbol.png" width="30" height="25" border="0"/>]]</div>
 
</th></tr>
<tr>
<th>First Transformers </th><th> 1stTF </th><th> <div style="position: relative;">[[First Transformers|<img alt="" src="/w2/images2/thumb/f/f0/Myfirst_symbol.png/30px-Myfirst_symbol.png" width="30" height="26" border="0"/>]]</div>
</th></tr>
<tr>
<th>Playskool Go-Bots</th><th> gogogobot </th><th> <div style="position: relative;">[[Go GO GO-BOTS!|<img alt="" src="/w2/images2/thumb/b/b6/Playschool_Go-Bots_G.png/28px-Playschool_Go-Bots_G.png" width="28" height="30" border="0"/>]]</div>
</th></tr></table>
<a name="Custom_faction_icons"></a><h2><span class="editsection">[[[Template:Factions/doc|edit]]]</span> <span class="mw-headline">Custom faction icons</span></h2>
 
<p>There are some characters who have their ''own'' faction symbol, (example: [[Moon (BWII)|Moon]]) essentially used nowhere else.  Rather than clutter the template with these, it is possible to declare a ''custom'' faction icon via the following format;
</p>
<pre>{{factions/icons
<pre>{{factions/icons
|custom=Moon symbol clean.png    -REQUIRED, filename of image
|custom=Moon symbol clean.png    -REQUIRED, filename of image
Line 148: Line 173:
|cLink=Celestial    -REQUIRED, Page the image links to.
|cLink=Celestial    -REQUIRED, Page the image links to.
|cPretty=Celestials    -Optional, mouseover text.  Will use the link if not supplied.
|cPretty=Celestials    -Optional, mouseover text.  Will use the link if not supplied.
}}</pre>
}}</pre>This is, in turn, included along with the other non-custom tags.
<p>This is, in turn, included along with the other non-custom tags.
</p>
<pre>{{factions
<pre>{{factions
|{{factions/icons|custom=Moon symbol clean.png|cLink=Celestial|cPretty=Celestials}}
|{{factions/icons|custom=Moon symbol clean.png|cLink=Celestial|cPretty=Celestials}}
|maximal
|maximal
}}</pre>
}}</pre>
<a name="General_considerations"></a><h2><span class="editsection">[[[Template:Factions/doc|edit]]]</span> <span class="mw-headline">General considerations</span></h2>
==General considerations==
As of this writing <sup>(Mar-28-19)</sup> this is the only template on TFWiki that ''requires'' Javascript to function.  The icons in question are created within a non-rendering &lt;div> tag, which is then copied into the titlebar when the page finishes loading.  As a result, the {{factions}} template doesn't HAVE to be at the page... but by convention it always ''should'' be. Between 0.5 - 1.0% of internet surfers have either disabled Javascript or access the internet in a way that does not support it.  Those users will not be able to ''see'' these  faction icons.  ''These faction icons are intended to serve as a convenient visual shorthand for information '''already''' in the article, and are not a primary means of communicating that information.  Any information presented by these icons should '''also''' be present in the article text.''


<p>As of this writing<sup>(Jan-16-09)</sup>, this is the only template on TFWiki that ''requires'' Javascript to function.  The icons in question are created within a non-rendering <div> tag, which is then copied into the titlebar when the page finishes loading. 
==Technical notes==
</p><p>As a result, the {{factions}} template doesn't HAVE to be at the page... but by convention it always ''should'' be.
</p><p>Between 0.5 - 1.0% of internet surfers have either disabled Javascript or access the internet in a way that does not support it.  Those users will not be able to ''see'' these  faction icons.  ''These faction icons are intended to serve as a convenient visual shorthand for information '''already''' in the article, and are not a primary means of communicating that information.  Any information presented by these icons should '''also''' be present in the article text.''
 
</p>
<a name="Technical_notes"></a><h2><span class="editsection">[[[Template:Factions/doc|edit]]]</span> <span class="mw-headline">Technical notes</span></h2>
*  The Javascript function associated with this template is called ''showFactions()''.
*  The Javascript function associated with this template is called ''showFactions()''.
*  The non-rendering <div> has an id of "title-factionicons."  There is a single CSS rule associated with this ID-- causing the <imagemap> <div>s to render inline rather than as blocks.
*  The non-rendering &lt;div> has an id of "title-factionicons."  There is a single CSS rule associated with this ID-- causing the <nowiki><imagemap></nowiki> &lt;div>s to render inline rather than as blocks.


*  The "custom" imagemaps use "[http://www.mediawiki.org/wiki/Help:Magic_words#Miscellaneous #tag: syntax]" to allow parameters to be passed to them.  (Don't think this will ever have to be edited.)
*  The "custom" imagemaps use "[http://www.mediawiki.org/wiki/Help:Magic_words#Miscellaneous #tag: syntax]" to allow parameters to be passed to them.  (Don't think this will ever have to be edited.)
*  The icons themselves are generated by the "[[Template:Factions/icons]]" sub-page.
*  The icons themselves are generated by the "[[Template:Factions/icons]]" sub-page.
<a name="Trivia"></a><h2><span class="editsection">[[[Template:Factions/doc|edit]]]</span> <span class="mw-headline">Trivia</span></h2>
 
==Trivia==
*  The [[Template talk:Factions|development process]] of this template included a truly ''spectacular'' recursion error that knocked the entire wiki offline as its stack overflowed, repeatedly and <small>we think</small> corrupted link-table entries that couldn't be resolved without deleting the whole thing and starting from scratch.  That is why the current version of the template exists in a 'dumb' (non-recursive) form.  ''Bad [[User:Derik|Derik]]!'''
*  The [[Template talk:Factions|development process]] of this template included a truly ''spectacular'' recursion error that knocked the entire wiki offline as its stack overflowed, repeatedly and <small>we think</small> corrupted link-table entries that couldn't be resolved without deleting the whole thing and starting from scratch.  That is why the current version of the template exists in a 'dumb' (non-recursive) form.  ''Bad [[User:Derik|Derik]]!'''


==Footnotes==
==Footnotes==
<references/>
<references/><noinclude>[[Category:Externalized documentation]]</noinclude>
 
 
<noinclude>[[Category: Externalized documentation]]</noinclude>

Latest revision as of 22:23, 22 October 2024

{{factions}} creates a small 30x30 clickable icon of a character's faction symbol to the right of the page title. Up to 10 icons can be created this way.[1]

Note: This template is based on an almost-identical template on Wookiepedia used to place "Era" icons in the titlebar.
{{factions
|autobot
|decepticon}}

Faction icon names

[edit]

Faction names used by this template are lowercase. Any mis-typed text not recognized as the template will be rendered as text. (You will notice, it's hard to miss.)

To add additional names, first edit {{Factions/icons}} using the syntax described there, then add to this list.

FACTION NAME TEMPLATE TEXT ICON
Autobot autobot
Decepticon decepticon
Optimus optimus
Malignus malignus
Quintesson quintesson
War for Cybertron Quintesson quintessonwfc
Autobot Generation 2 autobotg2
Decepticon Generation 2 decepticong2
Cybertronian Generation 2 cybEmpireG2
Cybertron Alliance allianceg2
Maximal maximal
Predacon predacon
Maximal (Beast Machines) maximalbm
Vehicon vehicon
Dinobot dinobot
Mutant mutant
Wreckers wreckers
Mini-Con minicon
Unicron-allied unicron
Unicron (faction) unicronfact
Blentron sub-group blentron
Velocitron velocitron
Jungle Planet jungleplanet
Earth cybearth
Gigantion gigantion
Ultracon ultracon
Elite Guard eliteguard
Sector Seven sector7
Doctor Morocco drmorocco
Autobot (TransTech) ttautobot
Decepticon (TransTech) ttdecepticon
Autobot (Shattered Glass) sgAutobot
Decepticon (Shattered Glass) sgDecepticon
G.I. Joe gijoe
Cobra cobra
EDC edc
First Transformers 1stTF
Go-Bots go-bot1
Go-Bots go-bot2
Galactic Republic galacticrepublic
Rebel Alliance rebelalliance
Empire empire
NEST NEST
Unit:E unite
Kiss Players Autobot kiss
Kiss Players Decepticon kisscon
Protectors protectors
Hall of Fame inductees (real-life) hofgold
Hall of Fame inductees (characters) hofsilver
Star Seekers starseeker
Lightning Strike Coalition lightningstrike
Predacon (Prime) predaconprime
Rescue Bots rescuebot
Ammonite ammonite
KSI ksi
Autobird autobird
Deceptihog deceptihog
Functionist Council functionist
Animorph animorph
Toys"R"Us TRU
Cybertronian Knights knight
Combatron combatron
Offworlder Zone Security Administration ozsa
Team Stunticon teamstunticon
Stunticon (Prime) primestunticon
Ghostbusters ghostbusters
Mercenary mercenary
Primus Vanguard primusvanguard
Straxus straxus
Wreckers (IDW) wreckersidw
Terrorcon (ROTB) terrorcon
Mayhem Attack Squad mayhem
Obsolete[2] autobotfilm
Obsolete[2] decepticonfilm

Custom faction icons

[edit]

There are some characters who have their own faction symbol, (example: Moon) essentially used nowhere else. Rather than clutter the template with these, it is possible to declare a custom faction icon via the following format;

{{factions/icons
|custom=Moon symbol clean.png     -REQUIRED, filename of image
|cSize=30x30px     -Optional, maximum size of image.
|cLink=Celestial     -REQUIRED, Page the image links to.
|cPretty=Celestials     -Optional, mouseover text.  Will use the link if not supplied.
}}

This is, in turn, included along with the other non-custom tags.

{{factions
|{{factions/icons|custom=Moon symbol clean.png|cLink=Celestial|cPretty=Celestials}}
|maximal
}}

General considerations

[edit]

As of this writing (Mar-28-19) this is the only template on TFWiki that requires Javascript to function. The icons in question are created within a non-rendering <div> tag, which is then copied into the titlebar when the page finishes loading. As a result, the

template doesn't HAVE to be at the page... but by convention it always should be. Between 0.5 - 1.0% of internet surfers have either disabled Javascript or access the internet in a way that does not support it. Those users will not be able to see these faction icons. These faction icons are intended to serve as a convenient visual shorthand for information already in the article, and are not a primary means of communicating that information. Any information presented by these icons should also be present in the article text.

Technical notes

[edit]
  • The Javascript function associated with this template is called showFactions().
  • The non-rendering <div> has an id of "title-factionicons." There is a single CSS rule associated with this ID-- causing the <imagemap> <div>s to render inline rather than as blocks.
  • The "custom" imagemaps use "#tag: syntax" to allow parameters to be passed to them. (Don't think this will ever have to be edited.)
  • The icons themselves are generated by the "Template:Factions/icons" sub-page.

Trivia

[edit]
  • The development process of this template included a truly spectacular recursion error that knocked the entire wiki offline as its stack overflowed, repeatedly and we think corrupted link-table entries that couldn't be resolved without deleting the whole thing and starting from scratch. That is why the current version of the template exists in a 'dumb' (non-recursive) form. Bad Derik!'

Footnotes

[edit]
  1. 10 is an arbitrary number. Arbitrary-length MediaWiki templates like this are generally encouraged to have no more than 20 parameters though. And really... if a character has more than 10 factions, the icons cease to communicate information and simply become noise.
  2. 2.0 2.1 These template texts are obsolete. Please use the standard "autobot" and "decepticon" texts.