Difference between revisions of "Template:Past Poll"

(Saving this for now.)
 
(Now to go test it out in the Sandbox.)
Line 1: Line 1:
{| style="border:1px solid #000000; border-collapse:collapse; margin:1px; width:auto;"
+
<includeonly>{| style="border:1px solid #000000; border-collapse:collapse; margin:1px; width:auto;"
 
|-
 
|-
 
! colspan="2" style="background-color:#9F3215; border:1px solid #000000; color:#FFFFFF; padding:3px;" | {{{question}}}
 
! colspan="2" style="background-color:#9F3215; border:1px solid #000000; color:#FFFFFF; padding:3px;" | {{{question}}}
Line 8: Line 8:
 
|-
 
|-
 
| style="background-color:#F6F6F6; font-size:10px; padding-right:3px; text-align:right;" | {{{result1}}}%
 
| style="background-color:#F6F6F6; font-size:10px; padding-right:3px; text-align:right;" | {{{result1}}}%
{{#ifexpr: {{{result1}}} > 0
+
{{#if: {{{result1|}}}
| {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr: {{{result1}}} * 2}}px;" {{!}}
+
| {{#ifexpr: {{{result1}}} > 0
 +
  | {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr: {{{result1}}} * 2}}px;" {{!}}
 +
  }}
 
}}
 
}}
 
|}
 
|}
Line 18: Line 20:
 
|-
 
|-
 
| style="background-color:#F6F6F6; font-size:10px; padding-right:3px; text-align:right;" | {{{result2}}}%
 
| style="background-color:#F6F6F6; font-size:10px; padding-right:3px; text-align:right;" | {{{result2}}}%
{{#ifexpr: {{{result2}}} > 0
+
{{#if: {{{result2|}}}
| {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr: {{{result2}}} * 2}}px;" {{!}}
+
| {{#ifexpr: {{{result2}}} > 0
 +
  | {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr: {{{result2}}} * 2}}px;" {{!}}
 +
  }}
 
}}
 
}}
 
|}
 
