Anonymous edits have been disabled on the wiki. If you want to contribute please login or create an account.


Warning for game developers: PCGamingWiki staff members will only ever reach out to you using the official press@pcgamingwiki.com mail address.
Be aware of scammers claiming to be representatives or affiliates of PCGamingWiki who promise a PCGW page for a game key.

Difference between revisions of "Development:Infobox game"

From PCGamingWiki, the wiki about fixing PC games
(test VR only via Cargo)
 
(67 intermediate revisions by the same user not shown)
Line 4: Line 4:
 
{{#if: {{{cover|}}} |
 
{{#if: {{{cover|}}} |
 
<tr>
 
<tr>
<td class="template-infobox-cover" colspan="2">{{#ifexist: File:{{{cover}}} | [[File:{{{cover}}}{{!}}{{{cover size|300px}}}{{!}}alt={{{title|{{PAGENAME}}}}} cover]]{{#set:|Cover={{filepath:{{{cover}}}}}|Cover filename=File:{{{cover}}}}} |''Cover image missing, please <span class="plainlinks">[{{fullurl:Special:Upload|wpDestFile={{urlencode:{{{cover}}}|WIKI}}}} upload it]</span>''[[Category:Pages needing cover images]]}}</td>
+
<td class="template-infobox-cover" colspan="2">{{#ifexist: File:{{{cover}}} | [[File:{{{cover}}}{{!}}{{{cover size|300px}}}{{!}}alt={{{title|{{PAGENAME}}}}} cover]] |''Cover image missing, please <span class="plainlinks">[{{fullurl:Special:Upload|wpDestFile={{urlencode:{{{cover}}}|WIKI}}}} upload it]</span>''[[Category:Pages needing cover images]]}}</td>
 
</tr>
 
</tr>
 
|[[Category:Pages needing cover images]]}}
 
|[[Category:Pages needing cover images]]}}
Line 59: Line 59:
 
-->}}<!--
 
-->}}<!--
 
  Icons --><!--
 
  Icons --><!--
  storing WSGF Link state -->{{#vardefine:WSGF Link|{{#show: {{PAGENAME}} | ?WSGF Link #}}}}<!--
+
  storing WSGF Link state -->{{#arraymap:{{#cargo_query:tables=Video|where=_pageID = {{PAGEID}} AND WSGF_Link IS NOT NULL|fields=WSGF_Link|default=}}|\s|€€€€€|{{#if:{{#var:WSGF output}}||{{#vardefine:WSGF output|€€€€€}}}}}}{{#ifeq:{{#var:WSGF output}}|<div||{{#vardefine:WSGF Link|{{#var:WSGF output}}}}}}<!--
  storing digital state -->{{#vardefine:available digitally|{{#show: {{PAGENAME}} | ?Available digitally}}}}{{#if: {{{wikipedia|}}}{{{gogcom id|}}}{{{steam appid|}}}{{{winehq|}}}{{{strategywiki|}}}{{{mobygames|}}}{{{igdb|}}}{{#var:WSGF Link}}{{{official site|}}}|
+
  storing digital state -->{{#vardefine:available digitally|{{#cargo_query:tables=Tags|where=_pageID = {{PAGEID}}|fields=Available_digitally|no html|default=}}}}{{#if: {{{wikipedia|}}}{{{gogcom id|}}}{{{steam appid|}}}{{{winehq|}}}{{{strategywiki|}}}{{{mobygames|}}}{{{igdb|}}}{{#var:WSGF Link}}{{{official site|}}}|
 
<tr>
 
<tr>
 
<td class="template-infobox-icons" colspan="2"><!--
 
<td class="template-infobox-icons" colspan="2"><!--
Line 69: Line 69:
 
|data=coopgameid=gameid,coopurl=urlSlug
 
|data=coopgameid=gameid,coopurl=urlSlug
 
}} | <span class="error">Error: Invalid JSON.</span> ||<div title="{{PAGENAME}} on Co-Optimus" class="plainlinks template-infobox-icon svg-icon infobox-cooptimus">[https://www.co-optimus.com/game/{{#external_value:coopgameid}}/pc/{{#external_value:coopurl}}.html &nbsp;]</div>}} }}--><!--
 
}} | <span class="error">Error: Invalid JSON.</span> ||<div title="{{PAGENAME}} on Co-Optimus" class="plainlinks template-infobox-icon svg-icon infobox-cooptimus">[https://www.co-optimus.com/game/{{#external_value:coopgameid}}/pc/{{#external_value:coopurl}}.html &nbsp;]</div>}} }}--><!--
-->{{#if: {{{gogcom id|}}} | {{#vardefine:cloud|needed}}<div title="{{PAGENAME}} in GOG Database" class="plainlinks template-infobox-icon svg-icon infobox-gogdb">[[File:Icon overlay.png|link=https://www.gogdb.org/product/{{{gogcom id|}}}]]</div> {{#if:{{#var:Windows DOSBox}}{{#var:OS X DOSBox}}{{#var:Linux DOSBox}}|{{#ifeq:{{#show: {{PAGENAME}} | ?Cloud support GOG Galaxy}}|true|{{#vardefine:GOG.com DOSBox cloud|true}}}}}}}}<!--
+
-->{{#if: {{{gogcom id|}}} | {{#vardefine:cloud|needed}}<div title="{{PAGENAME}} in GOG Database" class="plainlinks template-infobox-icon svg-icon infobox-gogdb">[[File:Icon overlay.png|link=https://www.gogdb.org/product/{{{gogcom id|}}}]]</div> {{#if:{{#var:Windows DOSBox}}{{#var:OS X DOSBox}}{{#var:Linux DOSBox}}|{{#ifeq:{{#cargo_query:tables=Cloud|where=_pageID = {{PAGEID}}|fields=GOG_Galaxy|no html|default=}}|true|{{#vardefine:GOG.com DOSBox cloud|true}}}}}}}}<!--
 
-->{{#if: {{{hltb|{{#var:hltb|}}}}} | <div title="{{PAGENAME}} on HowLongToBeat" class="template-infobox-icon svg-icon infobox-hltb">[[File:Icon overlay.png|link=https://howlongtobeat.com/game?id={{{hltb|{{#var:hltb|}}}}}|{{PAGENAME}} on HowLongToBeat]]</div>}}<!--
 
-->{{#if: {{{hltb|{{#var:hltb|}}}}} | <div title="{{PAGENAME}} on HowLongToBeat" class="template-infobox-icon svg-icon infobox-hltb">[[File:Icon overlay.png|link=https://howlongtobeat.com/game?id={{{hltb|{{#var:hltb|}}}}}|{{PAGENAME}} on HowLongToBeat]]</div>}}<!--
 
-->{{#if: {{#var:igdb|{{{igdb|}}}}} | <div title="{{PAGENAME}} on IGDB" class="template-infobox-icon svg-icon infobox-igdb">[[File:Icon overlay.png|link=https://www.igdb.com/games/{{#var:igdb|{{{igdb|}}}}}|{{PAGENAME}} on IGDB]]</div>}}<!--
 
-->{{#if: {{#var:igdb|{{{igdb|}}}}} | <div title="{{PAGENAME}} on IGDB" class="template-infobox-icon svg-icon infobox-igdb">[[File:Icon overlay.png|link=https://www.igdb.com/games/{{#var:igdb|{{{igdb|}}}}}|{{PAGENAME}} on IGDB]]</div>}}<!--
Line 79: Line 79:
 
-->{{#if: {{{wikipedia|}}} | <div title="{{PAGENAME}} on Wikipedia" class="template-infobox-icon svg-icon infobox-wikipedia">[[File:Icon overlay.png|link=Wikipedia:{{{wikipedia}}}|{{PAGENAME}} on Wikipedia]]</div>}}<!--
 
-->{{#if: {{{wikipedia|}}} | <div title="{{PAGENAME}} on Wikipedia" class="template-infobox-icon svg-icon infobox-wikipedia">[[File:Icon overlay.png|link=Wikipedia:{{{wikipedia}}}|{{PAGENAME}} on Wikipedia]]</div>}}<!--
 
-->{{#if: {{{winehq|}}} | <div title="{{PAGENAME}} on WineHQ" class="plainlinks template-infobox-icon svg-icon infobox-winehq">[[File:Icon overlay.png|link=https://appdb.winehq.org/objectManager.php?sClass=application&iId={{{winehq}}}]]</div>}}<!--
 
-->{{#if: {{{winehq|}}} | <div title="{{PAGENAME}} on WineHQ" class="plainlinks template-infobox-icon svg-icon infobox-winehq">[[File:Icon overlay.png|link=https://appdb.winehq.org/objectManager.php?sClass=application&iId={{{winehq}}}]]</div>}}<!--
-->{{#if: {{#var:WSGF Link}} | <div title="{{PAGENAME}} on WSGF" class="plainlinks template-infobox-icon svg-icon infobox-wsgf">[[File:Icon overlay.png|link={{#var:WSGF Link}}]]</div> }}</td>
+
-->{{#if: {{#var:WSGF Link}} | {{#cargo_query:tables=Video|where=_pageID = {{PAGEID}} AND WSGF_Link IS NOT NULL|fields=WSGF_Link|format=template|template=Infobox game/WSGF|default=}} }}</td>
 
</tr>
 
</tr>
 
}}<!-- Hidden properties
 
}}<!-- Hidden properties
-->{{#vardefine:section|Infobox game}}<!--
 
 
-->{{#ifeq: {{NAMESPACE}} | | <!-- begin ONLY APPLY ON PAGES IN MAIN NAMESPACE begin (fixes PCGW Steam/GOG Redirect API endpoints among other things)
 
-->{{#ifeq: {{NAMESPACE}} | | <!-- begin ONLY APPLY ON PAGES IN MAIN NAMESPACE begin (fixes PCGW Steam/GOG Redirect API endpoints among other things)
 
-->{{#if: {{{steam appid|}}}| [[Steam AppID::{{{steam appid}}}| ]] {{#vardefine:steam appid|{{{steam appid}}}}} }}<!--
 
-->{{#if: {{{steam appid|}}}| [[Steam AppID::{{{steam appid}}}| ]] {{#vardefine:steam appid|{{{steam appid}}}}} }}<!--
Line 92: Line 91:
 
-->{{#if: {{{wikipedia|}}}| [[Wikipedia::{{{wikipedia}}}| ]] }}<!--
 
-->{{#if: {{{wikipedia|}}}| [[Wikipedia::{{{wikipedia}}}| ]] }}<!--
 
-->{{#if: {{{license|}}}| {{Infobox game/license|{{lc:{{{license|}}}}}}} }}<!--
 
-->{{#if: {{{license|}}}| {{Infobox game/license|{{lc:{{{license|}}}}}}} }}<!--
-->{{#if: {{#show: {{PAGENAME}} | ?Article state is stub}}||[[Category:Missing section (References)]]}}<!--
+
-->{{#if: {{#var:available digitally}}||[[Category:Missing section (References)]]}}<!--
 
-->{{#vardefine:Availability|needed}}<!--
 
-->{{#vardefine:Availability|needed}}<!--
 
-->{{#vardefine:Video|needed}}<!--
 
-->{{#vardefine:Video|needed}}<!--
Line 101: Line 100:
 
-->{{#vardefine:System requirements|needed}}<!--
 
-->{{#vardefine:System requirements|needed}}<!--
 
-->}}<!-- end ONLY APPLY ON PAGES IN MAIN NAMESPACE end
 
-->}}<!-- end ONLY APPLY ON PAGES IN MAIN NAMESPACE end
-->{{#vardefine:VR|{{#cargo_query:tables=VR_support|where=_pageName = '{{PAGENAME}}' AND VR_only IS NOT NULL|fields=VR_only|default=}}}}<!--
+
-->{{#vardefine:VR|{{#cargo_query:tables=VR_support|where=_pageID = {{PAGEID}}|fields=VR_only|no html|default=}}}}<!--
 
-->{{#ifeq: {{#var:PC booter}}{{#var:DOS}}{{#var:Windows 3.x}}{{#var:Windows}}{{#var:Mac OS}}{{#var:OS X}}{{#var:Linux}}|true||{{#vardefine:OS tabs|true}}}}<!--
 
-->{{#ifeq: {{#var:PC booter}}{{#var:DOS}}{{#var:Windows 3.x}}{{#var:Windows}}{{#var:Mac OS}}{{#var:OS X}}{{#var:Linux}}|true||{{#vardefine:OS tabs|true}}}}<!--
 
-->{{#ifeq: {{#var:PC booter}} | ported | [[Category:Invalid template usage (Infobox game)]]}}<!--
 
-->{{#ifeq: {{#var:PC booter}} | ported | [[Category:Invalid template usage (Infobox game)]]}}<!--
Line 111: Line 110:
 
-->{{#ifeq: {{#var:Linux}} | ported | [[Category:Invalid template usage (Infobox game)]]}}<!--
 
-->{{#ifeq: {{#var:Linux}} | ported | [[Category:Invalid template usage (Infobox game)]]}}<!--
 
-->{{#if: {{{gogcom page|}}} | [[Category:Invalid template usage (Infobox game)]]}}</table><!--
 
-->{{#if: {{{gogcom page|}}} | [[Category:Invalid template usage (Infobox game)]]}}</table><!--
-->{{#if:{{#var:Windows 3.x}}|{{#if:{{#var:Windows native}}||{{#vardefine:Warnings|true}} }}}}<!--
 
 
-->{{#arraymap:{{#var:sidebarSeries}}|,|€€€€€|{{#if:{{#var:sidebarSeriesShown}}||</dd>{{Series|€€€€€}}{{#vardefine:sidebarSeriesShown|true}}}}|}}<!--
 
-->{{#arraymap:{{#var:sidebarSeries}}|,|€€€€€|{{#if:{{#var:sidebarSeriesShown}}||</dd>{{Series|€€€€€}}{{#vardefine:sidebarSeriesShown|true}}}}|}}<!--
 +
-->{{#vardefine:section|Infobox game}}<!--
 +
-->{{#vardefine:Warnings|{{#if:{{#var:Windows 3.x}}|{{#if:{{#var:Windows native}}||Windows 3.x,}}}}{{#cargo_query:tables=Tags|where=_pageID = {{PAGEID}} AND Warnings IS NOT NULL|fields=Warnings|no html|default=}}}}<!--
 
-->{{Tocbox}}<!--
 
-->{{Tocbox}}<!--
-->{{#if:{{#show: {{PAGENAME}} | ?Warnings}}|{{#vardefine:Top warnings|true}}{{#vardefine:Top last|Infobox}}{{#vardefine:Top|{{#show: {{PAGENAME}} | ?Top}}}}{{#vardefine:DRM|{{#show: {{PAGENAME}} | ?Uses DRM}}}}{{#ifeq:{{#var:Top}}|Infobox|{{Warnings}}}}}}</includeonly><noinclude>{{#cargo_declare:
+
-->{{#if:{{#var:Warnings}}|{{#vardefine:Top warnings|true}}{{#vardefine:Top last|Infobox}}{{#vardefine:Top|{{#cargo_query:tables=Tags|where=_pageID = {{PAGEID}} AND Top IS NOT NULL|fields=Top|no html|default=}}}}{{#ifeq:{{#var:Top|Infobox}}|Infobox|<p>'''Warnings'''</p>{{#arraymaptemplate:{{#var:Warnings}}|Warnings|,|\n}}}}}}{{#vardefine:Warnings|}}</includeonly><noinclude>{{#cargo_declare:
 
_table=Infobox_game
 
_table=Infobox_game
 
|Cover=File
 
|Cover=File
Line 137: Line 137:
 
|Released_OS_X=Date
 
|Released_OS_X=Date
 
|Released_Linux=Date
 
|Released_Linux=Date
 +
|Wrappers=List (,) of String
 +
|Wrappers_Windows_3x=List (,) of String
 +
|Wrappers_Windows=List (,) of String
 +
|Wrappers_OS_X=List (,) of String
 +
|Wrappers_Linux=List (,) of String
 
|Monetization=List (,) of String
 
|Monetization=List (,) of String
 
|Microtransactions=List (,) of String
 
|Microtransactions=List (,) of String
Line 177: Line 182:
 
|Released_OS_X={{#var:released OS X}}
 
|Released_OS_X={{#var:released OS X}}
 
|Released_Linux={{#var:released Linux}}
 
|Released_Linux={{#var:released Linux}}
 +
|Wrappers={{#var:wrappers}}
 +
|Wrappers_Windows_3x={{#var:Windows 3.x wrappers}}
 +
|Wrappers_Windows={{#var:Windows wrappers}}
 +
|Wrappers_OS_X={{#var:OS X wrappers}}
 +
|Wrappers_Linux={{#var:Linux wrappers}}
 
|Monetization={{#var:monetization}}
 
|Monetization={{#var:monetization}}
 
|Microtransactions={{#var:microtransactions}}
 
|Microtransactions={{#var:microtransactions}}
Line 189: Line 199:
 
|Themes={{#var:themes}}
 
|Themes={{#var:themes}}
 
|Series={{#var:sidebarSeries}}
 
|Series={{#var:sidebarSeries}}
|Steam_AppID={{{steam appid|}}}
+
|Steam_AppID={{{steam appid|}}}{{#if:{{{steam appid side|}}}|,{{{steam appid side|}}}}}
|Steam_AppID={{{steam appid side|}}}
+
|GOGcom_ID={{{gogcom id|}}}{{#if:{{{gogcom id side|}}}|,{{{gogcom id side|}}}}}
|GOGcom_ID={{{gogcom id|}}}
 
|GOGcom_ID={{{gogcom id side|}}}
 
 
|StrategyWiki={{{strategywiki|}}}
 
|StrategyWiki={{{strategywiki|}}}
 
|Wikipedia={{{wikipedia|}}}
 
|Wikipedia={{{wikipedia|}}}
 
|License={{{license|}}}
 
|License={{{license|}}}
 
}}|}}</includeonly><noinclude>{{Documentation}} </noinclude>
 
}}|}}</includeonly><noinclude>{{Documentation}} </noinclude>

Latest revision as of 01:12, 30 October 2021

Error: #cargo_declare must be called from a template page.
Documentation for the above template (sometimes hidden from view).