Difference between revisions of "Template:OCG-TCG card image"
Dinoguy1000 (talk | contribs) (fix) |
Dinoguy1000 (talk | contribs) (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) |
||
Line 37: | Line 37: | ||
}}{{ #vardefine: $fn_alt | {{ #explode: {{ #var: $filename }} | - | {{ #var: $count }} }} | }}{{ #vardefine: $fn_alt | {{ #explode: {{ #var: $filename }} | - | {{ #var: $count }} }} | ||
}}{{ #vardefine: $fn_name_set | {{ #var: $fn_name_set | {{ #explode: {{ #var: $filename }} | -{{ #var: $fn_rarity | {{ #var: $fn_edition | {{ #var: $fn_release | {{ #var: $fn_alt }} }} }} }} }} }} | }}{{ #vardefine: $fn_name_set | {{ #var: $fn_name_set | {{ #explode: {{ #var: $filename }} | -{{ #var: $fn_rarity | {{ #var: $fn_edition | {{ #var: $fn_release | {{ #var: $fn_alt }} }} }} }} }} }} | ||
− | }}{{ #ifexpr: {{ #len: {{ #explode: {{ #var: $fn_name_set }} | - | -1 }} }} < | + | }}{{ #ifexpr: {{ #len: {{ #explode: {{ #var: $fn_name_set }} | - | -1 }} }} < 5 | {{ #vardefine: $fn_set | {{ #explode: {{ #var: $fn_name_set }} | - | -1 }} }} |
}}{{ #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 }} }}<!-- 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) --> | + | }}{{ #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)" --> | ||
}}{{ #vardefine: $has_article | {{ #var: $para_pretty_name }}<!-- card has a page --> | }}{{ #vardefine: $has_article | {{ #var: $para_pretty_name }}<!-- card has a page --> | ||
Line 156: | Line 156: | ||
}} | }} | ||
}}{{imbox | }}{{imbox | ||
− | | text = This is a card image for the {{ #if: {{ #var: $para_rarity_full }} | [[{{ #var: $para_rarity_full }}]] }} {{ #if: {{ #var: $para_edition_full }} | [[{{ #var: $para_edition_full }}]] }} {{ #if: {{ #var: $para_release_full }} | {{ #switch: {{ #var: $para_release }} | Anime | Manga | VG = {{ #var: $para_release_full }} | [[{{ #var: $para_release_full }}]] }} }} card "[[{{ #var: $para_page_name }}|{{ #var: $para_pretty_name }}]]" from the [[Set Card Galleries:{{ #var: $para_pretty_set }} ({{ #var: $para_ocg_tcg }}-{{ #var: $para_region }}{{ #switch: {{ #var: $para_region }} | JP | JA | TC = | #default = {{ #if: {{ #var: $para_edition_abbr }} | -{{ #var: $para_edition_abbr }} | {{ #if: {{ #var: $para_release }} | -1E }} }} }})|{{ #var: $para_region_full }}]] | + | | text = This is a card image for the {{ #if: {{ #var: $para_rarity_full }} | [[{{ #var: $para_rarity_full }}]] }} {{ #if: {{ #var: $para_edition_full }} | [[{{ #var: $para_edition_full }}]] }} {{ #if: {{ #var: $para_release_full }} | {{ #switch: {{ #var: $para_release }} | Anime | Manga | VG = {{ #var: $para_release_full }} | [[{{ #var: $para_release_full }}]] }} }} card "[[{{ #var: $para_page_name }}|{{ #var: $para_pretty_name }}]]" from the [[Set Card Galleries:{{ #var: $para_pretty_set }} ({{ #var: $para_ocg_tcg }}-{{ #var: $para_region }}{{ #switch: {{ #var: $para_region }} | JP | JA | TC = | #default = {{ #if: {{ #var: $para_edition_abbr }} | -{{ #var: $para_edition_abbr }} | {{ #if: {{ #var: $para_release }} | -1E }} }} }})|{{ #var: $para_region_full }}]] print of ''[[{{ #var: $para_set_full }}|{{ #var: $para_pretty_set }}]]''. You can also view a [[Special:Prefixindex/File:{{ #var: $para_url_name }}|list]] {{ #ifeq: {{ #var: $para_url_name }} | {{ #var: $para_old_url_name }} || <span class="cardimageoldname" style="display: none;">([[Special:Prefixindex/File:{{ #var: $para_old_url_name }}|old]])</span> }} {{ #ifexist: Card Gallery:{{ #var: $para_name }} | and [[Card Gallery:{{ #var: $para_name }}|gallery]] }} of all images uploaded for "{{ #var: $para_pretty_name }}". |
}} | }} | ||
{{ #ifeq: {{ #var: $ns }} | {{NS:6}} | {{Fair use}} }}<noinclude>{{Documentation}}</noinclude> | {{ #ifeq: {{ #var: $ns }} | {{NS:6}} | {{Fair use}} }}<noinclude>{{Documentation}}</noinclude> |
Revision as of 13:27, 23 June 2016
This image is named incorrectly, and must be renamed to comply with the image policy. The image should be located at [[:File:Jinzo7-OCG--[1].png]]. Please do not reupload this image; a mover or admin will be along shortly to move it to the correct name. Movers and administrators: What links here • Image history • Rename image |
This is a card image for the [[[[#cite_note-'"`UNIQ--ref-00000001-QINU`"'-2|[2]]]]] card "Jinzo #7" from the [[Set Card Galleries:Template:Set (-)|]] print of [[Template:Set|Template:Set]]. You can also view a list and gallery of all images uploaded for "Jinzo #7". |
{{OCG-TCG card image}} displays information about card images, including links to the card, set, rarity, and edition, as well as links to a prefix search for all images of that card and to the card's gallery page, if one exists. It also adds {{Fair use}} to card images, and in the future, may add categories as well.
This template is ready to use now, and should be added to all new card images as they are uploaded, if they are of a TCG or OCG card. While its functionality may change in the future, its usage will not, so there's no need to worry about current transclusions needing to be updated in the future.
Usage
{{OCG-TCG card image | name = | set = | region = | rarity = | edition = | release = | alt = }}
name
- The English name of the card.
set
- The set prefix as displayed in the card's set number (e.g.
TAEV
from "TAEV-EN040"). region
- The region the card is for. The template can accept either the two-letter region code (
JP
) or the region name (Japanese
). If there is no region code on the card, list it asNA
(for "North American region"). rarity
- The card's rarity. The template can accept either the rarity abbreviation (
ScR
) or the full name of the rarity (Secret Rare
). edition
- Whether the card is 1st (
1E
), Unlimited (UE
), or Limited (LE
) Edition. This parameter should also be used for Duel Terminal Edition (DT
) and Strategy (SC
) cards. release
- Whether the card is an Official Proxy (
OP
), Giant Card (GC
), Case Topper (CT
), or Replica (RP
). These values can also be used with theedition
parameter, though usingrelease
is preferred. alt
- Whether this is an alternate artwork version of the card. This parameter should generally not be needed.
Unused parameters should be deleted.
Maintenance
This template helps automate maintenance in a few ways:
- If one or more required parameters isn't supplied, the template outputs an error message with the name of the parameter(s). This means you can simply add "{{OCG-TCG card image}}" to an image and click "Preview" to get a list of parameters.
- The template checks to make sure that the value in the "name" parameter points to an actual article, and if not, notifies that the value should be checked. It then checks to make sure the value matches the article's actual name, and notifies if the match fails (this is useful when moving pages around).
- When correctly filled out, this template automatically identifies, tags, and categorizes card images that should be renamed to conform with the image policy, saving the tagger (and the administrator renaming the image) some work, since {{Rename media}} doesn't have to be added to or removed from the image.
- The template automatically detects non-PNG images and recommends that a PNG version be uploaded and the non-PNG version be tagged for deletion, as recommended by the image policy. This message can be ignored if a PNG version is not known to exist, and the user doesn't know how to create one.
See also
- {{Card image name}}
- {{R}}
- {{Region}}, {{Rg}}, and {{Rgo}}