|}
{{#if: {{{option3|Roleplaying}}}
+
{{#if: {{{option3}}}
 
| {{!}}-
 
| {{!}}-
{{!}} style="background-color:#F6F6F6; padding:3px;" {{!}} {{{option3|Roleplaying}}}
+
{{!}} style="background-color:#F6F6F6; padding:3px;" {{!}} {{{option3}}}
 
{{!}} style="background-color:#F6F6F6; padding-right:3px; text-align:right;" {{!}}
 
{{!}} style="background-color:#F6F6F6; padding-right:3px; text-align:right;" {{!}}
 
{{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;"
 
{{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;"
 
{{!}}-
 
{{!}}-
{{!}} style="background-color:#F6F6F6; font-size:10px; padding-right:3px; text-align:right;" {{!}} {{{result3|9}}}%
+
{{!}} style="background-color:#F6F6F6; font-size:10px; padding-right:3px; text-align:right;" {{!}} {{{result3}}}%
{{#ifexpr: {{{result3|9}}} > 0
+
{{#if: {{{result3|}}}
| {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr: {{{result3|9}}} * 2}}px;" {{!}}
+
| {{#ifexpr: {{{result3}}} > 0
 +
  | {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr: {{{result3}}} * 2}}px;" {{!}}
 +
  }}
 
}}
 
}}
 
{{!}}}
 
{{!}}}
   {{#if:{{{option4|PvP Combat}}}
+
   {{#if: {{{option4}}}
 
   | {{!}}-
 
   | {{!}}-
{{!}} style="background-color:#F6F6F6; padding:3px;" {{!}} {{{option4|PvP Combat}}}
+
{{!}} style="background-color:#F6F6F6; padding:3px;" {{!}} {{{option4}}}
 
{{!}} style="background-color:#F6F6F6; padding-right:3px; text-align:right;" {{!}}
 
{{!}} style="background-color:#F6F6F6; padding-right:3px; text-align:right;" {{!}}
 
{{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;"
 
{{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;"
 
{{!}}-
 
{{!}}-
{{!}} style="background-color:#F6F6F6; font-size:10px; padding-right:3px; text-align:right;" {{!}} {{{result4|27}}}%
+
{{!}} style="background-color:#F6F6F6; font-size:10px; padding-right:3px; text-align:right;" {{!}} {{{result4}}}%
{{#ifexpr:{{{result4|27}}} > 0
+
{{#if: {{{result4|}}}
| {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr:{{{result4|27}}} * 2}}px;" {{!}}
+
| {{#ifexpr: {{{result4}}} > 0
 +
  | {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr: {{{result4}}} * 2}}px;" {{!}}
 +
  }}
 
}}
 
}}
 
{{!}}}
 
{{!}}}
     {{#if:{{{option5|Other}}}
+
     {{#if: {{{option5}}}
 
     | {{!}}-
 
     | {{!}}-
{{!}} style="background-color:#F6F6F6; padding:3px;" {{!}} {{{option5|Other}}}
+
{{!}} style="background-color:#F6F6F6; padding:3px;" {{!}} {{{option5}}}
 
{{!}} style="background-color:#F6F6F6; padding-right:3px; text-align:right;" {{!}}
 
{{!}} style="background-color:#F6F6F6; padding-right:3px; text-align:right;" {{!}}
 
{{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;"
 
{{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;"
 
{{!}}-
 
{{!}}-
{{!}} style="background-color:#F6F6F6; font-size:10px; padding-right:3px; text-align:right;" {{!}} {{{result5|0}}}%
+
{{!}} style="background-color:#F6F6F6; font-size:10px; padding-right:3px; text-align:right;" {{!}} {{{result5}}}%
{{#ifexpr:{{{result5|0}}} > 0
+
{{#if: {{{result5|}}}
| {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr:{{{result5|0}}} * 2}}px;" {{!}}
+
| {{#ifexpr: {{{result5}}} > 0
 +
  | {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr: {{{result5}}} * 2}}px;" {{!}}
 +
  }}
 
}}
 
}}
 
{{!}}}
 
{{!}}}
       {{#if:{{{option6|test}}}
+
       {{#if: {{{option6}}}
 
       | {{!}}-
 
       | {{!}}-
{{!}} style="background-color:#F6F6F6; padding:3px;" {{!}} {{{option6|test}}}
+
{{!}} style="background-color:#F6F6F6; padding:3px;" {{!}} {{{option6}}}
 
{{!}} style="background-color:#F6F6F6; padding-right:3px; text-align:right;" {{!}}
 
{{!}} style="background-color:#F6F6F6; padding-right:3px; text-align:right;" {{!}}
 
{{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;"
 
{{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;"
 
{{!}}-
 
{{!}}-
{{!}} style="background-color:#F6F6F6; font-size:10px; padding-right:3px; text-align:right;" {{!}} {{{result6|0}}}%
+
{{!}} style="background-color:#F6F6F6; font-size:10px; padding-right:3px; text-align:right;" {{!}} {{{result6}}}%
{{#ifexpr:{{{result6|0}}} > 0
+
{{#if: {{{result6|}}}
| {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr:{{{result6|0}}} * 2}}px;" {{!}}
+
| {{#ifexpr: {{{result6}}} > 0
 +
  | {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr: {{{result6}}} * 2}}px;" {{!}}
 +
  }}
 
}}
 
}}
 
{{!}}}
 
{{!}}}
         {{#if:{{{option7|test}}}
+
         {{#if: {{{option7}}}
 
         | {{!}}-
 
         | {{!}}-
{{!}} style="background-color:#F6F6F6; padding:3px;" {{!}} {{{option7|test}}}
+
{{!}} style="background-color:#F6F6F6; padding:3px;" {{!}} {{{option7}}}
 
{{!}} style="background-color:#F6F6F6; padding-right:3px; text-align:right;" {{!}}
 
{{!}} style="background-color:#F6F6F6; padding-right:3px; text-align:right;" {{!}}
 
{{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;"
 
{{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;"
 
{{!}}-
 
{{!}}-
{{!}} style="background-color:#F6F6F6; font-size:10px; padding-right:3px; text-align:right;" {{!}} {{{result7|0}}}%
+
{{!}} style="background-color:#F6F6F6; font-size:10px; padding-right:3px; text-align:right;" {{!}} {{{result7}}}%
{{#ifexpr:{{{result7|0}}} > 0
+
{{#if: {{{result7|}}}
| {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr:{{{result7|0}}} * 2}}px;" {{!}}
+
| {{#ifexpr: {{{result7}}} > 0
 +
  | {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr: {{{result7}}} * 2}}px;" {{!}}
 +
  }}
 
}}
 
}}
 
{{!}}}
 
{{!}}}
           {{#if:{{{option8|test}}}
+
           {{#if: {{{option8}}}
 
           | {{!}}-
 
           | {{!}}-
{{!}} style="background-color:#F6F6F6; padding:3px;" {{!}} {{{option8|test}}}
+
{{!}} style="background-color:#F6F6F6; padding:3px;" {{!}} {{{option8}}}
 
{{!}} style="background-color:#F6F6F6; padding-right:3px; text-align:right;" {{!}}
 
{{!}} style="background-color:#F6F6F6; padding-right:3px; text-align:right;" {{!}}
 
{{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;"
 
{{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;"
 
{{!}}-
 
{{!}}-
{{!}} style="background-color:#F6F6F6; font-size:10px; padding-right:3px; text-align:right;" {{!}} {{{result8|0}}}%
+
{{!}} style="background-color:#F6F6F6; font-size:10px; padding-right:3px; text-align:right;" {{!}} {{{result8}}}%
{{#ifexpr:{{{result8|0}}} > 0
+
{{#if: {{{result8|}}}
| {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr:{{{result8|0}}} * 2}}px;" {{!}}
+
| {{#ifexpr: {{{result8}}} > 0
 +
  | {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr: {{{result8}}} * 2}}px;" {{!}}
 +
  }}
 
}}
 
}}
 
{{!}}}
 
{{!}}}
Line 95: Line 111:
 
}}
 
}}
 
|-
 
|-
| colspan="3" style="background-color:#F6F6F6; font-size:10px; padding:3px; text-align:right;" | ({{{totalvotes|11}}} votes total)
+
| colspan="3" style="background-color:#F6F6F6; font-size:10px; padding:3px; text-align:right;" | ({{{totalvotes}}} votes total)
|}[[Template:Past Poll]] is designed for use on the [[UOGuide:Polls|Past Polls]] page to display the various polls that have been displayed on the front page of UOGuide.
+
|}</includeonly>[[Template:Past Poll]] is designed for use on the [[UOGuide:Polls|Past Polls]] page to display a poll that has was once featured on the front page of UOGuide and has since been archived.
 +
 
 +
==Template==
 +
<pre>
 +
{{Past Poll
 +
|question=
 +
|option1=
 +
|result1=
 +
|option2=
 +
|result2=
 +
|option3=
 +
|result3=
 +
|option4=
 +
|result4=
 +
|option5=
 +
|result5=
 +
|option6=
 +
|result6=
 +
|option7=
 +
|result7=
 +
|option8=
 +
|result8=
 +
|totalvotes=
 +
}}
 +
</pre>

Revision as of 10:25, 1 September 2009

Template:Past Poll is designed for use on the Past Polls page to display a poll that has was once featured on the front page of UOGuide and has since been archived.

Template

{{Past Poll
|question=
|option1=
|result1=
|option2=
|result2=
|option3=
|result3=
|option4=
|result4=
|option5=
|result5=
|option6=
|result6=
|option7=
|result7=
|option8=
|result8=
|totalvotes=
}}