Editing Template:Card

From LOTR-TCG Wiki
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
<noinclude>
<noinclude>
{{#template_params:1|2}}
{{#template_params:1|2}}
Parameter 1 should refer to the card. Usually this can just be the card name: ''<nowiki>{{Card|The One Ring, The Ruling Ring}}</nowiki>'' or ''<nowiki>{{Card|The Ruling Ring}}</nowiki>'' produce {{Card|The Ruling Ring}}. If you want to link to a different version of the same card, you can use the card's collector number: ''<nowiki>{{Card|4C2}}</nowiki>'' produces {{Card|4C2}}. If that doesn't work, you can instead use the "Wiki Base Card ID" parameter, found in each card page's infobox under "Technical Info". For example, using ''<nowiki>{{Card|LOTR-EN15G060.0}}</nowiki>'' is currently the only working way to link to the Gondor version {{Card|LOTR-EN15G060.0}}.
Parameter 2 is the language code, which will produce the appropriate title + image for the requested language.  ''<nowiki>{{Card|Gimli, Son of Gloin|FR}}</nowiki>'' produces {{Card|Gimli, Son of Gloin|FR}}, and ''<nowiki>{{Card|Gimli, Son of Gloin|TW}}</nowiki>'' produces the tengwar {{Card|Gimli, Son of Gloin|TW}}.
If the card is not found (due to a typo, for instance), then it will display like this: {{Card|Glimlik, Son of Gloin}}.
</noinclude><includeonly>{{#if:{{#pos:{{{1}}}|0}}{{#pos:{{{1}}}|1}}{{#pos:{{{1}}}|2}}{{#pos:{{{1}}}|3}}{{#pos:{{{1}}}|4}}{{#pos:{{{1}}}|5}}{{#pos:{{{1}}}|6}}{{#pos:{{{1}}}|7}}{{#pos:{{{1}}}|8}}{{#pos:{{{1}}}|9}}|{{#cargo_query:
</noinclude><includeonly>{{#if:{{#pos:{{{1}}}|0}}{{#pos:{{{1}}}|1}}{{#pos:{{{1}}}|2}}{{#pos:{{{1}}}|3}}{{#pos:{{{1}}}|4}}{{#pos:{{{1}}}|5}}{{#pos:{{{1}}}|6}}{{#pos:{{{1}}}|7}}{{#pos:{{{1}}}|8}}{{#pos:{{{1}}}|9}}|{{#cargo_query:
   tables=Cards=C,CardReleases=CR,CardReleases=ECR
   tables=Cards=C,CardReleases=CR,CardReleases=ECR
Line 29: Line 23:
   , IFNULL(CR.Subtitle,ECR.Subtitle)=Subtitle
   , IFNULL(CR.Subtitle,ECR.Subtitle)=Subtitle
   , IFNULL(CR.CollInfo,C.CollInfo)=CollInfo
   , IFNULL(CR.CollInfo,C.CollInfo)=CollInfo
   |where= (C.Title LIKE '{{#replace:{{{1}}}|'|''}}' OR C.Subtitle LIKE '{{#replace:{{{1}}}|'|''}}' OR (C.Title LIKE '{{#explode:{{#replace:{{{1}}}|'|''}}|, |0}}' AND C.Subtitle LIKE TRIM('{{#explode:{{#replace:{{{1}}}|'|''}}|, |1}}'))) AND CR.LanguageCode = '{{{2|EN}}}'
   |where= (C.Subtitle LIKE '{{#replace:{{{1}}}|'|''}}' OR C.Title LIKE '{{#replace:{{{1}}}|'|''}}' OR (C.Title LIKE '{{#explode:{{#replace:{{{1}}}|'|''}}|, |0}}' AND C.Subtitle LIKE TRIM('{{#explode:{{#replace:{{{1}}}|'|''}}|,|1}}'))) AND CR.LanguageCode = '{{{2|EN}}}'
   |order by=CASE WHEN C.SetNum = '0' THEN 100 ELSE CASE WHEN C.SETNUM REGEXP '^-?[0-9]+$' THEN CAST(C.SetNum AS UNSIGNED INTEGER) ELSE 100 END END, CASE WHEN C.Subset = 'S' THEN 0 WHEN C.Subset = 'F' THEN 1 WHEN C.Subset = 'P' THEN 0 WHEN C.Subset = 'D' THEN 1 ELSE 10 END,  C.CardNum
   |order by=CASE WHEN C.SetNum = '0' THEN 100 ELSE CASE WHEN C.SETNUM REGEXP '^-?[0-9]+$' THEN CAST(C.SetNum AS UNSIGNED INTEGER) ELSE 100 END END, CASE WHEN C.Subset = 'S' THEN 0 WHEN C.Subset = 'F' THEN 1 WHEN C.Subset = 'P' THEN 0 WHEN C.Subset = 'D' THEN 1 ELSE 10 END,  C.CardNum
   |limit=1
   |limit=1
Line 38: Line 32:
   |default={{PageLookup|{{{1}}}}}
   |default={{PageLookup|{{{1}}}}}
   }}
   }}
}}</includeonly>
}}xxx{{#replace:{{{1}}}|'|''}}</includeonly>
Please note that all contributions to the LOTR-TCG Wiki may be edited, altered, or removed by other contributors. Your writing is liable to be edited mercilessly, so be sure to back up any major claims with links if possible.

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)