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 "User:Aemony/Sandbox/Infobox game"

From PCGamingWiki, the wiki about fixing PC games
m (added support for links)
m (d)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{Assignment/checkAvailable|{{PAGENAME}}}}<!--
+
<includeonly>{{Assignment/checkAvailable}}<!--
 
--><table class="vertical-navbox template-infobox" id="infobox-game">
 
--><table class="vertical-navbox template-infobox" id="infobox-game">
 
<caption class="template-infobox-title">{{#if:{{{title|}}}|{{{title}}}|{{PAGENAME}}}}</caption>
 
<caption class="template-infobox-title">{{#if:{{{title|}}}|{{{title}}}|{{PAGENAME}}}}</caption>
 
{{#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">[https://pcgamingwiki.com/w/index.php?title=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]]{{#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>
 
</tr>
 
</tr>
 
|[[Category:Pages needing cover images]]}}
 
|[[Category:Pages needing cover images]]}}
Line 13: Line 13:
 
</tr>
 
</tr>
 
{{{developers}}}|{{#ifeq: {{NAMESPACE}} | | [[Category:Invalid template usage (infobox game)]] }}
 
{{{developers}}}|{{#ifeq: {{NAMESPACE}} | | [[Category:Invalid template usage (infobox game)]] }}
}}
+
}}<!--
  
<!-- Publishers -->
+
-- Publishers -->
 
{{#if: {{{publishers|}}} |
 
{{#if: {{{publishers|}}} |
 
<tr>
 
<tr>
Line 21: Line 21:
 
</tr>
 
</tr>
 
{{{publishers}}}
 
{{{publishers}}}
}}
+
}}<!--
  
<!-- Engines -->
+
-- Engines -->
 
{{#if: {{{engines|}}} |
 
{{#if: {{{engines|}}} |
 
<tr>
 
<tr>
Line 29: Line 29:
 
</tr>
 
</tr>
 
{{{engines}}}
 
{{{engines}}}
}}
+
}}<!--
  
<!-- Release dates -->
+
-- Release dates -->
 
{{#if: {{{release dates|}}}|
 
{{#if: {{{release dates|}}}|
 
<tr>
 
<tr>
Line 37: Line 37:
 
</tr>
 
</tr>
 
{{{release dates|}}}|{{#ifeq: {{NAMESPACE}} | | [[Category:Pages with no release dates]] }}
 
{{{release dates|}}}|{{#ifeq: {{NAMESPACE}} | | [[Category:Pages with no release dates]] }}
}}
+
}}<!--
  
<!-- Reception -->
+
-- Reception -->
 
{{#if: {{{reception|}}}|
 
{{#if: {{{reception|}}}|
 
<tr>
 
<tr>
Line 45: Line 45:
 
</tr>
 
</tr>
 
{{{reception|}}}
 
{{{reception|}}}
}}
+
}}<!--
  
<!-- Links -->
+
-- Taxonomy -->
{{#if: {{{links|}}} |
+
{{#if: {{{taxonomy|}}}|
 
<tr>
 
<tr>
<th class="template-infobox-header" colspan="2">Links</th>
+
<th class="template-infobox-header" colspan="2">Taxonomy</th>
 
</tr>
 
</tr>
{{{links|}}}
+
{{{taxonomy|}}}
 
}}<!-- checking DOSBox-only status -->{{#if: {{#var:Windows DOSBox}}{{#var:OS X DOSBox}}{{#var:Linux DOSBox}}|<!--
 
}}<!-- checking DOSBox-only status -->{{#if: {{#var:Windows DOSBox}}{{#var:OS X DOSBox}}{{#var:Linux DOSBox}}|<!--
 
-->{{#if: {{#var:Windows native}}|{{#vardefine:Windows DOSBox|}}}}<!--
 
-->{{#if: {{#var:Windows native}}|{{#vardefine:Windows DOSBox|}}}}<!--
Line 60: Line 60:
 
  Icons --><!--
 
  Icons --><!--
 
  storing WSGF Link state -->{{#vardefine:WSGF Link|{{#show: {{PAGENAME}} | ?WSGF Link #}}}}<!--
 
  storing WSGF Link state -->{{#vardefine:WSGF Link|{{#show: {{PAGENAME}} | ?WSGF Link #}}}}<!--
storing IsThereAnyDeal ID -->{{#if:{{{steam appid|}}}|{{#ifeq: {{#get_web_data:url=https://api.isthereanydeal.com/v02/game/plain/?key=ITAD_KEY&shop=steam&game_id=app/{{{steam appid|}}}|format=JSON|data=itad=data}}|<span class="error">Error: No contents found at URL <a rel="nofollow" class="external free" href="https://api.isthereanydeal.com/v02/game/plain/?key=ITAD_KEY&amp;shop=steam&amp;game_id=app/{{{steam appid|}}}">https://api.isthereanydeal.com/v02/game/plain/?key=ITAD_KEY&amp;shop=steam&amp;game_id=app/{{{steam appid|}}}</a>.</span>||{{#ifeq:{{#external_value:itad}}|<span class="error">Error: no local variable "itad" was set.</span>||{{#vardefine:ITAD match|{{#external_value:itad}}}}}}}}}}{{#if:{{#var:ITAD match}}||{{#vardefine:ITAD match|{{#show: {{PAGENAME}} | ?IsThereAnyDeal ID}}}}}}<!--
+
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|}}}|
-->{{#if: {{{wikipedia|}}}{{{gogcom id|}}}{{{steam appid|}}}{{{winehq|}}}{{{strategywiki|}}}{{{mobygames|}}}{{#var:WSGF Link}}{{#var:ITAD match}}{{{official site|}}}|
 
 
<tr>
 
<tr>
 
<td class="template-infobox-icons" colspan="2"><!--
 
<td class="template-infobox-icons" colspan="2"><!--
-->{{#if: {{{official site|}}} | <div title="Official site" class="plainlinks template-infobox-icon svg-icon infobox-official-site">[{{{official site}}} &nbsp;]</div>}}<!--
+
-->{{#if: {{{official site|}}} | <div title="Official site" class="plainlinks template-infobox-icon svg-icon infobox-official-site">[[File:Icon overlay.png|link={{{official site}}}]]</div>}}<!--
-->{{#if: {{{winehq|}}} | <div title="{{PAGENAME}} on WineHQ" class="plainlinks template-infobox-icon svg-icon infobox-winehq">[https://appdb.winehq.org/objectManager.php?sClass=application&iId={{{winehq}}} &nbsp;]</div>}}<!--
+
--><!-- //Disable Co-optimus since ExternalData extension is non-functional// {{#if: {{{steam appid|}}} | {{#ifeq: {{#get_web_data:
-->{{#if: {{#var:WSGF Link}} | <div title="{{PAGENAME}} on WSGF" class="plainlinks template-infobox-icon svg-icon infobox-wsgf">[{{#var:WSGF Link}} &nbsp;]</div> }}<!--
 
-->{{#if: {{{gogcom id|}}} | <div title="{{PAGENAME}} in GOG Database" class="plainlinks template-infobox-icon svg-icon infobox-gogdb">[https://www.gogdb.org/product/{{{gogcom id|}}} &nbsp;]</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: {{{steam appid|}}} | {{#ifeq: {{#get_web_data:
 
 
url=http://m.co-optimus.com/api/games.php?search=true&steamid={{{steam appid|}}}&json=true
 
url=http://m.co-optimus.com/api/games.php?search=true&steamid={{{steam appid|}}}&json=true
 
|format=JSON
 
|format=JSON
 
|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>}}<div title="{{PAGENAME}} on SteamDB" class="plainlinks template-infobox-icon svg-icon infobox-steamdb">[https://steamdb.info/app/{{{steam appid|}}}/ &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: {{#var:ITAD match}} | {{#ifeq: {{#var:ITAD match}} | &#123;&#123;#external_value:itad&#125;&#125; | | <div title="{{PAGENAME}} on IsThereAnyDeal" class="plainlinks template-infobox-icon svg-icon infobox-itad">[https://isthereanydeal.com/game/{{#var:ITAD match}}/info/ &nbsp;]</div>{{#vardefine:ITAD match|}}}}}}<!--
+
-->{{#if: {{{gogcom id|}}} | <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: {{{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: {{{steam appid|}}} | {{#ifeq:{{#var:available digitally}}|true| <div title="{{PAGENAME}} on IsThereAnyDeal" class="plainlinks template-infobox-icon svg-icon infobox-itad">[[File:Icon overlay.png|link=https://isthereanydeal.com/steam/app/{{{steam appid|}}}/]]</div>}}<!--
 +
--><div title="{{PAGENAME}} on ProtonDB" class="plainlinks template-infobox-icon svg-icon infobox-protondb">[[File:Icon overlay.png|link=https://www.protondb.com/app/{{{steam appid|}}}/]]</div><!--
 +
--><div title="{{PAGENAME}} on SteamDB" class="plainlinks template-infobox-icon svg-icon infobox-steamdb">[[File:Icon overlay.png|link=https://steamdb.info/app/{{{steam appid|}}}/]]</div> }}<!--
 
-->{{#if: {{{strategywiki|}}} | <div title="{{PAGENAME}} guide on StrategyWiki" class="template-infobox-icon svg-icon infobox-strategywiki">[[File:Icon overlay.png|link=strategywiki:{{{strategywiki}}}|{{PAGENAME}} guide on StrategyWiki]]</div>}}<!--
 
-->{{#if: {{{strategywiki|}}} | <div title="{{PAGENAME}} guide on StrategyWiki" class="template-infobox-icon svg-icon infobox-strategywiki">[[File:Icon overlay.png|link=strategywiki:{{{strategywiki}}}|{{PAGENAME}} guide on StrategyWiki]]</div>}}<!--
-->{{#if: {{{mobygames|}}} | <div title="{{PAGENAME}} on MobyGames" class="template-infobox-icon svg-icon">[[File:MobyGames.png|link=https://www.mobygames.com/game/{{{mobygames}}}|{{PAGENAME}} on MobyGames]]</div>}}<!--
+
-->{{#if: {{{mobygames|}}} | <div title="{{PAGENAME}} on MobyGames" class="template-infobox-icon svg-icon infobox-mobygames">[[File:Icon overlay.png|link=https://www.mobygames.com/game/{{{mobygames}}}|{{PAGENAME}} on MobyGames]]</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> }}</td>
+
-->{{#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: {{#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>
 
</tr>
 
</tr>
 
}}<!-- Hidden properties
 
}}<!-- Hidden properties
 +
-->{{#ifeq: {{NAMESPACE}} | | <!-- begin ONLY APPLY ON PAGES IN MAIN NAMESPACE begin (fixes https://www.pcgamingwiki.com/api/appid.php?appid=##### endpoint 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}}}}} }}<!--
 
-->{{#if: {{{steam appid side|}}}| {{#ifeq: {{{steam appid|}}}||[[Category:Invalid template usage (infobox game)]]}}{{#arraymap:{{{steam appid side|}}}|,|var|[[Steam AppID::var| ]]|&#32;}} }}<!--
 
-->{{#if: {{{steam appid side|}}}| {{#ifeq: {{{steam appid|}}}||[[Category:Invalid template usage (infobox game)]]}}{{#arraymap:{{{steam appid side|}}}|,|var|[[Steam AppID::var| ]]|&#32;}} }}<!--
Line 87: Line 91:
 
-->{{#if: {{{wikipedia|}}}| [[Wikipedia::{{{wikipedia}}}| ]] }}<!--
 
-->{{#if: {{{wikipedia|}}}| [[Wikipedia::{{{wikipedia}}}| ]] }}<!--
 
-->{{#if: {{{license|}}}| {{Infobox game/license|{{lc:{{{license|}}}}}}} }}<!--
 
-->{{#if: {{{license|}}}| {{Infobox game/license|{{lc:{{{license|}}}}}}} }}<!--
 +
-->}}<!-- end ONLY APPLY ON PAGES IN MAIN NAMESPACE end
 
-->{{#vardefine:VR|{{#show: {{PAGENAME}} | ?VR only}}}}<!--
 
-->{{#vardefine:VR|{{#show: {{PAGENAME}} | ?VR only}}}}<!--
 
-->{{#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}}}}<!--
Line 98: Line 103:
 
-->{{#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}} }}}}<!--
 
-->{{#if:{{#var:Windows 3.x}}|{{#if:{{#var:Windows native}}||{{#vardefine:Warnings|true}} }}}}<!--
 +
-->{{#arraymap:{{#var:sidebarSeries}}|,|€€€€€|{{#if:{{#var:sidebarSeriesShown}}||</dd>{{Series|€€€€€}}{{#vardefine:sidebarSeriesShown|true}}}}|}}<!--
 +
-->{{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:{{#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:
 
_table=Infobox_game
 
_table=Infobox_game

Latest revision as of 09:47, 22 October 2020

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