Template:Infobox VG: Difference between revisions

minor bug fix for the new autotitle regexes in a comparison check used before listing alternate console versions
(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><!--


Grab page name minus console and restore the "three special pagename characters".
Restore the "three special pagename characters".


{{PAGENAME}} always return the page name with occurrences of the characters ", & and ' replaced with &#34;, &#38; and &#39;, 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 &#34;, &#38; and &#39;, 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:tl_infobox_autotitle|{{#regex:{{#regex:{{#regex:{{#regex:{{#var:tl_lowercase_title|{{PAGENAME}}}}|/&#34;/|"}}|/&#38;/|&}}|/&#39;/|'}}|/\((Arcade{{!}}C64{{!}}Genesis{{!}}MSX{{!}}NES{{!}}SNES{{!}}SMS{{!}}TurboGrafx-16{{!}}Wii{{!}}GC{{!}}WiiWare{{!}}Triforce{{!}}Metroid Prime\: Trilogy)\)/|}}}}<!--
-->{{#vardefine:tl_infobox_searchfix|{{#regex:{{#regex:{{#regex:{{#var:tl_lowercase_title|{{PAGENAME}}}}|/&#34;/|"}}|/&#38;/|&}}|/&#39;/|'}}}}<!--
 
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|{{PAGENAME}}}}}}''<!-- nowiki tag is needed here for Chindōchō!! Pole no Daibōken -->
! 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:tl_lowercase_title|{{PAGENAME}}}}||{{#ifexist:{{#var:tl_infobox_autotitle}} (Arcade)|{{#ifeq:{{#var:tl_infobox_autotitle}} (Arcade)|{{PAGENAME}}||[[{{#var:tl_infobox_autotitle}} (Arcade)|Arcade Version]]<br />
{{#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 />
6,906

edits