Template:Sources/datarow: Difference between revisions

From IdleOn MMO Wiki
mNo edit summary
mNo edit summary
 
(3 intermediate revisions by the same user not shown)
Line 2: Line 2:


### Cargo Declare ###
### Cargo Declare ###
-->{{#cargo_declare:_table=Sources
-->{{#cargo_declare:_table=ExtraSourceData
   |Item=String (mandatory)
   |Item=String (mandatory)
   |Source=String
   |Source=String
Line 9: Line 9:
   |Category=String
   |Category=String
   |EventRules=Boolean
   |EventRules=Boolean
}}</noinclude><includeonly><div style="display: none"><!--
}}</noinclude><includeonly><!--


### Cargo Store ###
### Cargo Store ###
-->{{#cargo_store:_table=Sources
--><span style='display: none;'>{{#cargo_store:_table=ExtraSourceData
   |Item={{{Item}}}<!--                    This one is required. That's why in the previous section it has (mandatory) tagged onto it. -->
   |Item={{{Item}}}
   |Source={{{Source|{{PAGENAME}}}}}<!--  Defaults to the page the template is called on. -->
   |Source={{{Source|{{PAGENAME}}}}}
   |Link={{{Link|{{PAGENAME}}}}}<!--      Again, defaults to the page the template is called on. -->
   |Link={{{Link|{{PAGENAME}}}}}
   |SpecialText={{{SpecialText|None}}}<!-- These two will both default to 'None' and in the query I will handle what to do if they are as such.-->
   |SpecialText={{{SpecialText|None}}}
   |Category={{{Category|None}}}<!--      The reason is that they are both optional, but best practice is to not have empty cells in the database.-->
   |Category={{{Category|None}}}
   |EventRules={{#if:{{{EventRules|}}}|1|0}}
   |EventRules={{#if:{{{EventRules|}}}|1|0}}
  }}</div>{{#if:{{{1|}}}{{{2|}}}{{{3|}}}{{{4|}}}|<tr>
  }}</span></includeonly><noinclude>This template is used to add in all of the sources that aren't covered by other tables. Not to be confused with the ItemSources table that lists all sourcess for an item.
  {{#if:{{{1|}}}|<td>{{{1}}}</td>}}
{{#if:{{{2|}}}|<td>{{{2}}}</td>}}
  <pre>
{{#if:{{{3|}}}|<td>{{{3}}}</td>}}
{{Sources/datarow
  {{#if:{{{4|}}}|<td>{{{4}}}</td>}}</tr>|}}</includeonly>
  |Item=                                  Required. The full name of the item.
  |Source=                                Optional. Defaults to the page the template is called on.
  |Link=                                  Optional. Again, defaults to the page the template is called on. This one is useful for if you'd rather link to a section on a page.
  |SpecialText=                          Optional. For a small blurb to differentiate it from the source (Ex: Setting it to "World 3" for items in that section of the Gem Shop)
  |Category=                              Optional. Vestigual parameter that probably isn't even used, but is retained until all uses are removed.
  |EventRules=                            Semi-Required. A boolean. This is purely for items that are dropped from any enemy during special events like Giftmas.
                                              This is "Semi-Required" because it is triggered if set to anything at all so if the item isn't using Event Rules you DON'T set it.
}}
   
</pre></noinclude>

Latest revision as of 03:09, 22 March 2024

This template defines the table "ExtraSourceData". View table.This template is used to add in all of the sources that aren't covered by other tables. Not to be confused with the ItemSources table that lists all sourcess for an item.

 {{Sources/datarow
  |Item=                                  Required. The full name of the item.
  |Source=                                Optional. Defaults to the page the template is called on.
  |Link=                                  Optional. Again, defaults to the page the template is called on. This one is useful for if you'd rather link to a section on a page.
  |SpecialText=                           Optional. For a small blurb to differentiate it from the source (Ex: Setting it to "World 3" for items in that section of the Gem Shop)
  |Category=                              Optional. Vestigual parameter that probably isn't even used, but is retained until all uses are removed.
  |EventRules=                            Semi-Required. A boolean. This is purely for items that are dropped from any enemy during special events like Giftmas.
                                              This is "Semi-Required" because it is triggered if set to anything at all so if the item isn't using Event Rules you DON'T set it.
 }}