Template:Infobox VG: Difference between revisions

Fix regexp escaping
(Clean up modes categories)
(Fix regexp escaping)
Line 54: Line 54:
Data Quality Categories-->{{#ifeq:{{#regex:{{{modes|}}}|/.*(Single-Player).*/|$1}}|Single-Player|[[Category:Game pages with mis-capitalized Single-player]]|}}{{#if:{{{compatibility|}}}|[[Category:Pages with an un-needed compatibility param in InfoBox]]|}}{{#if:{{{released|}}}{{{release|}}}||[[Category:Game pages without release date(s)]]}}{{#if:{{{forumlink|}}}||[[Category:Game pages without Dolphin forum link]]}}{{#if:{{{genre|}}}||[[Category:Game pages without genre]]}}{{#if:{{{modes|}}}||{{#ifeq:{{{genre|}}}|Utility||[[Category:Game pages without modes of play]]}}}}{{#if:{{{input|}}}||[[Category:Game pages without possible inputs]]}}{{#if: {{{series|}}}|{{#if:{{#regex: {{{series|}}}|/''/r||1}}||[[Category:Game pages with non-italic series]]}}}}{{#ifeq:{{#regex:{{{input|}}}|/.*(Gamecube).*/|$1}}|Gamecube|[[Category:Game page with improperly capitalized inputs]]|}}{{#ifeq:{{#regex:{{{input|}}}|/.*(controller).*/|$1}}|controller|[[Category:Game page with improperly capitalized inputs]]|}}{{#ifeq:{{#regex:{{{input|}}}|/.*(wii).*/|$1}}|wii|[[Category:Game page with improperly capitalized inputs]]|}}{{#ifeq:{{#regex:{{{input|}}}|/.*(Balance board).*/|$1}}|Balance board|[[Category:Game page with improperly capitalized inputs]]|}}{{#ifeq:{{#regex:{{{input|}}}|/.*(nunchuk).*/|$1}}|nunchuk|[[Category:Game page with improperly capitalized inputs]]|}}{{#ifeq:{{#regex:{{{input|}}}|/.*(balance board).*/|$1}}|balance board|[[Category:Game page with improperly capitalized inputs]]|}}{{#ifeq:{{#regex:{{{input|}}}|/.*(Wiimote).*/|$1}}|Wiimote|[[Category:Game page with Wiimote rather than Wii Remote]]|}}<!--
Data Quality Categories-->{{#ifeq:{{#regex:{{{modes|}}}|/.*(Single-Player).*/|$1}}|Single-Player|[[Category:Game pages with mis-capitalized Single-player]]|}}{{#if:{{{compatibility|}}}|[[Category:Pages with an un-needed compatibility param in InfoBox]]|}}{{#if:{{{released|}}}{{{release|}}}||[[Category:Game pages without release date(s)]]}}{{#if:{{{forumlink|}}}||[[Category:Game pages without Dolphin forum link]]}}{{#if:{{{genre|}}}||[[Category:Game pages without genre]]}}{{#if:{{{modes|}}}||{{#ifeq:{{{genre|}}}|Utility||[[Category:Game pages without modes of play]]}}}}{{#if:{{{input|}}}||[[Category:Game pages without possible inputs]]}}{{#if: {{{series|}}}|{{#if:{{#regex: {{{series|}}}|/''/r||1}}||[[Category:Game pages with non-italic series]]}}}}{{#ifeq:{{#regex:{{{input|}}}|/.*(Gamecube).*/|$1}}|Gamecube|[[Category:Game page with improperly capitalized inputs]]|}}{{#ifeq:{{#regex:{{{input|}}}|/.*(controller).*/|$1}}|controller|[[Category:Game page with improperly capitalized inputs]]|}}{{#ifeq:{{#regex:{{{input|}}}|/.*(wii).*/|$1}}|wii|[[Category:Game page with improperly capitalized inputs]]|}}{{#ifeq:{{#regex:{{{input|}}}|/.*(Balance board).*/|$1}}|Balance board|[[Category:Game page with improperly capitalized inputs]]|}}{{#ifeq:{{#regex:{{{input|}}}|/.*(nunchuk).*/|$1}}|nunchuk|[[Category:Game page with improperly capitalized inputs]]|}}{{#ifeq:{{#regex:{{{input|}}}|/.*(balance board).*/|$1}}|balance board|[[Category:Game page with improperly capitalized inputs]]|}}{{#ifeq:{{#regex:{{{input|}}}|/.*(Wiimote).*/|$1}}|Wiimote|[[Category:Game page with Wiimote rather than Wii Remote]]|}}<!--


Developer categories-->{{#if:{{{developer|}}}|{{#ifeq:{{#regex:{{{developer|}}}|/>/r|}}||<!--1st-->{{#regex:{{{developer|}}}|/([^,]*).*/r|[[Category:Developed by $1]]|1}}<!--2nd-->{{#regex:{{{developer|}}}|/[^,]*,([^,]*)(,.*)?/r|[[Category:Developed by $1]]|1}}<!--3rd-->{{#regex:{{{developer|}}}|/(?:[^,]*,){2}([^,]*)(,.*)?/r|[[Category:Developed by $1]]|1}}|<!--NA-->{{#regex:{{{developer|}}}|/.*?NA.*?>.*?>\s*([^\[]*).*/r|[[Category:Developed by $1]]|1}}<!--EU-->{{#regex:{{{developer|}}}|/.*?EU.*?>.*?>([^/[]*).*/r|[[Category:Developed by $1]]|1}}<!--JP-->{{#regex:{{{developer|}}}|/.*?JP.*?>.*?>([^/[]*).*/r|[[Category:Developed by $1]]|1}}<!--AUS-->{{#regex:{{{developer|}}}|/.*?AUS.*?>.*?>([^/[]*).*/r|[[Category:Developed by $1]]|1}}}}}}<!--
Developer categories-->{{#if:{{{developer|}}}|{{#ifeq:{{#regex:{{{developer|}}}|/>/r|}}||<!--1st-->{{#regex:{{{developer|}}}|/([^,]*).*/r|[[Category:Developed by $1]]|1}}<!--2nd-->{{#regex:{{{developer|}}}|/[^,]*,([^,]*)(,.*)?/r|[[Category:Developed by $1]]|1}}<!--3rd-->{{#regex:{{{developer|}}}|/(?:[^,]*,){2}([^,]*)(,.*)?/r|[[Category:Developed by $1]]|1}}|<!--NA-->{{#regex:{{{developer|}}}|/.*?NA.*?>.*?>\s*([^\[]*).*/r|[[Category:Developed by $1]]|1}}<!--EU-->{{#regex:{{{developer|}}}|/.*?EU.*?>.*?>([^\[]*).*/r|[[Category:Developed by $1]]|1}}<!--JP-->{{#regex:{{{developer|}}}|/.*?JP.*?>.*?>([^\[]*).*/r|[[Category:Developed by $1]]|1}}<!--AUS-->{{#regex:{{{developer|}}}|/.*?AUS.*?>.*?>([^\[]*).*/r|[[Category:Developed by $1]]|1}}}}}}<!--


Publisher categories: regional ones are outputting as text rather than as categories for some reason, seems to have something to do with the replacement used.-->{{#if:{{{publisher|}}}|{{#ifeq:{{#regex:{{{publisher|}}}|/>/r|}}||<!--1st-->{{#regex:{{{publisher|}}}|/([^,]*).*/r|[[Category:Published by $1]]|1}}<!--2nd-->{{#regex:{{{publisher|}}}|/[^,]*,([^,]*)(,.*)?/r|[[Category:Published by $1]]|1}}<!--3rd-->{{#regex:{{{publisher|}}}|/(?:[^,]*,){2}([^,]*)(,.*)?/r|[[Category:Published by]]|1}}|<!--NA-->{{#regex:{{{publisher|}}}|/.*?NA.*?>.*?>\s*([^\[]*).*/r|[[Category:Published by $1]]|1}}<!--EU-->{{#regex:{{{publisher|}}}|/.*?EU.*?>.*?>\s*([^\[]*).*/r|[[Category:Published by $1]]|1}}<!--JP-->{{#regex:{{{publisher|}}}|/.*?JP.*?>.*?>\s*([^\[]*).*/r|[[Category:Published by $1]]|1}}<!--AUS-->{{#regex:{{{publisher|}}}|/.*?AUS.*?>.*?>\s*([^\[]*).*/r|[[Category:Published by $1]]|1}}}}}}<!--
Publisher categories: regional ones are outputting as text rather than as categories for some reason, seems to have something to do with the replacement used.-->{{#if:{{{publisher|}}}|{{#ifeq:{{#regex:{{{publisher|}}}|/>/r|}}||<!--1st-->{{#regex:{{{publisher|}}}|/([^,]*).*/r|[[Category:Published by $1]]|1}}<!--2nd-->{{#regex:{{{publisher|}}}|/[^,]*,([^,]*)(,.*)?/r|[[Category:Published by $1]]|1}}<!--3rd-->{{#regex:{{{publisher|}}}|/(?:[^,]*,){2}([^,]*)(,.*)?/r|[[Category:Published by]]|1}}|<!--NA-->{{#regex:{{{publisher|}}}|/.*?NA.*?>.*?>\s*([^\[]*).*/r|[[Category:Published by $1]]|1}}<!--EU-->{{#regex:{{{publisher|}}}|/.*?EU.*?>.*?>\s*([^\[]*).*/r|[[Category:Published by $1]]|1}}<!--JP-->{{#regex:{{{publisher|}}}|/.*?JP.*?>.*?>\s*([^\[]*).*/r|[[Category:Published by $1]]|1}}<!--AUS-->{{#regex:{{{publisher|}}}|/.*?AUS.*?>.*?>\s*([^\[]*).*/r|[[Category:Published by $1]]|1}}}}}}<!--