Template:Infobox game: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
<div id="Game_Infobox" class="infobox hidable" align=right>
<includeonly><onlyinclude>
{| class="infoboxtable hidable-content" cellspacing="0" cellpadding="4"
{{sidebar
|-
| width        = {{{width|300px}}}
| class="infoboximage" colspan="2" style="{{#if:{{{imageBG|}}}|background: #{{{imageBG}}}|{{#if:#999999|background: #FFFFFF|background: #999999}}}}" | {{{image|}}}
| float        = right
|-
| image        = {{{image|}}}
| class="infoboximage" colspan="2" style="{{#if:{{{imageBG|}}}|background: #{{{imageBG}}}|{{#if:999999|background: #FFFFFF|background: #999999}}}}" | {{{image2|}}}
| imagewidth    = {{{width|300px}}}
|-
| imagetooltip  = {{{imagetooltip|}}}
! class="infoboxheading" colspan="2" style="{{#if:224FA9|background: #224FA9|background: #999999}}; {{{css|}}}" | {{{{{{2|name}}}}}}
| header        = {{{title|}}}
{{#if:{{{hidei|}}}|{{!}}-|{{!}}-
|}}{{#if:{{{developer|}}}|
{{!}}-
{{!}} class="infoboxlabel" style="{{#if:{{{3|}}}|background: #{{{3}}}|}}" {{!}} Developer(s)
{{!}} class="infoboxcell" style="{{#if:{{{3|}}}|background: #{{{3}}}|}}; {{{css|}}}" {{!}}
{{{developer|}}}
{{!}}-
|}}{{#if:{{{date|}}}|
{{!}}-
{{!}} class="infoboxlabel" style="{{#if:{{{3|}}}|background: #{{{3}}}|}}" {{!}} Release date(s)
{{!}} class="infoboxcell" style="{{#if:{{{3|}}}|background: #{{{3}}}|}}; {{{css|}}}" {{!}}
{{{date|}}}
{{!}}-
|}}{{#if:{{{genre|}}}|
{{!}}-
{{!}} class="infoboxlabel" style="{{#if:{{{3|}}}|background: #{{{3}}}|}}" {{!}} Genre(s)
{{!}} class="infoboxcell" style="{{#if:{{{3|}}}|background: #{{{3}}}|}}; {{{css|}}}" {{!}}
{{{genre|}}}
{{!}}-
|}}{{#if:{{{mode|}}}|
{{!}}-
{{!}} class="infoboxlabel" style="{{#if:{{{3|}}}|background: #{{{3}}}|}}" {{!}} Mode(s)
{{!}} class="infoboxcell" style="{{#if:{{{3|}}}|background: #{{{3}}}|}}; {{{css|}}}" {{!}}
{{{mode|}}}
{{!}}-
|}}{{#if:{{{platform|}}}|
{{!}}-
{{!}} class="infoboxlabel" style="{{#if:{{{3|}}}|background: #{{{3}}}|}}" {{!}} Platform(s)
{{!}} class="infoboxcell" style="{{#if:{{{3|}}}|background: #{{{3}}}|}}; {{{css|}}}" {{!}}
{{{platform|}}}
{{!}}-
|}}{{#if:{{{rating|}}}|
{{!}}-
{{!}} class="infoboxlabel" style="{{#if:{{{3|}}}|background: #{{{3}}}|}}" {{!}} Rating(s)
{{!}} class="infoboxcell" style="{{#if:{{{3|}}}|background: #{{{3}}}|}}; {{{css|}}}" {{!}}
{{{rating|}}}
{{!}}-
|}}{{#if:{{{distribution|}}}|
{{!}}-
{{!}} class="infoboxlabel" style="{{#if:{{{3|}}}|background: #{{{3}}}|}}" {{!}} Distribution
{{!}} class="infoboxcell" style="{{#if:{{{3|}}}|background: #{{{3}}}|}}; {{{css|}}}" {{!}}
{{{distribution|}}}
{{!}}-
|}}{{#if:{{{system|}}}|
{{!}}-
{{!}} class="infoboxlabel" style="{{#if:{{{3|}}}|background: #{{{3}}}|}}" {{!}} System req
{{!}} class="infoboxcell" style="{{#if:{{{3|}}}|background: #{{{3}}}|}}; {{{css|}}}" {{!}}
{{{system|}}}
{{!}}-
|}}{{#if:{{{input|}}}|
{{!}}-
{{!}} class="infoboxlabel" style="{{#if:{{{3|}}}|background: #{{{3}}}|}}" {{!}} Input
{{!}} class="infoboxcell" style="{{#if:{{{3|}}}|background: #{{{3}}}|}}; {{{css|}}}" {{!}}
{{{input|}}}
{{!}}-
|}}{{#if:{{{engine|}}}|
{{!}}-
{{!}} class="infoboxlabel" style="{{#if:{{{3|}}}|background: #{{{3}}}|}}" {{!}} Engine
{{!}} class="infoboxcell" style="{{#if:{{{3|}}}|background: #{{{3}}}|}}; {{{css|}}}" {{!}}
{{{engine|}}}
{{!}}-
|}}{{#if:{{{series|}}}|
{{!}}-
{{!}} class="infoboxlabel" style="{{#if:{{{3|}}}|background: #{{{3}}}|}}" {{!}} Series
{{!}} class="infoboxcell" style="{{#if:{{{3|}}}|background: #{{{3}}}|}}; {{{css|}}}" {{!}}
{{{series|}}}
{{!}}-
|}}{{#if:{{{designer|}}}|
{{!}}-
{{!}} class="infoboxlabel" style="{{#if:{{{3|}}}|background: #{{{3}}}|}}" {{!}} Designer(s)
{{!}} class="infoboxcell" style="{{#if:{{{3|}}}|background: #{{{3}}}|}}; {{{css|}}}" {{!}}
{{{designer|}}}
{{!}}-
|}}{{#if:{{{writer|}}}|
{{!}}-
{{!}} class="infoboxlabel" style="{{#if:{{{3|}}}|background: #{{{3}}}|}}" {{!}} Writer(s)
{{!}} class="infoboxcell" style="{{#if:{{{3|}}}|background: #{{{3}}}|}}; {{{css|}}}" {{!}}
{{{writer|}}}
{{!}}-
|}}{{#if:{{{composer|}}}|
{{!}}-
{{!}} class="infoboxlabel" style="{{#if:{{{3|}}}|background: #{{{3}}}|}}" {{!}} Composer(s)
{{!}} class="infoboxcell" style="{{#if:{{{3|}}}|background: #{{{3}}}|}}; {{{css|}}}" {{!}}
{{{composer|}}}
{{!}}-
|}}{{#if:{{{previous|}}}|
{{!}}-
{{!}} class="infoboxlabel" style="{{#if:{{{3|}}}|background: #{{{3}}}|}}" {{!}} Previous game
{{!}} class="infoboxcell" style="{{#if:{{{3|}}}|background: #{{{3}}}|}}; {{{css|}}}" {{!}}
{{{previous|}}}
{{!}}-
|}}{{#if:{{{next|}}}|
{{!}}-
{{!}} class="infoboxlabel" style="{{#if:{{{3|}}}|background: #{{{3}}}|}}" {{!}} Next game
{{!}} class="infoboxcell" style="{{#if:{{{3|}}}|background: #{{{3}}}|}}; {{{css|}}}" {{!}}
{{{next|}}}
{{!}}-
|}}
|}
<div class="infoboxfooter plainlinks" style="width:fit-content; text-align: center; {{#if:{{{1|}}}|background: #{{{1}}}|background: #224FA9}}"><span id="infoboxend"></span>&nbsp;</div>
{{#if:{{{1|}}}|{{rb|#{{{1}}}}}|{{rb|#224FA9}}}}</div><!-- TEMPLATE ENDS HERE. In order to regenerate the template, replace the code above with the source code provided. --><noinclude>


WIP Infobox template for games. Since {{tl|Software}} had been reverted, game pages need a concise, simple infobox.
<!-- 1. Developer -->
| content1      = {{#if:{{{developer|}}}|
<div style="display:grid; grid-template-columns:1fr 1fr;">
  <div style="background:#232323; border-top:1px solid #323232; color:white; padding:.3em"><b>Developer(s)</b></div>
  <div style="border-top:1px solid #232323; padding:.3em">{{{developer|}}}</div>
</div>}}
| content1style = padding:0;
 
<!-- 2. Publisher -->
| content2      = {{#if:{{{publisher|}}}|
<div style="display:grid; grid-template-columns:1fr 1fr;">
  <div style="background:#232323; border-top:1px solid #323232; color:white; padding:.3em"><b>Publisher(s)</b></div>
  <div style="border-top:1px solid #232323; padding:.3em">{{{publisher|}}}</div>
</div>}}
| content2style = padding:0;
 
<!-- 3. Series -->
| content3      = {{#if:{{{series|}}}|
<div style="display:grid; grid-template-columns:1fr 1fr;">
  <div style="background:#232323; border-top:1px solid #323232; color:white; padding:.3em"><b>Series</b></div>
  <div style="border-top:1px solid #232323; padding:.3em">{{{series|}}}</div>
</div>}}
| content3style = padding:0;
 
<!-- 4. Release date -->
| content4      = {{#if:{{{releasedates|}}}|
<div style="display:grid; grid-template-columns:1fr 1fr;">
  <div style="background:#232323; border-top:1px solid #323232; color:white; padding:.3em"><b>Release date(s)</b></div>
  <div style="border-top:1px solid #232323; padding:.3em">{{{releasedates|}}}</div>
</div>}}
| content4style = padding:0;
 
<!-- 5. Genre -->
| content5      = {{#if:{{{genre|}}}|
<div style="display:grid; grid-template-columns:1fr 1fr;">
  <div style="background:#232323; border-top:1px solid #323232; color:white; padding:.3em"><b>Genre</b></div>
  <div style="border-top:1px solid #232323; padding:.3em">{{{genre|}}}</div>
</div>}}
| content5style = padding:0;
 
<!-- 6. Mode -->
| content6      = {{#if:{{{mode|}}}|
<div style="display:grid; grid-template-columns:1fr 1fr;">
  <div style="background:#232323; border-top:1px solid #323232; color:white; padding:.3em"><b>Mode(s)</b></div>
  <div style="border-top:1px solid #232323; padding:.3em">{{{mode|}}}</div>
</div>}}
| content6style = padding:0;
 
<!-- 7. Platform -->
| content7      = {{#if:{{{platform|}}}|
<div style="display:grid; grid-template-columns:1fr 1fr;">
  <div style="background:#232323; border-top:1px solid #323232; color:white; padding:.3em"><b>Platform</b></div>
  <div style="border-top:1px solid #232323; padding:.3em">{{{platform|}}}</div>
</div>}}
| content7style = padding:0;
 
<!-- 8. Engine -->
| content8      = {{#if:{{{engine|}}}|
<div style="display:grid; grid-template-columns:1fr 1fr;">
  <div style="background:#232323; border-top:1px solid #323232; color:white; padding:.3em"><b>Engine</b></div>
  <div style="border-top:1px solid #232323; padding:.3em">{{{engine|}}}</div>
</div>}}
| content8style = padding:0;
 
<!-- 9. Programming language -->
| content9      = {{#if:{{{codelang|}}}|
<div style="display:grid; grid-template-columns:1fr 1fr;">
  <div style="background:#232323; border-top:1px solid #323232; color:white; padding:.3em"><b>Written in</b></div>
  <div style="border-top:1px solid #232323; padding:.3em">{{{codelang|}}}</div>
</div>}}
| content9style = padding:0;
 
<!-- 10. Mod support -->
| content10      = {{#if:{{{modsupport|}}}|
<div style="display:grid; grid-template-columns:1fr 1fr;">
  <div style="background:#232323; border-top:1px solid #323232; color:white; padding:.3em"><b>Mod support</b></div>
  <div style="border-top:1px solid #232323; padding:.3em">{{{modsupport|}}}</div>
</div>}}
| content10style = padding:0;
 
<!-- 11. SDK -->
| content11      = {{#if:{{{sdk|}}}|
<div style="display:grid; grid-template-columns:1fr 1fr;">
  <div style="background:#232323; border-top:1px solid #323232; color:white; padding:.3em"><b>SDK</b></div>
  <div style="border-top:1px solid #232323; padding:.3em">{{{sdk|}}}</div>
</div>}}
| content11style = padding:0;
 
<!-- 12. SysReq -->
| content12      = {{#if:{{{sysreq|}}}|
<div style="display:grid; grid-template-columns:1fr 1fr;">
  <div style="background:#232323; border-top:1px solid #323232; color:white; padding:.3em"><b>System requirements</b></div>
  <div style="border-top:1px solid #232323; padding:.3em">{{{sysreq|}}}</div>
</div>}}
| content12style = padding:0;
 
<!-- 13. Distribution -->
| content13      = {{#if:{{{distribution|}}}|
<div style="display:grid; grid-template-columns:1fr 1fr;">
  <div style="background:#232323; border-top:1px solid #323232; color:white; padding:.3em"><b>Distribution</b></div>
  <div style="border-top:1px solid #232323; padding:.3em">{{{distribution|}}}</div>
</div>}}
| content13style = padding:0;
 
<!-- 14. Website -->
| content14      = {{#if:{{{website|}}}|
<div style="display:grid; grid-template-columns:1fr 1fr;">
  <div style="background:#232323; border-top:1px solid #323232; color:white; padding:.3em"><b>Official website</b></div>
  <div style="border-top:1px solid #232323; padding:.3em">{{{website|}}}</div>
</div>}}
| content14style = padding:0;
 
<!-- 15. Links -->
| content15      = {{#if:{{{links|}}}|
<div style="display:grid; grid-template-columns:1fr 1fr;">
  <div style="background:#232323; border-top:1px solid #323232; color:white; padding:.3em"><b>Links</b></div>
  <div style="border-top:1px solid #232323; padding:.3em">{{{links|}}}</div>
</div>}}
| content15style = padding:0;


I decided that {{tl|Infotable}} doesn't quite fit the bill (doesn't have some relevant sections), and {{tl|Softwarebox}} is too complicated, and scripted more toward predetermined choices.
<!-- 16. Prev game -->
| content16      = {{#if:{{{previousgame|}}}|
<div style="display:grid; grid-template-columns:1fr 1fr;">
  <div style="background:#232323; border-top:1px solid #323232; color:white; padding:.3em"><b>Previous game</b></div>
  <div style="border-top:1px solid #232323; padding:.3em">{{{previousgame|}}}</div>
</div>}}
| content16style = padding:0;


So I want to work on a new one, that gives both general data (date of release, platform, genre) as well as that most important to devs - AppID, engine/branch, what type of mods (gldsrc, sourcemod, addon), etc.
<!-- 17. Next game -->
At the moment it's just a copy of COW's but doesn't fit VDC, not the least reason being, it was meant to work with COW's bright background.
| content17      = {{#if:{{{nextgame|}}}|
<div style="display:grid; grid-template-columns:1fr 1fr;">
  <div style="background:#232323; border-top:1px solid #323232; color:white; padding:.3em"><b>Next game</b></div>
  <div style="border-top:1px solid #232323; padding:.3em">{{{nextgame|}}}</div>
</div>}}
| content17style = padding:0;


So, it's all one big {{todo}} right now. I know I very vocally objected to overuse of templates, but this is quite different.  
}}
</onlyinclude></includeonly>
==WIP==
WIP Infobox template for games. Since {{tl|Software}} had been reverted, game pages need a concise, simple infobox.
I decided that {{tl|Infotable}} doesn't quite fit the bill (doesn't have some relevant sections), and {{tl|Softwarebox}} both lacks some sections and is too scripted toward predetermined choices.


