Difference between revisions of "User:Flame2512/Tree-Custom-Old"
(Fixed it hopefully) |
(Added warning not to use) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
| #default = [[File:Item_own.png|link={{{link|}}}|class=tree-item-js]] | | #default = [[File:Item_own.png|link={{{link|}}}|class=tree-item-js]] | ||
}}</div><div class="tree-item-text"><span class="tree-item-text-scroll">{{{text|}}}</span></div><div class="tree-item-img">{{#if: {{{image|}}}|{{#ifexist: File:{{{image}}}|[[File:{{{image}}}|108x66px]]|{{#if:{{#unit:{{{image}}}|icon}}|{{#unit:{{{image}}}|icon}}|{{{image}}}}}}}}}</div></div></includeonly><noinclude> | }}</div><div class="tree-item-text"><span class="tree-item-text-scroll">{{{text|}}}</span></div><div class="tree-item-img">{{#if: {{{image|}}}|{{#ifexist: File:{{{image}}}|[[File:{{{image}}}|108x66px]]|{{#if:{{#unit:{{{image}}}|icon}}|{{#unit:{{{image}}}|icon}}|{{{image}}}}}}}}}</div></div></includeonly><noinclude> | ||
+ | {{Notice|This template can apparently causes problems with the wiki so [[User:U13682523/Tree-Custom]] should be used instead. It is preserved here in case it is useful, and I am rather proud that I made it do what I wanted (even if it caused some problems)|!!}} | ||
== Description == | == Description == | ||
This template is a fully customisable version of [[Template:Tree-Unit]]. | This template is a fully customisable version of [[Template:Tree-Unit]]. | ||
Line 10: | Line 11: | ||
{{Notice|For clarity template parameters are shown on separate lines. In practice this template is probably better used as a single line}} | {{Notice|For clarity template parameters are shown on separate lines. In practice this template is probably better used as a single line}} | ||
<pre> | <pre> | ||
− | {{User:U13682523/Tree-Custom | + | {{User:U13682523/Tree-Custom-Old |
| text = | | text = | ||
| link = | | link = | ||
Line 20: | Line 21: | ||
* '''text''' - the text to display where the vehicle name would normally be (optional). | * '''text''' - the text to display where the vehicle name would normally be (optional). | ||
* '''link''' - the name of the page the box should link to when clicked (optional). | * '''link''' - the name of the page the box should link to when clicked (optional). | ||
− | * '''image''' - the filename of the image to display where the vehicle icon would go, or a link to an external file (optional). | + | * '''image''' - the filename of the image to display where the vehicle icon would go, or a link to an external file, or a vehicle code (optional). |
* '''colour''' - the background colour, specify either '''premium''' or '''squad''' or ignore for default colour | * '''colour''' - the background colour, specify either '''premium''' or '''squad''' or ignore for default colour | ||
Line 27: | Line 28: | ||
Linking to the [[Lightning F.6]] page, with a squad coloured background, the text "Random Vehicle", and an image specified by wiki file name: | Linking to the [[Lightning F.6]] page, with a squad coloured background, the text "Random Vehicle", and an image specified by wiki file name: | ||
− | {{User:U13682523/Tree-Custom|link=Lightning_F.6|text=Random Vehicle|colour=squad|image=AIShipDM Battleship Tirpitz.png}} | + | {{User:U13682523/Tree-Custom-Old|link=Lightning_F.6|text=Random Vehicle|colour=squad|image=AIShipDM Battleship Tirpitz.png}} |
<pre> | <pre> | ||
− | {{User:U13682523/Tree-Custom | + | {{User:U13682523/Tree-Custom-Old |
| link = Lightning_F.6 | | link = Lightning_F.6 | ||
| text = Random Vehicle | | text = Random Vehicle | ||
Line 41: | Line 42: | ||
Linking to the [[Lightning F.6]] page, with a premium coloured background, the text "Random Vehicle", and an image specified by an external URL: | Linking to the [[Lightning F.6]] page, with a premium coloured background, the text "Random Vehicle", and an image specified by an external URL: | ||
− | {{User:U13682523/Tree-Custom|link=Lightning_F.6|text=Random Vehicle|colour=premium|image=http://encyclopedia.warthunder.com/slots/b-17g.png}} | + | {{User:U13682523/Tree-Custom-Old|link=Lightning_F.6|text=Random Vehicle|colour=premium|image=http://encyclopedia.warthunder.com/slots/b-17g.png}} |
<pre> | <pre> | ||
− | {{User:U13682523/Tree-Custom | + | {{User:U13682523/Tree-Custom-Old |
| link = Lightning_F.6 | | link = Lightning_F.6 | ||
| text = Random Vehicle | | text = Random Vehicle | ||
Line 53: | Line 54: | ||
===Example #3=== | ===Example #3=== | ||
− | Linking to the [[Lightning F.6]] page, with a regular coloured background, the text "Random Vehicle", and an image specified using | + | Linking to the [[Lightning F.6]] page, with a regular coloured background, the text "Random Vehicle", and an image specified using a vehicle code: |
− | {{User:U13682523/Tree-Custom|link=Lightning_F.6|text=Random Vehicle|image= | + | {{User:U13682523/Tree-Custom-Old|link=Lightning_F.6|text=Random Vehicle|image=a6m5otsu}} |
<pre> | <pre> | ||
− | {{User:U13682523/Tree-Custom | + | {{User:U13682523/Tree-Custom-Old |
| link = Lightning_F.6 | | link = Lightning_F.6 | ||
| text = Random Vehicle | | text = Random Vehicle | ||
− | | image = | + | | image = a6m5otsu |
}} | }} | ||
</pre> | </pre> | ||
</noinclude> | </noinclude> |
Latest revision as of 12:33, 11 March 2021
This template can apparently causes problems with the wiki so User:Flame2512/Tree-Custom should be used instead. It is preserved here in case it is useful, and I am rather proud that I made it do what I wanted (even if it caused some problems) |
Contents
Description
This template is a fully customisable version of Template:Tree-Unit.
Use
For clarity template parameters are shown on separate lines. In practice this template is probably better used as a single line |
{{User:U13682523/Tree-Custom-Old | text = | link = | image = | colour = }}
Parameters
- text - the text to display where the vehicle name would normally be (optional).
- link - the name of the page the box should link to when clicked (optional).
- image - the filename of the image to display where the vehicle icon would go, or a link to an external file, or a vehicle code (optional).
- colour - the background colour, specify either premium or squad or ignore for default colour
Examples of use
Example #1
Linking to the Lightning F.6 page, with a squad coloured background, the text "Random Vehicle", and an image specified by wiki file name:
{{User:U13682523/Tree-Custom-Old | link = Lightning_F.6 | text = Random Vehicle | colour = squad | image = AIShipDM Battleship Tirpitz.png }}
Example #2
Linking to the Lightning F.6 page, with a premium coloured background, the text "Random Vehicle", and an image specified by an external URL:
{{User:U13682523/Tree-Custom-Old | link = Lightning_F.6 | text = Random Vehicle | colour = premium | image = http://encyclopedia.warthunder.com/slots/b-17g.png }}
Example #3
Linking to the Lightning F.6 page, with a regular coloured background, the text "Random Vehicle", and an image specified using a vehicle code:
{{User:U13682523/Tree-Custom-Old | link = Lightning_F.6 | text = Random Vehicle | image = a6m5otsu }}