From GamingWiki
Jump to: navigation, search
m (Protected "Template:Navbox": High traffic page ([edit=sysop] (indefinite) [move=sysop] (indefinite)))
 
(6 intermediate revisions by the same user not shown)
Line 42: Line 42:
 
  -->#default=" style="width:100%;background:transparent;color:inherit}};{{{innerstyle|}}};"><!--
 
  -->#default=" style="width:100%;background:transparent;color:inherit}};{{{innerstyle|}}};"><!--
  
 
+
-->{{#vardefine: columns | {{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}}} }}<!--
  
 
---Title and Navbar---
 
---Title and Navbar---
Line 48: Line 48:
 
  --><td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{titlegroupstyle|}}}">{{{titlegroup|}}}</td><!--
 
  --><td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{titlegroupstyle|}}}">{{{titlegroup|}}}</td><!--
 
  --><th style="border-left:2px solid #fdfdfd;width:100%;|<th style="}}{{{basestyle|}}};{{{titlestyle|}}}" <!--
 
  --><th style="border-left:2px solid #fdfdfd;width:100%;|<th style="}}{{{basestyle|}}};{{{titlestyle|}}}" <!--
  -->colspan={{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}{{#if:{{{titlegroup|}}}|-1}}}} <!--
+
  -->colspan={{#expr:{{#var:columns}}{{#if:{{{titlegroup|}}}|-1}}}} <!--
 
  -->class="navbox-title"><!--
 
  -->class="navbox-title"><!--
  
Line 64: Line 64:
  
 
   DEBUG
 
   DEBUG
-->{{#tag:pre|
+
--><!--{{#tag:pre|
 
groups:    {{{groups}}}
 
groups:    {{{groups}}}
 
lists:      {{{lists}}}
 
lists:      {{{lists}}}
Line 72: Line 72:
 
list1 var:  {{#var:list1}}
 
list1 var:  {{#var:list1}}
 
numrows:    {{#var:numrows}}
 
numrows:    {{#var:numrows}}
}}<!--
+
}}--><!--
  
  
Line 79: Line 79:
 
  -->{{#if:{{{title|}}}|<tr style="height:2px;"><td></td></tr>}}<!--
 
  -->{{#if:{{{title|}}}|<tr style="height:2px;"><td></td></tr>}}<!--
 
  --><tr><td class="navbox-abovebelow" style="{{{basestyle|}}};{{{abovestyle|}}}" <!--
 
  --><tr><td class="navbox-abovebelow" style="{{{basestyle|}}};{{{abovestyle|}}}" <!--
  -->colspan="{{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}}}">{{{above}}}</td></tr>}}<!--
+
  -->colspan="{{#expr:{{#var:columns}}}}">{{{above}}}</td></tr>}}<!--
  
  
 
   DEBUG
 
   DEBUG
--><pre>---Body---</pre><!--
+
--><!--<pre>---Body---</pre>--><!--
  
 
---Body---
 
---Body---
  
---First group/list and images---
+
-- Deal with image considerations --
-->{{#if:{{#var:list1}}|{{#if:{{{title|}}}{{{above|}}}|<tr style="height:2px;"><td></td></tr>}}<tr><!--
+
-->{{#vardefine: doimageleft | {{{imageleft|}}} }}<!--
 
+
-->{{#vardefine: doimageright | {{{image|}}} }}<!--
  DEBUG
+
-->{{#vardefine: imgrowspan  | {{#expr:{{#var:numrows}}*2 }} }}<!--
--><pre>---imageleft---</pre><!--
 
 
 
-->{{#if:{{{imageleft|}}}|<!--
 
  --><td style="width:0%;padding:0px 2px 0px 0px;{{{imageleftstyle|}}}" <!--
 
-->rowspan="{{#expr:{{#var:numrows}}*2 - 1}}><!--
 
-->{{{imageleft}}}</td>}}<!--
 
 
 
 
 
  DEBUG
 
--><pre>---Group 1---</pre><!--
 
 
 
-->{{#if:{{#var:group1}}|<td class="navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group1style|}}}"><!--
 
-->{{#var:group1}}</td><td style="text-align:left;border-left-width:2px;border-left-style:solid;|<td colspan=2 style="}}<!--
 
-->{{#if:{{{groupwidth|}}}||width:100%;}}padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list1style|}}}" <!--
 
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!--
 
--><div style="padding:{{{list1padding|{{{listpadding|0em 0.25em}}}}}}"><!--
 
    -->{{Array Map <!--
 
      -->| array = {{#var:list1}} <!--
 
      -->| countfrom = 0 <!--
 
      -->| separator = :: <!--
 
      -->| after = {{·}} <!--
 
      -->| afterlast = <!--
 
    -->}}<!--
 
--></div></td><!--
 
 
 
-->{{#if:{{{image|}}}|<!--
 
--><td style="width:0%;padding:0px 0px 0px 2px;{{{imagestyle|}}}" <!--
 
-->rowspan="{{#expr:{{#var:numrows}}*2 - 1}}><!--
 
-->{{{image}}}</td>}}<!--
 
 
 
--></tr>}}<!--
 
 
 
  
  
 
   DEBUG
 
   DEBUG
--><pre>--- more rows ---</pre><!--
+
--><!--<pre>--- all rows ---</pre>--><!--
  
 
---Remaining groups/lists---
 
---Remaining groups/lists---
Line 132: Line 100:
 
-->{{#loop: nboxD|1|{{#var: numrows}}<!--
 
-->{{#loop: nboxD|1|{{#var: numrows}}<!--
 
-->|<!--
 
-->|<!--
 +
 
   -->{{#vardefine: modtwo | {{#expr: ({{#var:nboxD}} {{#ifeq:{{{evenodd|}}}|swap|+1|}}) mod 2 }} }}<!--
 
   -->{{#vardefine: modtwo | {{#expr: ({{#var:nboxD}} {{#ifeq:{{{evenodd|}}}|swap|+1|}}) mod 2 }} }}<!--
 
   -->{{#vardefine: parity | {{#ifeq: {{#var:modtwo}} | 1 | odd | even }} }}<!--
 
   -->{{#vardefine: parity | {{#ifeq: {{#var:modtwo}} | 1 | odd | even }} }}<!--
Line 138: Line 107:
 
   -->|<!-- a list or group exists
 
   -->|<!-- a list or group exists
 
       -->{{#if:{{{title|}}}{{{above|}}}{{#var:list1}}|<tr style="height:2px"><td></td></tr>}}<tr><!--
 
       -->{{#if:{{{title|}}}{{{above|}}}{{#var:list1}}|<tr style="height:2px"><td></td></tr>}}<tr><!--
 +
      -->{{#if:{{#var:doimageleft}}|<!--
 +
        --><td style="width:0%;padding:0px 2px 0px 0px;{{{imageleftstyle|}}}" <!--
 +
        -->rowspan="{{#var:imgrowspan}}"><!--
 +
        -->{{#doimageleft}}</td><!--
 +
        -->{{#vardefine: doimageleft|}}<!--
 +
      -->}}<!--
 
       -->{{#if:{{#var:group{{#var:nboxD}}}}<!--
 
       -->{{#if:{{#var:group{{#var:nboxD}}}}<!--
 
       -->|<!-- add a group header cell
 
       -->|<!-- add a group header cell
Line 166: Line 141:
 
         -->| afterlast = <!--
 
         -->| afterlast = <!--
 
       -->}}<!--
 
       -->}}<!--
       --></div></td></tr><!--
+
       --></div></td><!--
 +
      -->{{#if:{{#var:doimageright}}|<!--
 +
        --><td style="width:0%;padding:0px 0px 0px 2px;{{{imagestyle|}}}" <!--
 +
        -->rowspan="{{#var:imgrowspan}}"><!--
 +
        -->{{#var:doimageright}}</td><!--
 +
        -->{{#vardefine: doimageright|}}<!--
 +
        -->}}<!--
 +
      --></tr><!--
 
   -->}}<!-- end if list or group exists
 
   -->}}<!-- end if list or group exists
 
-->}}<!-- end loop
 
-->}}<!-- end loop
  
-->{{#vardefine:nboxD|1}}<!--
 
-->{{#while: | {{#ifexpr:{{#vardefineecho: nboxD| {{#expr:{{#var:nboxD}}+1}} }} < 20 | 1 }} <!--
 
-->|<!--
 
  -->{{#vardefine: parity | {{#ifeq: {{#expr: ({{#var:nboxD}} {{#ifeq:{{{evenodd|}}}|swap|+1}}) mod 2 }} | 1 | odd | even }} }}<!--
 
 
  -->{{#if:{{#var:list{{#var:nboxD}}}}<!--
 
  -->|<!-- this list exists
 
      -->{{#if:{{{title|}}}{{{above|}}}{{{list1|}}}|<tr style="height:2px"><td></td></tr>}}<tr><!--
 
      -->{{#if:{{{group{{#var:nboxD}}|}}}<!--
 
      -->|<!-- add a group header cell
 
        --><td class="navbox-group" style="<!--
 
            -->{{{basestyle|}}};<!--
 
            -->{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}<!--
 
            -->{{{groupstyle|}}};<!--
 
            -->{{{group{{#var:nboxD}}style|}}}"><!--
 
        -->{{{group{{#var:nboxD}}}}}</td><!--
 
        --><td style="text-align:left;border-left-width:2px;border-left-style:solid;<!--
 
      -->|<!-- no group
 
        --><td colspan=2 style="<!--
 
      -->}}<!-- end if group
 
        cell styles:
 
      -->padding:0px;<!--
 
      -->{{#if:{{{groupwidth|}}}||width:100%;}}<!--
 
      -->{{{liststyle|}}};<!--
 
      -->{{{{{#var:parity}}style|}}};<!--
 
      -->{{{list{{#var:nboxD}}style|}}}<!--
 
      -->" <!--
 
      -->class="navbox-list navbox-{{#var:parity}}"><!--
 
      --><div style="padding:{{{listpadding|0em 0.25em}}}"><!--
 
      -->{{Array Map <!--
 
        -->| array = {{{list{{#var:nboxD}}}}} <!--
 
        -->| countfrom = 0 <!--
 
        -->| separator = :: <!--
 
        -->| after = {{·}} <!--
 
        -->| afterlast = <!--
 
      -->}}<!--
 
      --></div></td></tr><!--
 
  -->}}<!-- end if list exists
 
 
-->}}<!-- end list while loop
 
  
  
Line 216: Line 158:
 
  -->{{#if:{{{title|}}}{{{above|}}}{{{list1|}}}{{{list2|}}}{{{list3|}}}|<tr style="height:2px;"><td></td></tr>}}<!--
 
  -->{{#if:{{{title|}}}{{{above|}}}{{{list1|}}}{{{list2|}}}{{{list3|}}}|<tr style="height:2px;"><td></td></tr>}}<!--
 
  --><tr><td class="navbox-abovebelow" style="{{{basestyle|}}};{{{belowstyle|}}}" <!--
 
  --><tr><td class="navbox-abovebelow" style="{{{basestyle|}}};{{{belowstyle|}}}" <!--
  -->colspan="{{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}}}">{{{below}}}</td></tr>}}<!--
+
  -->colspan="{{#expr:{{#var:columns}}}}">{{{below}}}</td></tr>}}<!--
  
  

Latest revision as of 01:30, 28 April 2011

[create]
Error creating thumbnail: File missing
Template documentation