Difference between revisions of "Template:Condition test"
Jump to navigation
Jump to search
(Psojed's code before I messed this up) |
|||
(32 intermediate revisions by 2 users not shown) | |||
Line 5: | Line 5: | ||
-->{{#vardefine:Count|{{#count:{{#var:Datastring}}|;}}}}<!-- | -->{{#vardefine:Count|{{#count:{{#var:Datastring}}|;}}}}<!-- | ||
--- Separate values from datastring into individual variables. --- | --- Separate values from datastring into individual variables. --- | ||
-->{{#vardefine:Properties1|{{#ifexpr: {{#var:Count}}>1|{{#explode: {{#var:Datastring}}|;|0 | -->{{#vardefine:Properties1|{{#ifexpr: {{#var:Count}}>1|{{#explode: {{#var:Datastring}}|;|0}}|}}}}<!-- | ||
-->{{#vardefine:Values1|{{#ifexpr: {{#var:Count}}>1|{{#explode: {{#var:Datastring}}|;|1}}|}}}}<!-- | -->{{#vardefine:Values1|{{#ifexpr: {{#var:Count}}>1|{{#explode: {{#var:Datastring}}|;|1}}|}}}}<!-- | ||
-->{{#vardefine:Properties2|{{#ifexpr: {{#var:Count}}> | -->{{#vardefine:Properties2|{{#ifexpr: {{#var:Count}}>3|{{#explode: {{#var:Datastring}}|;|2}}|}}}}<!-- | ||
-->{{#vardefine:Values2|{{#ifexpr: {{#var:Count}}> | -->{{#vardefine:Values2|{{#ifexpr: {{#var:Count}}>3|{{#explode: {{#var:Datastring}}|;|3}}|}}}}<!-- | ||
-->{{#vardefine:Properties3|{{#ifexpr: {{#var:Count}}> | -->{{#vardefine:Properties3|{{#ifexpr: {{#var:Count}}>5|{{#explode: {{#var:Datastring}}|;|4}}|}}}}<!-- | ||
-->{{#vardefine:Values3|{{#ifexpr: {{#var:Count}}> | -->{{#vardefine:Values3|{{#ifexpr: {{#var:Count}}>5|{{#explode: {{#var:Datastring}}|;|5}}|}}}}<!-- | ||
-->{{#vardefine:Properties4|{{#ifexpr: {{#var:Count}}> | -->{{#vardefine:Properties4|{{#ifexpr: {{#var:Count}}>7|{{#explode: {{#var:Datastring}}|;|6}}|}}}}<!-- | ||
-->{{#vardefine:Values4|{{#ifexpr: {{#var:Count}}> | -->{{#vardefine:Values4|{{#ifexpr: {{#var:Count}}>7|{{#explode: {{#var:Datastring}}|;|7}}|}}}}<!-- | ||
-->{{#vardefine:Properties5|{{#ifexpr: {{#var:Count}}> | -->{{#vardefine:Properties5|{{#ifexpr: {{#var:Count}}>9|{{#explode: {{#var:Datastring}}|;|8}}|}}}}<!-- | ||
-->{{#vardefine:Values5|{{#ifexpr: {{#var:Count}}> | -->{{#vardefine:Values5|{{#ifexpr: {{#var:Count}}>9|{{#explode: {{#var:Datastring}}|;|9}}|}}}}<!-- | ||
-->{{#vardefine:Properties6|{{#ifexpr: {{#var:Count}}> | -->{{#vardefine:Properties6|{{#ifexpr: {{#var:Count}}>11|{{#explode: {{#var:Datastring}}|;|10}}|}}}}<!-- | ||
-->{{#vardefine:Values6|{{#ifexpr: {{#var:Count}}> | -->{{#vardefine:Values6|{{#ifexpr: {{#var:Count}}>11|{{#explode: {{#var:Datastring}}|;|11}}|}}}}<!-- | ||
-->{{#vardefine:Properties7|{{#ifexpr: {{#var:Count}}> | -->{{#vardefine:Properties7|{{#ifexpr: {{#var:Count}}>13|{{#explode: {{#var:Datastring}}|;|12}}|}}}}<!-- | ||
-->{{#vardefine:Values7|{{#ifexpr: {{#var:Count}}> | -->{{#vardefine:Values7|{{#ifexpr: {{#var:Count}}>13|{{#explode: {{#var:Datastring}}|;|13}}|}}}}<!-- | ||
-->{{#vardefine:Properties8|{{#ifexpr: {{#var:Count}}> | -->{{#vardefine:Properties8|{{#ifexpr: {{#var:Count}}>15|{{#explode: {{#var:Datastring}}|;|14}}|}}}}<!-- | ||
-->{{#vardefine:Values8|{{#ifexpr: {{#var:Count}}> | -->{{#vardefine:Values8|{{#ifexpr: {{#var:Count}}>15|{{#explode: {{#var:Datastring}}|;|15}}|}}}}<!-- | ||
-->{{#vardefine:PropertyText|{{#explode: {{#var:Datastring}}|;|-1}}}}<!-- | -->{{#vardefine:PropertyText|{{#ifeq: {{#explode: {{#var:Datastring}}|;|-1}}|None| |{{#explode: {{#var:Datastring}}|;|-1}}}}}}<!-- | ||
-->{{#vardefine:Image|{{{1|}}}}}<!-- | |||
-->{| width=400px; | -->{| width=400px; | ||
|<span style="font-size: 20px;">{{#if:{{{1|}}}|{{Translate|{{{1|}}}|ConditionNames}}|{{Translate|{{ROOTPAGENAME}}|ConditionNames}}}}</span> <br /> <span style="color:#9d9a9a;">{{c|{{#var:ConditionType|White}}|{{Translate|{{#var:ConditionType|ConditionType}}|Properties}}}}</span>{{Tooltip rule}} | |<span style="font-size: 20px;">{{#if:{{{1|}}}|{{Translate|{{{1|}}}|ConditionNames}}|{{Translate|{{ROOTPAGENAME}}|ConditionNames}}}}</span> <br /> <span style="color:#9d9a9a;">{{c|{{#var:ConditionType|White}}|{{Translate|{{#var:ConditionType|ConditionType}}|Properties}}}}</span>{{Tooltip rule}} | ||
Line 34: | Line 35: | ||
-->{{#if: {{#var:Properties7}} | <div style="float:left;">{{Translate|{{#var:Properties7}}|Properties}}</div> <div style="float: right;">{{#var:Values7}}</div> | }}{{Clear}}<!-- | -->{{#if: {{#var:Properties7}} | <div style="float:left;">{{Translate|{{#var:Properties7}}|Properties}}</div> <div style="float: right;">{{#var:Values7}}</div> | }}{{Clear}}<!-- | ||
-->{{#if: {{#var:Properties8}} | <div style="float:left;">{{Translate|{{#var:Properties8}}|Properties}}</div> <div style="float: right;">{{#var:Values8}}</div> | }}{{Clear}}<!-- | -->{{#if: {{#var:Properties8}} | <div style="float:left;">{{Translate|{{#var:Properties8}}|Properties}}</div> <div style="float: right;">{{#var:Values8}}</div> | }}{{Clear}}<!-- | ||
-->{{#if: {{#var:PropertyText}} | <div style="float:left;">{{#if: {{: | -->{{#if: {{#var:PropertyText}} | <div style="float:left;">{{#if: {{#var:Properties1}}|<br>| }} {{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}} | {{#ifeq: {{PAGENAME}} | {{ROOTPAGENAME}}/Tooltip | {{#var:PropertyText}} | {{Translate|{{ROOTPAGENAME}}|ConditionDescriptions}}}} | {{#var:PropertyText}}}}</div> |}}</div> | ||
|- | |- | ||
|style="color:#9d7969;"|{{#if: {{#var:Description}} | {{Tooltip rule}}{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}} | {{#ifeq: {{PAGENAME}} | {{ROOTPAGENAME}}/Tooltip | {{#var:Description}} | {{Translate|{{ROOTPAGENAME}} Description|ConditionDescriptions}}}} | {{#var:Description}}}} <br />| }} | |style="color:#9d7969;"|{{#if: {{#var:Description}} | {{Tooltip rule}}{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}} | {{#ifeq: {{PAGENAME}} | {{ROOTPAGENAME}}/Tooltip | {{#var:Description}} | {{Translate|{{ROOTPAGENAME}} Description|ConditionDescriptions}}}} | {{#var:Description}}}} <br />| }} | ||
|- | |- | ||
|style="text-align:center;"|[[File:{{#if:{{#var:Image}}|{{#var:Image}}|{{ROOTPAGENAME}}.png}}|link={{#ifeq:{{SUBPAGENAME}}|Tooltip|{{BASEPAGENAME}}|{{PAGENAME}}/Tooltip}}|alt={{Translate|{{ROOTPAGENAME}}|ConditionNames}}|{{Translate|{{ROOTPAGENAME}}|ConditionNames}}]] | |style="text-align:center;"|[[File:{{#if:{{#var:Image}}|{{#var:Image}}.png|{{ROOTPAGENAME}}.png}}|link={{#ifeq:{{SUBPAGENAME}}|Tooltip|{{BASEPAGENAME}}|{{PAGENAME}}/Tooltip}}|alt={{Translate|{{ROOTPAGENAME}}|ConditionNames}}|{{Translate|{{ROOTPAGENAME}}|ConditionNames}}]] | ||
|}</includeonly><noinclude>{{doc}} | |}</includeonly><noinclude>{{doc}} | ||
[[Category:Tooltip templates]]</noinclude> | [[Category:Tooltip templates]]</noinclude> |
Latest revision as of 03:20, 20 April 2023
This template has no documentation. If you know how to use this template, please add some.