Difference between revisions of "Template:InfoBox UORareItem"

m
m
Line 7: Line 7:
 
{{#arraydefine:graphic_is_{{#var:list}}|{{UOGraphicList_{{#var:list}}}}}}
 
{{#arraydefine:graphic_is_{{#var:list}}|{{UOGraphicList_{{#var:list}}}}}}
 
{{#vardefine: {{#var:list}} | {{#if: {{{ {{#var:list}} |}}} | {{{ {{#var:list}} }}} | {{#if: {{{graphic|}}} | {{#ifeq:{{#explode:{{#arrayindex:graphic_is_{{#var:list}}|{{#arraysearch:graphic_is_{{#var:list}}|/{{{graphic}}};\w?/|0}}|-1}}|;|0}}|{{{graphic}}}|yes|no}} }} }} }}
 
{{#vardefine: {{#var:list}} | {{#if: {{{ {{#var:list}} |}}} | {{{ {{#var:list}} }}} | {{#if: {{{graphic|}}} | {{#ifeq:{{#explode:{{#arrayindex:graphic_is_{{#var:list}}|{{#arraysearch:graphic_is_{{#var:list}}|/{{{graphic}}};\w?/|0}}|-1}}|;|0}}|{{{graphic}}}|yes|no}} }} }} }}
}}
+
}}{{#vardefine:seasonText|{{#arraydefine:seasons|{{{season|}}}|,}}{{#loop: i
 +
  | 0
 +
  | {{#arraysize:seasons}}
 +
  | {{#ifexpr: {{#var:i}} > 0|, }}{{#vardefine: season|{{#arrayindex:seasons|{{#var:i}}}}[[Category:UO:Season {{#var:season}} Rares]][[UO:Season {{#var:season}} Rares|{{#var:season}}]]
 +
}}{{#vardefine:firstseason|{{#arrayindex:seasons|0}}}} }}
 
{| class=infobox  
 
{| class=infobox  
 
|class=titlecell colspan="2"| Rare Item
 
|class=titlecell colspan="2"| Rare Item
Line 30: Line 34:
 
{{#ifexpr: {{#expr: {{#var: yearExists}} and {{#var: yearHasSeason}} }} or  {{#expr: {{#var: yearExists}} = 0}} |{{#ifeq: {{Boolean|{{{noseason|}}} }}|0|{{#ifeq: {{#var:noseason}}|true||
 
{{#ifexpr: {{#expr: {{#var: yearExists}} and {{#var: yearHasSeason}} }} or  {{#expr: {{#var: yearExists}} = 0}} |{{#ifeq: {{Boolean|{{{noseason|}}} }}|0|{{#ifeq: {{#var:noseason}}|true||
 
{{!}}-
 
{{!}}-
{{!}} Season  {{!!}} {{#if:{{{season|}}}| {{#arraydefine:seasons|{{{season|}}}|,}}{{#loop: i
+
{{!}} Season  {{!!}} {{#if:{{{season|}}}| {{#var:seasonText}}|[[Category:UO:Rares with unknown season]][[UO:Rares with unknown season|unknown]]} }} }} }} }}
  | 0
 
  | {{#arraysize:seasons}}
 
  | {{#ifexpr: {{#var:i}} > 0|, }}{{#vardefine: season|{{#arrayindex:seasons|{{#var:i}}}}[[Category:UO:Season {{#var:season}} Rares]][[UO:Season {{#var:season}} Rares|{{#var:season}}]]
 
}}{{#vardefine:firstseason|{{#arrayindex:seasons|0}}}}|[[Category:UO:Rares with unknown season]][[UO:Rares with unknown season|unknown]]} }} }} }} }}
 
 
|-
 
|-
 
| Date{{#if: {{{year_end|}}} |s}} || {{#vardefine: month|{{#switch: {{lc:{{padleft:|3|{{{month|}}} }} }}
 
| Date{{#if: {{{year_end|}}} |s}} || {{#vardefine: month|{{#switch: {{lc:{{padleft:|3|{{{month|}}} }} }}

Revision as of 15:11, 1 September 2016

{{InfoBox UORareItem
  |name = Some Item
  |japanesename = 船
  |aka = Rift Pillar
  |engraving = To Catskills Love Mesanna
  |extraprop = It's full.
  |container = no
  |runebook = no
  |spellbook = no
  |crafted       = no
  |craftText = made
  |crafter = EM So and so
  |quantity = 15
  |noseason = true
  |season   = 1 
  |day = 1
  |month = June
  |year     = 1998
  |day_end = 27
  |month_end = 4
  |year_end = 1999
  |weight = 3
  |legal       = true 
  |sound         = None
  |doubleclick   = None
  |wearable      = true
  |wieldable     = true
  |walkover = true
  |eatable = true
  |animated = true
  |turnable  = true
  |Arirang     = true
  |Asuka       = true
  |Atlantic    = true
  |Baja        = true
  |Balhae      = true
  |Catskills   = true
  |Chesapeake  = true
  |Drachenfels = true
  |Europa      = true
  |Formosa     = true
  |GL          = true
  |Hokuto      = true
  |Izumo       = true
  |LA          = true
  |LS          = true
  |Legends     = true
  |Mizuho      = true
  |Mugen       = true
  |Napa        = true
  |Oceania     = true
  |Origin      = true
  |Pacific     = true
  |Sakura      = true
  |SP          = true
  |Sonoma      = true
  |Test = true
  |Wakoku      = true
  |Yamato      = true
  |type          = EM
  |spawning = no
  | Abyss = true
  | Baekdu = true
  | Farmageddon = true
  | Retribution = true
  | SantaSlay = true
  | ShardOfScreams  = true
  | ShardOfTheDead = true
  | ShardOfTheDead2 = true
  | Winterland = true
}}

To suppress the season where it's not applicable - for daily rares, for example - set the value of the noseason parameter to true.

Use:
 |forceBlack = true
or
 |forceWhite = true
to override the default image background color, if it will make the image show better.

If the item name contains a |, you must instead type {{!}} or things will break.