Permanently protected template

Difference between revisions of "Template:OCG-TCG card image"

From Yugipedia
Jump to: navigation, search
(prevent the template from vomiting all over everything if it isn't given a card name and can't figure it out from the image name; minor rewording)
(that might help)
Line 40: Line 40:
 
}}{{ #if: {{ #var: $fn_set }} | {{ #vardefine: $fn_name | {{ #explode: {{ #var: $fn_name_set }} | -{{ #var: $fn_set }} }} }}
 
}}{{ #if: {{ #var: $fn_set }} | {{ #vardefine: $fn_name | {{ #explode: {{ #var: $fn_name_set }} | -{{ #var: $fn_set }} }} }}
  
}}{{ #vardefine: $para_name        | {{ #replace: {{{name<noinclude>|Jinzo 7</noinclude>}}} | # }}<!-- original input; should match card's page name including anything in "()" ("#" is allowed/stripped here simply for backwards compatibility, since previously the template required the card's printed name rather than the name of its article) -->
+
}}{{ #vardefine: $para_name        | {{ #replace: {{{name|<noinclude>Jinzo 7</noinclude>}}} | # }}<!-- original input; should match card's page name including anything in "()" ("#" is allowed/stripped here simply for backwards compatibility, since previously the template required the card's printed name rather than the name of its article) -->
 
}}{{ #vardefine: $para_name        | {{ #var: $para_name | {{ #var: $fn_name | {{ #var: $fn_name_set }} }} }}<!-- if no name is given, fall back on the name in the image name (which will fall apart for anything with spaces, etc. in its name, but sometimes we'll luck out and get a single-word name with no punctuation); if we couldn't separate the name from the set, just use that since at least then the template output won't be completely borked (the name and set stuff will probably be completely useless in this case, though) -->
 
}}{{ #vardefine: $para_name        | {{ #var: $para_name | {{ #var: $fn_name | {{ #var: $fn_name_set }} }} }}<!-- if no name is given, fall back on the name in the image name (which will fall apart for anything with spaces, etc. in its name, but sometimes we'll luck out and get a single-word name with no punctuation); if we couldn't separate the name from the set, just use that since at least then the template output won't be completely borked (the name and set stuff will probably be completely useless in this case, though) -->
 
}}{{ #vardefine: $para_pretty_name  | {{Card name|{{ #var: $para_name }}}}<!-- name as it will be displayed; should include e.g. "#" and exclude "(stuff)" -->
 
}}{{ #vardefine: $para_pretty_name  | {{Card name|{{ #var: $para_name }}}}<!-- name as it will be displayed; should include e.g. "#" and exclude "(stuff)" -->

Revision as of 13:33, 23 June 2016

  1. Cite error: Invalid <ref> tag; no text was provided for refs named {{{rarity}}}
  2. [[#cite_ref-'"`UNIQ--ref-00000001-QINU`"'_2-0|↑]] Cite error: Invalid <ref> tag; no text was provided for refs named [1]