Difference between revisions of "Development:Infobox game"
From PCGamingWiki, the wiki about fixing PC games
(corrected WSGF store) |
|||
(44 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]] | + | <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 -->{{# | + | 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|{{#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|}}}| | 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> | ||
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}} | | + | -->{{#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 | ||
− | |||
-->{{#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 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><!-- | ||
− | |||
-->{{#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:{{# | + | -->{{#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 |
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).
Visit Development:Infobox game/Documentation to edit this text. (How does this work?)