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&shop=steam&game_id=app/{{{steam appid|}}}">https://api.isthereanydeal.com/v02/game/plain/?key=ITAD_KEY&shop=steam&game_id=app/{{{steam appid|}}}</a>.</span>||{{#vardefine:ITAD match|{{#external_value:itad}}}}}}}}{{# | + | 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&shop=steam&game_id=app/{{{steam appid|}}}">https://api.isthereanydeal.com/v02/game/plain/?key=ITAD_KEY&shop=steam&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 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 ]</div>}}<div title="{{PAGENAME}} at SteamDB" class="plainlinks template-infobox-icon svg-icon infobox-steamdb">[https://steamdb.info/app/{{{steam appid|}}}/ ]</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/ ]</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/ ]</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.}}
Error: #cargo_declare must be called from a template page.
Documentation for the above template (sometimes hidden from view).
Visit Development:Infobox game/Documentation to edit this text. (How does this work?)