Difference between pages "Template:Card query" and "Template:Card query/sandbox"
(Difference between pages)
Dinoguy1000 (talk | contribs) (extra_column(2) support for unhiding Attribute/Type columns) |
Dinoguy1000 (talk | contribs) (sync) |
||
Line 29: | Line 29: | ||
| ocg-only = [[Medium::OCG-only]] | | ocg-only = [[Medium::OCG-only]] | ||
| tcg-only = [[Medium::TCG-only]] | | tcg-only = [[Medium::TCG-only]] | ||
− | | rush duel = [[ | + | | rush duel = [[Medium::Rush Duel]] |
| anime = [[Concept:Anime cards]] | | anime = [[Concept:Anime cards]] | ||
| anime-only = [[Category:Anime cards with no OCG/TCG counterpart]] | | anime-only = [[Category:Anime cards with no OCG/TCG counterpart]] | ||
Line 36: | Line 36: | ||
| vg = [[Concept:Video game cards]] | | vg = [[Concept:Video game cards]] | ||
| vg-only = [[Category:Video game cards with no OCG/TCG counterpart]] | | vg-only = [[Category:Video game cards with no OCG/TCG counterpart]] | ||
− | | duel links = [[ | + | | duel links = [[Release::Yu-Gi-Oh! Duel Links]] |
| non-official = <q>[[Concept:Anime cards]] OR [[Concept:Manga cards]] OR [[Concept:Video game cards]]</q> | | non-official = <q>[[Concept:Anime cards]] OR [[Concept:Manga cards]] OR [[Concept:Video game cards]]</q> | ||
}} | }} | ||
Line 62: | Line 62: | ||
| spell = spell | | spell = spell | ||
| trap = trap | | trap = trap | ||
+ | | skill = skill | ||
| speedspell = speed spell | | speedspell = speed spell | ||
− | | | + | | virus = virus |
− | |||
− | |||
| equip = equip | | equip = equip | ||
| illusion = illusion | | illusion = illusion | ||
− | |||
| ritual = ritual | | ritual = ritual | ||
− | |||
− | |||
| trap-spell | trapspell | spell-trap | spelltrap = trap spell | | trap-spell | trapspell | spell-trap | spelltrap = trap spell | ||
− | | | + | | trap-equip | trapequip = trap-equip |
+ | | ??? = ??? | ||
| spell/trap | s/t | nonmonster | non-monster = non-monster | | spell/trap | s/t | nonmonster | non-monster = non-monster | ||
− | | | + | | tip = tip |
− | + | | strategy = strategy | |
− | |||
− | | | ||
− | |||
| faq = faq | | faq = faq | ||
− | |||
− | |||
− | |||
− | |||
| all | any = any | | all | any = any | ||
| #default = {{ #if: {{{type|}}} | {{ #vardefine: $cq_card_type_unknown | 1 }} }} | | #default = {{ #if: {{{type|}}} | {{ #vardefine: $cq_card_type_unknown | 1 }} }} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
}} | }} | ||
}}{{ #vardefine: $cq_card_type | {{ #var: $cq_card_type | {{ #vardefine: $cq_monster_count | {{ #ask: {{ #var: $cq_medium_query }}{{ #var: $cq_query }}[[Card type::Monster Card]] | format=count }} | }}{{ #vardefine: $cq_card_type | {{ #var: $cq_card_type | {{ #vardefine: $cq_monster_count | {{ #ask: {{ #var: $cq_medium_query }}{{ #var: $cq_query }}[[Card type::Monster Card]] | format=count }} | ||
Line 114: | Line 95: | ||
| spell = [[Card type::Spell Card]] | | spell = [[Card type::Spell Card]] | ||
| trap = [[Card type::Trap Card]] | | trap = [[Card type::Trap Card]] | ||
+ | | skill = <q>[[Card type::Skill Card]] OR [[Page type::Skill page]]</q> | ||
| speed spell = [[Card type::Speed Spell Card]] | | speed spell = [[Card type::Speed Spell Card]] | ||
− | | | + | | virus = [[Card type::Virus Card]] |
− | |||
− | |||
| equip = [[Card type::Equip Card]] | | equip = [[Card type::Equip Card]] | ||
| illusion = [[Card type::Illusion Card]] | | illusion = [[Card type::Illusion Card]] | ||
− | |||
| ritual = [[Card type::Ritual Card]] | | ritual = [[Card type::Ritual Card]] | ||
− | |||
− | |||
| trap spell = [[Card type::Trap Spell Card]] | | trap spell = [[Card type::Trap Spell Card]] | ||
− | | | + | | trap-equip = [[Card type::Trap-Equip Card]] |
+ | | ??? = [[Card type::???]] | ||
| non-monster = [[Concept:Non-monster cards]] | | non-monster = [[Concept:Non-monster cards]] | ||
− | | | + | | tip = [[Card type::Tip Card]] |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
| strategy = [[Card type::Strategy Card]] | | strategy = [[Card type::Strategy Card]] | ||
− | | | + | | faq = [[Card type::FAQ Card]] |
− | |||
}} | }} | ||
}}{{ #vardefine: $cq_concept_query | {{ #switch: {{ #var: $cq_medium }}/{{ #var: $cq_card_type }} | }}{{ #vardefine: $cq_concept_query | {{ #switch: {{ #var: $cq_medium }}/{{ #var: $cq_card_type }} | ||
− | | official/monster | + | | official/monster = [[Concept:CG monsters]] |
− | | official/spell | + | | official/spell = [[Concept:CG Spell Cards]] |
− | | official/trap | + | | official/trap = [[Concept:CG Trap Cards]] |
− | | official/non-monster | + | | official/non-monster = [[Concept:CG non-monster cards]] |
− | | | + | | anime/monster = [[Concept:Anime monsters]] |
− | | | + | | anime/spell = [[Concept:Anime Spell Cards]] |
− | | | + | | anime/trap = [[Concept:Anime Trap Cards]] |
− | | | + | | anime/non-monster = [[Concept:Anime non-monsters]] |
− | | | + | | manga/monster = [[Concept:Manga monsters]] |
− | | | + | | manga/spell = [[Concept:Manga Spell Cards]] |
− | | | + | | manga/trap = [[Concept:Manga Trap Cards]] |
− | | | + | | manga/non-monster = [[Concept:Manga non-monsters]] |
+ | | vg/monster = [[Concept:Video game monsters]] | ||
+ | | vg/spell = [[Concept:Video game Spell Cards]] | ||
+ | | vg/trap = [[Concept:Video game Trap Cards]] | ||
+ | | vg/non-monster = [[Concept:Video game non-monsters]] | ||
}} | }} | ||
}}{{ #vardefine: $cq_full_query | {{ #var: $cq_concept_query | {{ #var: $cq_medium_query }}{{ #var: $cq_card_type_query }} }}{{ #var: $cq_query }} | }}{{ #vardefine: $cq_full_query | {{ #var: $cq_concept_query | {{ #var: $cq_medium_query }}{{ #var: $cq_card_type_query }} }}{{ #var: $cq_query }} | ||
Line 167: | Line 142: | ||
| {{ #vardefine: $cq_col_primary_type | ?Primary type | | {{ #vardefine: $cq_col_primary_type | ?Primary type | ||
}}{{ #vardefine: $cq_col_secondary_type | {{ #ifeq: {{ #ask: {{ #var: $cq_full_query }} [[Secondary type::+]] | format=count }} | 0 || {{ #if: {{ #pos: {{ #var: $cq_query_lc }} | {{!((}}secondary type:: }} | {{ #if: {{ #pos: {{ #var: $cq_query_normalized }} | {{!((}}secondary type::^ }} | ?Secondary type | {{ #ifeq: {{{extra_column}}} | Secondary type | ?Secondary type }} }} | ?Secondary type }} }} | }}{{ #vardefine: $cq_col_secondary_type | {{ #ifeq: {{ #ask: {{ #var: $cq_full_query }} [[Secondary type::+]] | format=count }} | 0 || {{ #if: {{ #pos: {{ #var: $cq_query_lc }} | {{!((}}secondary type:: }} | {{ #if: {{ #pos: {{ #var: $cq_query_normalized }} | {{!((}}secondary type::^ }} | ?Secondary type | {{ #ifeq: {{{extra_column}}} | Secondary type | ?Secondary type }} }} | ?Secondary type }} }} | ||
− | }}{{ #vardefine: $cq_col_attribute | {{ #if: {{ #pos: {{ #var: $cq_query_lc }} | {{!((}}attribute:: }} | {{ #if: {{ #pos: {{ #var: $cq_query_normalized }} | {{!((}}attribute::^ }} | ?Attribute = [[Attribute]] | + | }}{{ #vardefine: $cq_col_attribute | {{ #if: {{ #pos: {{ #var: $cq_query_lc }} | {{!((}}attribute:: }} | {{ #if: {{ #pos: {{ #var: $cq_query_normalized }} | {{!((}}attribute::^ }} | ?Attribute = [[Attribute]] }} | ?Attribute = [[Attribute]] }} |
− | }}{{ #vardefine: $cq_col_type | {{ #if: {{ #pos: {{ #var: $cq_query_lc }} | {{!((}}type:: }} | {{ #if: {{ #pos: {{ #var: $cq_query_normalized }} | {{!((}}type::^ }} | ?Type = [[Type]] | + | }}{{ #vardefine: $cq_col_type | {{ #if: {{ #pos: {{ #var: $cq_query_lc }} | {{!((}}type:: }} | {{ #if: {{ #pos: {{ #var: $cq_query_normalized }} | {{!((}}type::^ }} | ?Type = [[Type]] }} | ?Type = [[Type]] }} |
}}<!-- | }}<!-- | ||
* if the query doesn't do anything special regarding Level, Rank, monster (sub)type, or medium, display "Level/Rank" | * if the query doesn't do anything special regarding Level, Rank, monster (sub)type, or medium, display "Level/Rank" | ||
Line 218: | Line 193: | ||
}} | }} | ||
}} | }} | ||
− | }} | + | }}{{ #vardefine: $cq_col_level/rank/link | {{ #if: {{ #var: $cq_col_level/rank/link_label }} |
− | + | | ?Stars string = {{ #var: $cq_col_level/rank/link_label }} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
}} | }} | ||
}}<!-- | }}<!-- | ||
Line 236: | Line 205: | ||
| ?ATK string = [[ATK]]{{ #if: {{ #var: $cq_equal_atkdef }} | /<br />[[DEF]] }} | | ?ATK string = [[ATK]]{{ #if: {{ #var: $cq_equal_atkdef }} | /<br />[[DEF]] }} | ||
}} }}{{ #ifeq: {{ #ask: {{ #var: $cq_full_query }} [[DEF string::+]] | format=count }} | 0 | }} }}{{ #ifeq: {{ #ask: {{ #var: $cq_full_query }} [[DEF string::+]] | format=count }} | 0 | ||
− | || {{ #vardefine: $cq_col_def | {{ #if: {{ #pos: {{ #var: $cq_query_normalized }} | {{!((}}def }} | + | | {{ #vardefine: $cq_col_link_rating | ?Link Rating = [[Link Rating|Link]] }} |
+ | | {{ #vardefine: $cq_col_def | {{ #if: {{ #pos: {{ #var: $cq_query_normalized }} | {{!((}}def }} | ||
| {{ #if: {{ #pos: {{ #var: $cq_query_normalized }} | def::^ }}{{ #pos: {{ #var: $cq_query_normalized }} | {{!((}}atk }} | | {{ #if: {{ #pos: {{ #var: $cq_query_normalized }} | def::^ }}{{ #pos: {{ #var: $cq_query_normalized }} | {{!((}}atk }} | ||
| {{ #if: {{ #var: $cq_equal_atkdef }} || ?DEF string = [[DEF]] }} | | {{ #if: {{ #var: $cq_equal_atkdef }} || ?DEF string = [[DEF]] }} | ||
Line 242: | Line 212: | ||
| {{ #if: {{ #var: $cq_equal_atkdef }} || ?DEF string = [[DEF]] }} | | {{ #if: {{ #var: $cq_equal_atkdef }} || ?DEF string = [[DEF]] }} | ||
}} }} | }} }} | ||
− | + | }}{{ #vardefine: $cq_col_maximum_atk | {{ #ifeq: {{ #var: $cq_medium }} | rush duel | {{ #ifeq: {{ #ask: {{ #var: $cq_full_query }} [[MAXIMUM ATK::+]] | format=count }} | 0 || ?MAXIMUM ATK#- = [[MAXIMUM ATK]] }} }} | |
− | |||
− | |||
− | }}{{ #vardefine: $cq_col_maximum_atk | {{ #ifeq: {{ #var: $cq_medium }} | rush duel | {{ #ifeq: {{ #ask: {{ #var: $cq_full_query }} [[MAXIMUM ATK::+]] | format=count }} | 0 | ||
− | |||
− | |||
− | |||
}} | }} | ||
| {{ #vardefine: $cq_col_property | {{ #if: {{ #pos: {{ #var: $cq_query_lc }} | {{!((}}property:: }} | {{ #if: {{ #pos: {{ #var: $cq_query_normalized }} | {{!((}}property::^ }} | ?Property = [[Property]] | {{ #ifeq: {{{extra_column}}} | Property | ?Property = [[Property]] }} }} | ?Property = [[Property]] }} | | {{ #vardefine: $cq_col_property | {{ #if: {{ #pos: {{ #var: $cq_query_lc }} | {{!((}}property:: }} | {{ #if: {{ #pos: {{ #var: $cq_query_normalized }} | {{!((}}property::^ }} | ?Property = [[Property]] | {{ #ifeq: {{{extra_column}}} | Property | ?Property = [[Property]] }} }} | ?Property = [[Property]] }} | ||
}}{{ #ifeq: {{ #var: $cq_card_type }} | skill | }}{{ #ifeq: {{ #var: $cq_card_type }} | skill | ||
− | || {{ #vardefine: $cq_col_card_type_st | {{ #if: {{ #var: $cq_col_card_type }} | {{ #switch: {{ #var: $cq_card_type }} | non-monster | + | || {{ #vardefine: $cq_col_card_type_st | {{ #if: {{ #var: $cq_col_card_type }} | {{ #switch: {{ #var: $cq_card_type }} | non-monster | <!-- empty --> = {{ #var: $cq_col_card_type }} [[Card type]] }} }} |
}}{{ #vardefine: $cq_col_card_type_st | {{ #if: {{ #var: $cq_col_property }} | {{ #var: $cq_col_card_type_st }} }} | }}{{ #vardefine: $cq_col_card_type_st | {{ #if: {{ #var: $cq_col_property }} | {{ #var: $cq_col_card_type_st }} }} | ||
}} | }} | ||
}} | }} | ||
− | }}{{ #vardefine: $cq_col_extra | {{ #if: {{{extra_column|}}} | {{ #switch: {{{extra_column}}} | Secondary type | + | }}{{ #vardefine: $cq_col_extra | {{ #if: {{{extra_column|}}} | {{ #switch: {{{extra_column}}} | Secondary type | Property = | #default= ?{{{extra_column}}} }} }} |
− | }}{{ #vardefine: $cq_col_extra_2 | {{ #if: {{{extra_column2|}}} | + | }}{{ #vardefine: $cq_col_extra_2 | {{ #if: {{{extra_column2|}}} | ?{{{extra_column2}}} }} |
}}<!-- | }}<!-- | ||
Line 282: | Line 246: | ||
|{{ #var: $cq_col_type }} | |{{ #var: $cq_col_type }} | ||
|{{ #var: $cq_col_level/rank/link }} | |{{ #var: $cq_col_level/rank/link }} | ||
− | |||
− | |||
|{{ #var: $cq_col_scale }} | |{{ #var: $cq_col_scale }} | ||
|{{ #var: $cq_col_atk }} | |{{ #var: $cq_col_atk }} | ||
Line 317: | Line 279: | ||
{{ #var: $cq_col_type }} | {{ #var: $cq_col_type }} | ||
{{ #var: $cq_col_level/rank/link }} | {{ #var: $cq_col_level/rank/link }} | ||
− | |||
− | |||
{{ #var: $cq_col_scale }} | {{ #var: $cq_col_scale }} | ||
{{ #var: $cq_col_atk }} | {{ #var: $cq_col_atk }} | ||
Line 369: | Line 329: | ||
-->{{ #if: {{{debug<includeonly>|</includeonly>}}} | <nowiki/> | -->{{ #if: {{{debug<includeonly>|</includeonly>}}} | <nowiki/> | ||
− | * <code>#ask</code> query | + | * <code>#ask</code> query: <code>{{ #tag: nowiki | {{ #var: $cq_full_query }} }}</code> |
* <abbr title="query entered">$cq_query</abbr>: <code>{{ #tag: nowiki | {{ #var: $cq_query }} }}</code> | * <abbr title="query entered">$cq_query</abbr>: <code>{{ #tag: nowiki | {{ #var: $cq_query }} }}</code> | ||
* <abbr title="lowercased query entered">$cq_query_lc</abbr>: <code>{{ #tag: nowiki | {{ #var: $cq_query_lc }} }}</code> | * <abbr title="lowercased query entered">$cq_query_lc</abbr>: <code>{{ #tag: nowiki | {{ #var: $cq_query_lc }} }}</code> | ||
Line 379: | Line 339: | ||
* <abbr title="processed $cq_card_type ready to use on the query">$cq_card_type_query</abbr>: <code>{{ #tag: nowiki | {{ #var: $cq_card_type_query }} }}</code> | * <abbr title="processed $cq_card_type ready to use on the query">$cq_card_type_query</abbr>: <code>{{ #tag: nowiki | {{ #var: $cq_card_type_query }} }}</code> | ||
* <abbr title="concept used to reduce load for queries asking for common medium+card type combos">$cq_concept_query</abbr>: <code>{{ #tag: nowiki | {{ #var: $cq_concept_query }} }}</code> | * <abbr title="concept used to reduce load for queries asking for common medium+card type combos">$cq_concept_query</abbr>: <code>{{ #tag: nowiki | {{ #var: $cq_concept_query }} }}</code> | ||
− | |||
− | |||
− | |||
− | |||
* <abbr title="enable/disable «?Card type» column">$cq_col_card_type</abbr>: <code>{{ #tag: nowiki | {{ #var: $cq_col_card_type }} }}</code> | * <abbr title="enable/disable «?Card type» column">$cq_col_card_type</abbr>: <code>{{ #tag: nowiki | {{ #var: $cq_col_card_type }} }}</code> | ||
− | |||
− | |||
* <abbr title="for monster cards, enable/disable «?Primary type» column">$cq_col_primary_type</abbr>: <code>{{ #tag: nowiki | {{ #var: $cq_col_primary_type }} }}</code> | * <abbr title="for monster cards, enable/disable «?Primary type» column">$cq_col_primary_type</abbr>: <code>{{ #tag: nowiki | {{ #var: $cq_col_primary_type }} }}</code> | ||
* <abbr title="for monster cards, enable/disable «?Secondary type» column">$cq_col_secondary_type</abbr>: <code>{{ #tag: nowiki | {{ #var: $cq_col_secondary_type }} }}</code> | * <abbr title="for monster cards, enable/disable «?Secondary type» column">$cq_col_secondary_type</abbr>: <code>{{ #tag: nowiki | {{ #var: $cq_col_secondary_type }} }}</code> | ||
* <abbr title="for monster cards, enable/disable «?Attribute» column">$cq_col_attribute</abbr>: <code>{{ #tag: nowiki | {{ #var: $cq_col_attribute }} }}</code> | * <abbr title="for monster cards, enable/disable «?Attribute» column">$cq_col_attribute</abbr>: <code>{{ #tag: nowiki | {{ #var: $cq_col_attribute }} }}</code> | ||
* <abbr title="for monster cards, enable/disable «?Type» column">$cq_col_type</abbr>: <code>{{ #tag: nowiki | {{ #var: $cq_col_type }} }}</code> | * <abbr title="for monster cards, enable/disable «?Type» column">$cq_col_type</abbr>: <code>{{ #tag: nowiki | {{ #var: $cq_col_type }} }}</code> | ||
− | |||
− | |||
− | |||
− | |||
* <abbr title="for monster cards, enable/disable «?Stars string» column">$cq_col_level/rank/link</abbr>: <code>{{ #tag: nowiki | {{ #var: $cq_col_level/rank/link }} }}</code> | * <abbr title="for monster cards, enable/disable «?Stars string» column">$cq_col_level/rank/link</abbr>: <code>{{ #tag: nowiki | {{ #var: $cq_col_level/rank/link }} }}</code> | ||
− | |||
− | |||
* <abbr title="for monster cards, enable/disable «?Pendulum Scale» column">$cq_col_scale</abbr>: <code>{{ #tag: nowiki | {{ #var: $cq_col_scale }} }}</code> | * <abbr title="for monster cards, enable/disable «?Pendulum Scale» column">$cq_col_scale</abbr>: <code>{{ #tag: nowiki | {{ #var: $cq_col_scale }} }}</code> | ||
* <abbr title="for monster cards, enable/disable «?Link Rating» column">$cq_col_link_rating</abbr>: <code>{{ #tag: nowiki | {{ #var: $cq_col_link_rating }} }}</code> | * <abbr title="for monster cards, enable/disable «?Link Rating» column">$cq_col_link_rating</abbr>: <code>{{ #tag: nowiki | {{ #var: $cq_col_link_rating }} }}</code> | ||
− | |||
* <abbr title="for monster cards, enable/disable «?ATK string» column">$cq_col_atk</abbr>: <code>{{ #tag: nowiki | {{ #var: $cq_col_atk }} }}</code> | * <abbr title="for monster cards, enable/disable «?ATK string» column">$cq_col_atk</abbr>: <code>{{ #tag: nowiki | {{ #var: $cq_col_atk }} }}</code> | ||
* <abbr title="for monster cards, enable/disable «?DEF string» column">$cq_col_def</abbr>: <code>{{ #tag: nowiki | {{ #var: $cq_col_def }} }}</code> | * <abbr title="for monster cards, enable/disable «?DEF string» column">$cq_col_def</abbr>: <code>{{ #tag: nowiki | {{ #var: $cq_col_def }} }}</code> | ||
Line 428: | Line 375: | ||
}}{{ #vardefine: $cq_col_level_rank_flags | }}{{ #vardefine: $cq_col_level_rank_flags | ||
}}{{ #vardefine: $cq_col_level/rank/link | }}{{ #vardefine: $cq_col_level/rank/link | ||
− | |||
− | |||
}}{{ #vardefine: $cq_col_scale | }}{{ #vardefine: $cq_col_scale | ||
}}{{ #vardefine: $cq_col_atk | }}{{ #vardefine: $cq_col_atk |