Template:Infobox VG: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 9: Line 9:
{{Alternating rows table section
{{Alternating rows table section
|es=background:#f0f0f0;
|es=background:#f0f0f0;
|{{#if:{{{channeltype|}}}| {{!}} '''Type''' {{!!}} {{{channeltype|}}} }}
|{{#if:{{{channeltype|}}}| {{!}} '''Type''' {{!!}} {{{channeltype|}}}}}


|<!--Should output Developer category links, but complicated by vgrelease/commas-->{{#if:{{{developer|}}}|{{!}}'''Developer(s)'''{{!!}}{{{developer|}}} }}
|<!--Should output Developer category links, but complicated by vgrelease/commas-->{{#if:{{{developer|}}}|{{!}}'''Developer(s)'''{{!!}}{{{developer|}}}}}


|<!--Should output Publisher category links, but complicated by vgrelease/commas-->{{#if:{{{publisher|}}}|{{!}}'''Publisher(s)'''{{!!}}{{{publisher|}}} }}
|<!--Should output Publisher category links, but complicated by vgrelease/commas-->{{#if:{{{publisher|}}}|{{!}}'''Publisher(s)'''{{!!}}{{{publisher|}}}}}


|<!--Series Category Links (up to 3)-->{{#if:{{{series|}}}|{{!}} '''Series''' {{!!}} <!--1st-->{{#regex: {{#regex: {{{series|}}}|/''/|}}|/([^,]*).*/r|[[:Category:$1 series|$1]]|1}}<!--2nd-->{{#regex: {{#regex: {{{series|}}}|/''/|}}|/[^,]*,([^,]*)(,.*)?/r|, [[:Category:$1 series|$1]]|1}}<!--3rd-->{{#regex: {{#regex: {{{series|}}}|/''/|}}|/(?:[^,]*,){2}([^,]*)(,.*)?/r|, [[:Category:$1 series|$1]]|1}}}}
|<!--Series Category Links (up to 3)-->
{{#if:{{{series|}}}|{{!}} '''Series''' {{!!}}
<!--1st-->{{#regex: {{#regex: {{{series|}}}|/''/|}}|/([^,]*).*/r|[[:Category:$1 series|$1]]|1}}
<!--2nd-->{{#regex: {{#regex: {{{series|}}}|/''/|}}|/[^,]*,([^,]*)(,.*)?/r|, [[:Category:$1 series|$1]]|1}}
<!--3rd-->{{#regex: {{#regex: {{{series|}}}|/''/|}}|/(?:[^,]*,){2}([^,]*)(,.*)?/r|, [[:Category:$1 series|$1]]|1}}
}}


|{{#if:{{{platform|{{{platforms|}}}}}}| {{!}} '''Platform(s)''' {{!!}} {{{platform|{{{platforms|}}}}}} }}
|{{#if:{{{platform|{{{platforms|}}}}}}| {{!}} '''Platform(s)''' {{!!}} {{{platform|{{{platforms|}}}}}} }}
|{{#if:{{{released|{{{release|}}}}}}| {{!}} {{nowrap|'''Release date(s)'''}} {{!!}} {{{released|{{{release}}}}}} }}
|{{#if:{{{released|{{{release|}}}}}}| {{!}} {{nowrap|'''Release date(s)'''}} {{!!}} {{{released|{{{release}}}}}}
}}


|<!--Genre category links (up to 16)-->{{#if:{{{genre|}}}|{{!}}'''Genre(s)'''{{!!}}<!--1st-->{{#regex: {{{genre|}}}|/([^,]*).*/r|[[:Category:$1 games|$1]]|1}}<!--2nd-->{{#regex: {{{genre|}}}|/[^,]*,([^,]*)(,.*)?/r|, [[:Category:$1 games|$1]]|1}}<!--3rd-->{{#regex: {{{genre|}}}|/(?:[^,]*,){2}([^,]*)(,.*)?/r|, [[:Category:$1 games|$1]]|1}}<!--4th-->{{#regex: {{{genre|}}}|/(?:[^,]*,){3}([^,]*)(,.*)?/r|, [[:Category:$1 games|$1]]|1}}<!--5th-->{{#regex: {{{genre|}}}|/(?:[^,]*,){4}([^,]*)(,.*)?/r|, [[:Category:$1 games|$1]]|1}}<!--6th-->{{#regex: {{{genre|}}}|/(?:[^,]*,){5}([^,]*)(,.*)?/r|, [[:Category:$1 games|$1]]|1}}<!--7th-->{{#regex: {{{genre|}}}|/(?:[^,]*,){6}([^,]*)(,.*)?/r|, [[:Category:$1 games|$1]]|1}}<!--8th-->{{#regex: {{{genre|}}}|/(?:[^,]*,){7}([^,]*)(,.*)?/r|, [[:Category:$1 games|$1]]|1}}<!--9th-->{{#regex: {{{genre|}}}|/(?:[^,]*,){8}([^,]*)(,.*)?/r|, [[:Category:$1 games|$1]]|1}}<!--10th-->{{#regex: {{{genre|}}}|/(?:[^,]*,){9}([^,]*)(,.*)?/r|, [[:Category:$1 games|$1]]|1}}<!--11th-->{{#regex: {{{genre|}}}|/(?:[^,]*,){10}([^,]*)(,.*)?/r|, [[:Category:$1 games|$1]]|1}}<!--12th-->{{#regex: {{{genre|}}}|/(?:[^,]*,){11}([^,]*)(,.*)?/r|, [[:Category:$1 games|$1]]|1}}<!--13th-->{{#regex: {{{genre|}}}|/(?:[^,]*,){12}([^,]*)(,.*)?/r|, [[:Category:$1 games|$1]]|1}}<!--14th-->{{#regex: {{{genre|}}}|/(?:[^,]*,){13}([^,]*)(,.*)?/r|, [[:Category:$1 games|$1]]|1}}<!--15th-->{{#regex: {{{genre|}}}|/(?:[^,]*,){14}([^,]*)(,.*)?/r|, [[:Category:$1 games|$1]]|1}}<!--16th-->{{#regex: {{{genre|}}}|/(?:[^,]*,){15}([^,]*)(,.*)?/r|, [[:Category:$1 games|$1]]|1}}}}
|<!--Genre category links (up to 16)-->
{{#if:{{{genre|}}}|{{!}}'''Genre(s)'''{{!!}}
<!--1st-->{{#regex: {{{genre|}}}|/([^,]*).*/r|[[:Category:$1 games|$1]]|1}}
<!--2nd-->{{#regex: {{{genre|}}}|/[^,]*,([^,]*)(,.*)?/r|, [[:Category:$1 games|$1]]|1}}
<!--3rd-->{{#regex: {{{genre|}}}|/(?:[^,]*,){2}([^,]*)(,.*)?/r|, [[:Category:$1 games|$1]]|1}}
<!--4th-->{{#regex: {{{genre|}}}|/(?:[^,]*,){3}([^,]*)(,.*)?/r|, [[:Category:$1 games|$1]]|1}}
<!--5th-->{{#regex: {{{genre|}}}|/(?:[^,]*,){4}([^,]*)(,.*)?/r|, [[:Category:$1 games|$1]]|1}}
<!--6th-->{{#regex: {{{genre|}}}|/(?:[^,]*,){5}([^,]*)(,.*)?/r|, [[:Category:$1 games|$1]]|1}}
<!--7th-->{{#regex: {{{genre|}}}|/(?:[^,]*,){6}([^,]*)(,.*)?/r|, [[:Category:$1 games|$1]]|1}}
<!--8th-->{{#regex: {{{genre|}}}|/(?:[^,]*,){7}([^,]*)(,.*)?/r|, [[:Category:$1 games|$1]]|1}}
<!--9th-->{{#regex: {{{genre|}}}|/(?:[^,]*,){8}([^,]*)(,.*)?/r|, [[:Category:$1 games|$1]]|1}}
<!--10th-->{{#regex: {{{genre|}}}|/(?:[^,]*,){9}([^,]*)(,.*)?/r|, [[:Category:$1 games|$1]]|1}}
<!--11th-->{{#regex: {{{genre|}}}|/(?:[^,]*,){10}([^,]*)(,.*)?/r|, [[:Category:$1 games|$1]]|1}}
<!--12th-->{{#regex: {{{genre|}}}|/(?:[^,]*,){11}([^,]*)(,.*)?/r|, [[:Category:$1 games|$1]]|1}}
<!--13th-->{{#regex: {{{genre|}}}|/(?:[^,]*,){12}([^,]*)(,.*)?/r|, [[:Category:$1 games|$1]]|1}}
<!--14th-->{{#regex: {{{genre|}}}|/(?:[^,]*,){13}([^,]*)(,.*)?/r|, [[:Category:$1 games|$1]]|1}}
<!--15th-->{{#regex: {{{genre|}}}|/(?:[^,]*,){14}([^,]*)(,.*)?/r|, [[:Category:$1 games|$1]]|1}}
<!--16th-->{{#regex: {{{genre|}}}|/(?:[^,]*,){15}([^,]*)(,.*)?/r|, [[:Category:$1 games|$1]]|1}}
}}


|<!--Gameplay mode category links-->
|<!--Gameplay mode category links-->
Line 26: Line 50:
{{#ifeq:{{#regex:{{{modes|}}}|/.*[Ss]ingle.*/|Single-player}}|Single-player|[[:Category:Single-player games|Single-player]]|}}
{{#ifeq:{{#regex:{{{modes|}}}|/.*[Ss]ingle.*/|Single-player}}|Single-player|[[:Category:Single-player games|Single-player]]|}}
{{#ifeq:{{#regex:{{{modes|}}}|/.*[Mm]ultiplayer.*/|Multiplayer}}|Multiplayer|{{#ifeq:{{#regex:{{{modes|}}}|/.*[Ss]ingle.*/|Prior}}|Prior|, |}} [[:Category:Multiplayer games|Multiplayer]]{{#regex:{{{modes|}}}|/.*[Mm]ultiplayer([^,]*).*/|$1}}|}}
{{#ifeq:{{#regex:{{{modes|}}}|/.*[Mm]ultiplayer.*/|Multiplayer}}|Multiplayer|{{#ifeq:{{#regex:{{{modes|}}}|/.*[Ss]ingle.*/|Prior}}|Prior|, |}} [[:Category:Multiplayer games|Multiplayer]]{{#regex:{{{modes|}}}|/.*[Mm]ultiplayer([^,]*).*/|$1}}|}}
?
{{#ifeq:{{#regex:{{{modes|}}}|/.*[Cc]o-op.*/|Co-op}}|Co-op|{{#ifeq:{{#regex:{{{modes|}}}|/.*([Ss]ingle{{!}}[Mm]ultiplayer).*/|Prior}}|Prior|, |}} [[:Category:Co-op games|Co-op]]{{#regex:{{{modes|}}}|/.*[Cc]o-op([^,]*).*/|$1}}|}}
{{#ifeq:{{#regex:{{{modes|}}}|/.*[Cc]o-op.*/|Co-op}}|Co-op|{{#ifeq:{{#regex:{{{modes|}}}|/.*([Ss]ingle).*/|Prior}}|Prior|, |}} [[:Category:Co-op games|Co-op]]{{#regex:{{{modes|}}}|/.*[Cc]o-op([^,]*).*/|$1}}|}}
{{#ifeq:{{#regex:{{{modes|}}}|/.*[Oo]nline.*/|Online}}|Online|{{#ifeq:{{#regex:{{{modes|}}}|/.*([Ss]ingle{{!}}[Mm]ultiplayer{{!}}[Cc]o-op).*/|Prior}}|Prior|, |}} [[:Category:Online games|Online]]{{#regex:{{{modes|}}}|/.*[Oo]nline([^,]*).*/|$1}}|}}
?
{{#ifeq:{{#regex:{{{modes|}}}|/.*[Oo]nline.*/|Online}}|Online|{{#ifeq:{{#regex:{{{modes|}}}|/.*([Ss]ingle|[Mm]ultiplayer|[Cc]o-op).*/|Prior}}|Prior|, |}} [[:Category:Online games|Online]]{{#regex:{{{modes|}}}|/.*[Oo]nline([^,]*).*/|$1}}|}}
}}
}}


|<!--Should output category links here, but complicated by + syntax-->{{#if:{{{input|}}}| {{!}} '''Input methods''' {{!!}} {{{input|}}} }}
|<!--Should output category links here, but complicated by + syntax-->{{#if:{{{input|}}}| {{!}} '''Input methods''' {{!!}} {{{input|}}}}}
|{{!}} '''Compatibility''' {{!!}} {{ratings|{{#if:{{{nonerror|}}}|nonerror=true{{!}}|}}{{PAGENAME}}}}
|{{!}} '''Compatibility''' {{!!}} {{ratings|{{#if:{{{nonerror|}}}|nonerror=true{{!}}|}}{{PAGENAME}}}}
|{{!}} '''See also...''' {{!!}}
|{{!}} '''See also...''' {{!!}}