Difference between revisions of "Development:Infobox game"
From PCGamingWiki, the wiki about fixing PC games
(check for cooptimus valid) |
(fix ITAD redundant check, test rewrite of Co-optimus) |
||
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}}}}}}}}{{#vardefine:ITAD match|{{# | + | 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}}}}}}}}{{#ifeq:{{#var:ITAD match}}|<span class="error">Error: no local variable "itad" was set.</span>|{{#vardefine:ITAD match|{{#show: {{PAGENAME}} | ?IsThereAnyDeal ID}}}}}}<!-- |
+ | storing Co-Optimus ID -->{{#if:{{{steam appid|}}}|{{#ifeq: {{#get_web_data: | ||
+ | url=https://m.co-optimus.com/api/games.php?search=true&steamid={{{steam appid|}}}&json=true | ||
+ | |format=JSON | ||
+ | |data=coopgameid=gameid,coopurl=urlSlug | ||
+ | }}|<span class="error">Error: No contents found at URL <a rel="nofollow" class="external free" href="http://m.co-optimus.com/api/games.php?search=true&steamid=&json=true">http://m.co-optimus.com/api/games.php?search=true&steamid={{{steam appid|}}}&json=true</a>.</span>||{{#vardefine:Co-Optimus|{{#external_value:coopgameid}}}}}}{{#ifeq:{{#var:Co-Optimus}}|<span class="error">Error: no local variable "coopgameid" was set.</span>|{{#vardefine:Co-Optimus|}}}}}}<!-- | ||
-->{{#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 49: | Line 54: | ||
-->{{#if: {{#var:WSGF Link}} | <div title="{{PAGENAME}} at WSGF" class="plainlinks template-infobox-icon svg-icon infobox-wsgf">[{{#var:WSGF Link}} ]</div> }}<!-- | -->{{#if: {{#var:WSGF Link}} | <div title="{{PAGENAME}} at WSGF" class="plainlinks template-infobox-icon svg-icon infobox-wsgf">[{{#var:WSGF Link}} ]</div> }}<!-- | ||
-->{{#if: {{{gogcom id|}}} | <div title="{{PAGENAME}} at GOG Database" class="plainlinks template-infobox-icon svg-icon infobox-gogdb">[https://www.gogdb.org/product/{{{gogcom id|}}} ]</div> }}<!-- | -->{{#if: {{{gogcom id|}}} | <div title="{{PAGENAME}} at GOG Database" class="plainlinks template-infobox-icon svg-icon infobox-gogdb">[https://www.gogdb.org/product/{{{gogcom id|}}} ]</div> }}<!-- | ||
− | -->{{#if: {{{steam appid|}}} | {{ | + | -->{{#if: {{{steam appid|}}} | {{if:{{#var:Co-Optimus}}|<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>}}<!-- |
Revision as of 02:41, 9 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?)