Template:Infobox VG: Difference between revisions
Jump to navigation
Jump to search
(before, the regex fixes for search links in tl_infobox_autotitle weren't being applied to pages which had lowercase titles (e.g. de Blob). this should fix the issue.) |
(minor bug fix for the new autotitle regexes in a comparison check used before listing alternate console versions) |
||
Line 1: | Line 1: | ||
<includeonly><!-- | <includeonly><!-- | ||
Restore the "three special pagename characters". | |||
{{PAGENAME}} always return the page name with occurrences of the characters ", & and ' replaced with ", & and ', respectively. While this normally doesn't cause any harm, it doesn't play nice with the search links generated by this template (especially for Redmine), so {{PAGENAME}} goes through a series of nested RegExp queries to undo those replacements before actually being processed and stored on {{#var:tl_infobox_autotitle}}. | {{PAGENAME}} always return the page name with occurrences of the characters ", & and ' replaced with ", & and ', respectively. While this normally doesn't cause any harm, it doesn't play nice with the search links generated by this template (especially for Redmine), so {{PAGENAME}} goes through a series of nested RegExp queries to undo those replacements before actually being processed and stored on {{#var:tl_infobox_autotitle}}. | ||
-->{{#vardefine: | -->{{#vardefine:tl_infobox_searchfix|{{#regex:{{#regex:{{#regex:{{#var:tl_lowercase_title|{{PAGENAME}}}}|/"/|"}}|/&/|&}}|/'/|'}}}}<!-- | ||
Strip console from title | |||
-->{{#vardefine:tl_infobox_autotitle|{{#regex:{{#var:tl_infobox_searchfix}}|/\((Arcade{{!}}C64{{!}}Genesis{{!}}MSX{{!}}NES{{!}}SNES{{!}}SMS{{!}}TurboGrafx-16{{!}}Wii{{!}}GC{{!}}WiiWare{{!}}Triforce{{!}}Metroid Prime\: Trilogy)\)/|}}}}<!-- | |||
Wikitable | Wikitable | ||
Line 11: | Line 15: | ||
-->{| class="{{#ifeq:{{{collapsible|}}}|yes|collapsible {{{state|autocollapse}}}}} infobox vevent" style="float:{{{align|right}}}; width:{{{width|300px}}}; font-size:90%; text-align:left;" cellspacing="0" cellpadding="3" | -->{| class="{{#ifeq:{{{collapsible|}}}|yes|collapsible {{{state|autocollapse}}}}} infobox vevent" style="float:{{{align|right}}}; width:{{{width|300px}}}; font-size:90%; text-align:left;" cellspacing="0" cellpadding="3" | ||
|- | |- | ||
! colspan=2 style="font-size:110%; text-align:center;" class="summary" | ''{{#tag:nowiki|{{#var:tl_infobox_autotitle | ! colspan=2 style="font-size:110%; text-align:center;" class="summary" | ''{{#tag:nowiki|{{#var:tl_infobox_autotitle}}}}''<!-- nowiki tag is needed here for Chindōchō!! Pole no Daibōken --> | ||
{{#ifeq:{{{show image|}}}|yes|<table style="width:100%;font-size:90%; background:none;">|{{!}}-}} | {{#ifeq:{{{show image|}}}|yes|<table style="width:100%;font-size:90%; background:none;">|{{!}}-}} | ||
{{#if:{{{image|}}}| | {{#if:{{{image|}}}| | ||
Line 48: | Line 52: | ||
}} | }} | ||
|{{!}} '''See also...''' {{!!}} | |{{!}} '''See also...''' {{!!}} | ||
{{#ifeq:{{#var:tl_infobox_autotitle}}|{{#var: | {{#ifeq:{{#var:tl_infobox_autotitle}}|{{#var:tl_infobox_searchfix}}||{{#ifexist:{{#var:tl_infobox_autotitle}} (Arcade)|{{#ifeq:{{#var:tl_infobox_autotitle}} (Arcade)|{{PAGENAME}}||[[{{#var:tl_infobox_autotitle}} (Arcade)|Arcade Version]]<br /> | ||
}}}}{{#ifexist:{{#var:tl_infobox_autotitle}} (C64)|{{#ifeq:{{#var:tl_infobox_autotitle}} (C64)|{{PAGENAME}}||[[{{#var:tl_infobox_autotitle}} (C64)|C64 Version]]<br /> | }}}}{{#ifexist:{{#var:tl_infobox_autotitle}} (C64)|{{#ifeq:{{#var:tl_infobox_autotitle}} (C64)|{{PAGENAME}}||[[{{#var:tl_infobox_autotitle}} (C64)|C64 Version]]<br /> | ||
}}}}{{#ifexist:{{#var:tl_infobox_autotitle}} (Genesis)|{{#ifeq:{{#var:tl_infobox_autotitle}} (Genesis)|{{PAGENAME}}||[[{{#var:tl_infobox_autotitle}} (Genesis)|Genesis Version]]<br /> | }}}}{{#ifexist:{{#var:tl_infobox_autotitle}} (Genesis)|{{#ifeq:{{#var:tl_infobox_autotitle}} (Genesis)|{{PAGENAME}}||[[{{#var:tl_infobox_autotitle}} (Genesis)|Genesis Version]]<br /> |