==Usage instructions==
==Usage instructions==
Copy and paste the following code into the top of the article, filling the appropriate fields. Omitted or blank fields will not be shown on the article page.
Copy and paste the following code into the top of the article, filling the appropriate fields. Omitted or blank fields will not be shown on the article page.
<pre><nowiki>
{{Game_Infobox
|image=
|image2=
|name=
|hidei=
|developer=
|date=
|genre=
|mode=
|platform=
|hidep=
|hideu=
|rating=
|distribution=
|system=
|input=
|engine=
|series=
|designer=
|writer=
|composer=
|previous=
|next=
}}</nowiki></pre>
===Display parameters===
*hidei
*hidep
*hideu


===Credits===
===Credits===
The original version of the infobox was created on [https://combineoverwiki.net/wiki/Main_Page Combine Overwiki], and copied from there for adapted use.
Based on {{tl2|SoftwareBox}}.


[[Category:Templates]]
[[Category:Templates]]
[[Category:Infobox templates]]
[[Category:Infobox templates]]
</noinclude>

Revision as of 05:49, 21 June 2024

WIP

WIP Infobox template for games. Since {{Software}} had been reverted, game pages need a concise, simple infobox. I decided that {{Infotable}} doesn't quite fit the bill (doesn't have some relevant sections), and {{Softwarebox}} both lacks some sections and is too scripted toward predetermined choices.

Usage instructions

Copy and paste the following code into the top of the article, filling the appropriate fields. Omitted or blank fields will not be shown on the article page.

Credits

Based on {{SoftwareBox}}.