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
(fixed IsThereAnyDeal check order)
(1:1 with live)
Line 42: Line 42:
 
<!-- 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>||{{#vardefine:ITAD match|{{#external_value:itad}}}}}}}}{{#ifeq:{{#var:ITAD match}}|<span class="error">Error: no local variable "itad" was set.</span>|{{#vardefine:ITAD match|{{#show: {{PAGENAME}} | ?IsThereAnyDeal ID}}}}}}<!--
+
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}}}}}}<!--
 
-->{{#if: {{{wikipedia|}}}{{{gogcom id|}}}{{{steam appid|}}}{{{winehq|}}}{{{strategywiki|}}}{{#var:WSGF Link}}{{#var:ITAD match}}|
 
-->{{#if: {{{wikipedia|}}}{{{gogcom id|}}}{{{steam appid|}}}{{{winehq|}}}{{{strategywiki|}}}{{#var:WSGF Link}}{{#var:ITAD match}}|
 
<tr>
 
<tr>
Line 53: Line 53:
 
|format=JSON
 
|format=JSON
 
|data=coopgameid=gameid,coopurl=urlSlug
 
|data=coopgameid=gameid,coopurl=urlSlug
}} | <span class="error">Error: Invalid JSON.</span> ||{{#ifeq:{{#external_value:coopgameid}}|<span class="error">Error: no local variable "coopgameid" was set.</span>||<div title="{{PAGENAME}} at 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}} at 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}} at 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}} at SteamDB" class="plainlinks template-infobox-icon svg-icon infobox-steamdb">[https://steamdb.info/app/{{{steam appid|}}}/ &nbsp;]</div> }}<!--
 
-->{{#if: {{#var:ITAD match}} | <div title="{{PAGENAME}} at IsThereAnyDeal" class="plainlinks template-infobox-icon svg-icon infobox-itad">[https://isthereanydeal.com/game/{{#var:ITAD match}}/info/ &nbsp;]</div>{{#vardefine:ITAD match|}}}}<!--
 
-->{{#if: {{#var:ITAD match}} | <div title="{{PAGENAME}} at IsThereAnyDeal" class="plainlinks template-infobox-icon svg-icon infobox-itad">[https://isthereanydeal.com/game/{{#var:ITAD match}}/info/ &nbsp;]</div>{{#vardefine:ITAD match|}}}}<!--
 
-->{{#if: {{{strategywiki|}}} | <div title="{{PAGENAME}} guide at StrategyWiki" class="template-infobox-icon svg-icon infobox-strategywiki">[[File:Icon overlay.png|link=strategywiki:{{{strategywiki}}}|{{PAGENAME}} guide at StrategyWiki]]</div>}}<!--
 
-->{{#if: {{{strategywiki|}}} | <div title="{{PAGENAME}} guide at StrategyWiki" class="template-infobox-icon svg-icon infobox-strategywiki">[[File:Icon overlay.png|link=strategywiki:{{{strategywiki}}}|{{PAGENAME}} guide at StrategyWiki]]</div>}}<!--
Line 90: Line 90:
 
}}</noinclude><includeonly>{{#ifeq: {{NAMESPACE}} | | [[Category:Games]]{{#vardefine:Game|true}}{{#cargo_store:
 
}}</noinclude><includeonly>{{#ifeq: {{NAMESPACE}} | | [[Category:Games]]{{#vardefine:Game|true}}{{#cargo_store:
 
_table=Infobox_game
 
_table=Infobox_game
|Cover={{{cover|}}}
+
|Cover={{#ifexist: File:{{{cover}}}|{{{cover|}}}|}}
 
|Cover_URL={{filepath:{{{cover|}}}}}
 
|Cover_URL={{filepath:{{{cover|}}}}}
 
|Steam_AppID={{{steam appid|}}}
 
|Steam_AppID={{{steam appid|}}}

Revision as of 07:16, 11 June 2019

{{#ogpdescription:Infobox game at PCGamingWiki - bugs, fixes, crashes, mods, guides and improvements for every PC game.}}
Infobox game
Error: #cargo_declare must be called from a template page.
Documentation for the above template (sometimes hidden from view).