Difference between revisions of "Template:PlayerMemberSince"

From QWiki
m (Added width option (default 310px))
m (Extending to allow link= param, same as Player template)
 
Line 10: Line 10:
 
}}
 
}}
 
!style="text-align:left;padding-left:10px;height:40px;width:20px;"|{{#if:{{{2|}}}|<span style="white-space:nowrap; vertical-align: 4px; padding-left: 4px;">{{flag/{{lc:{{{2}}}}}}}&nbsp;</span>}}
 
!style="text-align:left;padding-left:10px;height:40px;width:20px;"|{{#if:{{{2|}}}|<span style="white-space:nowrap; vertical-align: 4px; padding-left: 4px;">{{flag/{{lc:{{{2}}}}}}}&nbsp;</span>}}
!style="text-align:left;"|{{#if:{{{1|TBD}}}|[[{{{1|TBD}}}]]|{{abbr|TBD|To Be Decided}}}}
+
!style="text-align:left;"|<span style="white-space: pre">{{#if:{{{link|}}}|
 +
{{#switch: {{{link}}}
 +
|false={{{1}}}
 +
|true=[[{{{1}}}]]
 +
|abbr={{abbr|{{{1|}}}|{{{abbr}}}}}
 +
|[[{{{link}}}|{{{1}}}]]}}
 +
|{{#if:{{{1|TBD}}}|[[{{{1|TBD}}}]]|{{abbr|TBD|To Be Decided}}}}
 +
|[[{{{1}}}]]}}</span>
 
!style="font-weight:normal; text-align:right; padding-right:10px; color:#777;"|{{#if:{{{3|NS}}}|<small>''Joined {{{3}}} ({{Age|{{{3}}}|0|0}} years)''</small>|}}
 
!style="font-weight:normal; text-align:right; padding-right:10px; color:#777;"|{{#if:{{{3|NS}}}|<small>''Joined {{{3}}} ({{Age|{{{3}}}|0|0}} years)''</small>|}}
 
|}</includeonly><noinclude>{{Documentation}}[[Category:Templates]]</noinclude>
 
|}</includeonly><noinclude>{{Documentation}}[[Category:Templates]]</noinclude>

Latest revision as of 08:08, 17 December 2024

Documentation (view - edit)

Used for clan members, to show their legacy in the clan.

Example

This code:

{{PlayerMemberSince|Avenger|pl|2002}}
{{PlayerMemberSince|Avenger|pl|2002|width=400}}
{{PlayerMemberSince|ParadokS|dk|}} 
{{PlayerMemberSince|||}} 
{{PlayerMemberSince|Modemkorv|de|2009}} 
{{PlayerMemberSince|Modemkorv|de|2009|style=inactive}} 
{{PlayerMemberSince|Modemkorv|de|2009|style=red}} 
{{PlayerMemberSince|Modemkorv|de|2009|style=green}} 
{{PlayerMemberSince|Modemkorv|de|2009|style=blue}} 
{{PlayerMemberSince|Modemkorv|de|2009|style=purple}} 
{{PlayerMemberSince|Modemkorv|de|2009|style=yellow}} 

Returns this:

Poland  Avenger Joined 2002 (22 years)
Poland  Avenger Joined 2002 (22 years)
Denmark  ParadokS
TBD
Germany  Modemkorv Joined 2009 (15 years)
Germany  Modemkorv Joined 2009 (15 years)
Germany  Modemkorv Joined 2009 (15 years)
Germany  Modemkorv Joined 2009 (15 years)
Germany  Modemkorv Joined 2009 (15 years)
Germany  Modemkorv Joined 2009 (15 years)
Germany  Modemkorv Joined 2009 (15 years)
  1. Default (name as link)
  2. Default with custom width (default is 310px)
  3. Leave year empty (shows no year)
  4. Leave all empty (shows TBD/noflag/noyear)
  5. |style=inactive set box style to inactive
  6. |style=red set box style to red
  7. |style=green set box style to green
  8. |style=blue set box style to blue
  9. |style=purple set box style to purple
  10. |style=yellow set box style to yellow