Difference between revisions of "Template:Argbox"

From Game Detectives Wiki
Jump to: navigation, search
[unchecked revision][checked revision]
m (test)
 
(101 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{| class="wikitable" style="float:{{{float|right}}}; clear:{{{clear|right}}};" width="22.5%"
+
{| class="wikitable argbox" style="float:{{{float|right}}}; clear:{{{clear|right}}}; width:{{{imagewidth|400}}}px"
!colspan="2"|{{{name|{{PAGENAME}}}}}
+
!style="font-size:20px; padding:3%" colspan="2"|{{#if:{{{name|}}}|{{{name|{{PAGENAME}}}}}{{#set:argName={{FULLPAGENAME}}}}|{{#set:argName={{FULLPAGENAME}}|template=BySetTemplateSimpleValueOutput}}}}{{#set:argFloat={{{float|right}}}}}{{#set:argClear={{{clear|right}}}}}
[[Image:{{#setmainimage:{{{image|Example.png}}}}}|{{{imagewidth|250}}}px]]<br/>''{{{caption| }}}''
+
{{!}}-
|-
+
{{#if:{{{status|}}}|
|style="font-size:10px; text-align:center; background-color:#eeeeee" colspan="2"|{{#if:{{{description|}}}|''{{{description}}}''}}
+
{{!}}colspan="2" style="border-bottom-style:hidden; border-top-style:hidden; font-weight:bold; font-size:16px; text-align:center; padding:1.5%; background-color:#{{#switch:{{{status}}}|Completed=aaffaa|Active=66ccff|Discontinued=ff6666|On Hold=ff6633}}"{{!}}[[Property:argStatus#{{{status|}}}|{{#set:argStatus={{{status}}}|template=BySetTemplateSimpleValueOutput}}]] {{#switch:{{{status|}}}|Completed={{#if:{{{completed|}}}|on {{{completed|}}}}}|Active={{#if:{{{discovered|}}}|since {{{discovered|}}}}}|Discontinued={{#if:{{{closed|}}}|on {{{closed|}}}}}|On Hold={{#if:{{{closed|}}}|since {{{closed|}}}}}|}}
|-
 
{{#if:{{{creator|}}}|
 
{{!}}Creator
 
{{!}}style="text-align:center;"{{!}}{{{creator}}}
 
{{!}}- style="background-color:#eeeeee"
 
 
}}
 
}}
 +
{{!}}-
 +
{{!}}colspan="2" style="border-bottom-style:hidden; border-top-style:hidden; padding:5%; background-image:linear-gradient(#eaecf0, #eaecf0, #fff)"|[[{{#if:{{{image|}}}|{{#setmainimage:{{{image|Image:NewExample3.png}}}}}|{{#setmainimage:Image:NewExample3.png}}}}|{{{imagewidth|400}}}px]]{{#set:argImage={{{image|Image:NewExample3.png}}}}}{{#set:argImageWidth={{{imagewidth|400}}}}}
 +
{{!}}-
 +
{{!}}colspan="2" style="font-size:11px; font-style:italic; text-align:center; background-color:#fff; padding-bottom:2%"{{!}}{{#if:{{{description|}}}|''{{#set:argDescription={{{description}}}|template=BySetTemplateSimpleValueOutput}}''}}
 +
{{!}}- style="background-color:#eee;"
 
{{#if:{{{type|}}}|
 
{{#if:{{{type|}}}|
{{!}}Type
+
{{!}}'''Type'''
{{!}}style="text-align:center;"{{!}}{{{type}}}
+
{{!}}style="text-align:center;"{{!}}[[List_of_Investigations#{{#set:argType={{{type}}}|template=BySetTemplateSimpleValueOutput}}|{{#ifeq: {{{type}}} | OfficialExample | Official | {{{type}}}}}]]
{{!}}- style="background-color:#eeeeee"
 
}}
 
{{#if:{{{status|}}}|
 
{{!}}Status
 
{{!}}{{#switch:{{{status}}}|Completed=style="text-align:center; background-color: #aaffaa"|Active=style="text-align:center; background-color: #5ac3ec"|Abandoned=style="text-align:center; background-color: #fb5757"|On Hold=style="text-align:center; background-color: #F37338"|style&equals;"text-align:center;"}}{{!}}{{{status}}}
 
{{!}}- style="background-color:#eeeeee"
 
 
}}
 
}}
 +
{{!}}- style="background-color:#fff;"
 +
{{#if:{{{creator|}}}|
 +
{{!}}style="width:20%"{{!}}'''Creator{{#if:{{{creator2|}}}|s}}'''
 +
{{!}}style="text-align:center;"{{!}}{{#set:argCreator={{{creator}}}|template=BySetTemplateSimpleValueOutput}}}} {{#if:{{{creator2|}}}| & {{#set:argCreator2={{{creator2}}}|template=BySetTemplateSimpleValueOutput}}}} {{#if:{{{creator3|}}}| & {{#set:argCreator3={{{creator3}}}|template=BySetTemplateSimpleValueOutput}}}}
 +
{{!}}- style="background-color:#eee;"
 
{{#if:{{{discovered|}}}|
 
{{#if:{{{discovered|}}}|
{{!}}Discovered
+
{{!}}'''Discovered'''
{{!}}style="text-align:center;"{{!}}{{{discovered}}}
+
{{!}}style="text-align:center;"{{!}}{{#set:argDiscoverDate={{{discovered}}}|template=BySetTemplateSimpleValueOutput}}
{{!}}- style="background-color:#eeeeee"
+
{{!}}- style="background-color:#fff;"
 
}}
 
}}
 
{{#if:{{{completed|}}}|
 
{{#if:{{{completed|}}}|
{{!}}Completed
+
{{!}}'''Completed'''
{{!}}style="text-align:center;"{{!}}{{{completed}}}
+
{{!}}style="text-align:center;"{{!}}{{#set:argCompleteDate={{{completed}}}|template=BySetTemplateSimpleValueOutput}}
{{!}}- style="background-color:#eeeeee"
+
{{!}}- style="background-color:#eee;"
 
}}
 
}}
 
{{#if:{{{closed|}}}|
 
{{#if:{{{closed|}}}|
{{!}}Closed
+
{{!}}'''Closed'''
{{!}}style="text-align:center;"{{!}}{{{closed}}}
+
{{!}}style="text-align:center;"{{!}}{{#set:argCloseDate={{{closed}}}|template=BySetTemplateSimpleValueOutput}}
{{!}}- style="background-color:#eeeeee"
+
{{!}}- style="background-color:#fff;"
 
}}
 
}}
 
{{#if:{{{reopened|}}}|
 
{{#if:{{{reopened|}}}|
{{!}}Reopened
+
{{!}}'''Reopened'''
{{!}}style="text-align:center;"{{!}}{{{reopened}}}
+
{{!}}style="text-align:center;"{{!}}{{#set:argReopenDate={{{reopened}}}|template=BySetTemplateSimpleValueOutput}}
{{!}}- style="background-color:#eeeeee"
+
{{!}}- style="background-color:#eee;"
 
}}
 
}}
 
{{#if:{{{timeline|}}}|
 
{{#if:{{{timeline|}}}|
{{!}}Timeline
+
{{!}}'''Timeline'''
{{!}}style="text-align:center;"{{!}}{{{timeline}}}
+
{{!}}style="text-align:center;"{{!}}{{#set:argTimeline={{{timeline}}}|template=BySetTemplateSimpleValueOutput}}
{{!}}- style="background-color:#eeeeee"
+
{{!}}- style="background-color:#fff;"
 
}}
 
}}
 
{{#ifeq:{{{halloffame|}}}|true|
 
{{#ifeq:{{{halloffame|}}}|true|
 
{{!}}Hall of Fame
 
{{!}}Hall of Fame
{{!}}style="text-align:center;"{{!}}[[{{FULLPAGENAME}}/Hall of Fame|Hall of Fame]]
+
{{!}}style="text-align:center;"{{!}}[[{{ROOTPAGENAME}}/Hall of Fame|Hall of Fame]] {{#set:argHallOfFame={{{halloffame|false}}}}}
{{!}}- style="background-color:#eeeeee"
+
{{!}}- style="background-color:#eee;"
}}
 
|}<noinclude>
 
;Description
 
:This template is used to create an arg infobox.
 
;Syntax
 
:Type <code>{{t|argbox|...}}</code> somewhere, with parameters as shown below.
 
;Sample output
 
<pre>{{argbox
 
| float      = left
 
| name        = Valve ARG
 
| image      = File:Example.png
 
| imagewidth  = 150
 
| description = This it the description of an arg, I somehow forgot about it
 
| creator    = Valve
 
| type        = Official ARG
 
| status      = Completed
 
| discovered  = 1970-01-01
 
| completed  = 1971-01-01
 
| closed      = 1971-01-01
 
| reopened    = 1972-01-01
 
| timeline    = [[Valve]]
 
}}</pre>
 
 
 
Results in...
 
{{argbox
 
| float      = left
 
| name        = Valve ARG
 
| image      = File:Example.png
 
| imagewidth  = 150
 
| description = This it the description of an arg, I somehow forgot about it
 
| creator    = [[Valve]]
 
| status      = Completed
 
| type        = official ARG
 
| discovered  = 1970-01-01
 
| completed  = 1971-01-01
 
| closed      = 1971-01-01
 
| reopened    = 1972-01-01
 
| timeline    = [[Valve]]
 
 
}}
 
}}
{{clear}}
 
 
===Parameters===
 
{| class="wikitable"
 
! Parameter
 
! Description
 
! Default
 
! Accepted Values
 
! Type
 
! Status
 
|-
 
| float
 
| box is aligned to the the left or the right.
 
|<code>right</code>
 
|<code>left</code> or <code>right</code>
 
| String
 
| Optional
 
|-
 
| clear
 
| content is delayed until just the right or left column is complete.
 
|<code>right</code>
 
|<code>left</code> or <code>right</code>
 
| String
 
| Optional
 
|-
 
| name
 
| The name of the ARG infobox
 
| Title of the current page
 
|
 
| String
 
| Optional
 
|-
 
| image
 
| The thumb of the ARG infobox
 
|<code>Image:Example.png</code>
 
| any valid link from local source or external
 
| String
 
| Optional
 
|-
 
| imagewidth
 
| Width of the thumb image of the ARG info box
 
|<code>250</code>
 
|any valid integer
 
| Int
 
| Optional
 
|-
 
| description
 
| Short description of the ARG
 
|
 
|
 
| String
 
| Optional
 
|-
 
| creator
 
| Creator of the ARG
 
|
 
|
 
| String
 
| Optional
 
|-
 
| type
 
| The type of the ARG
 
|
 
| <code>Official</code>, <code>Independent</code>
 
| String
 
| Optional
 
|-
 
| status
 
| Status of the ARG
 
|
 
| <code>Active</code>, <code>On Hold</code>, <code>Completed</code> or <code>Abandoned</code>
 
| String
 
| Optional
 
|-
 
| discovered
 
| Date of the ARG discovery, [[:Meta:Style Guide#Date Formats|YYYY-MM-DD]]
 
|
 
|
 
| Date
 
| Optional
 
|-
 
| completed
 
| Date of the ARG completion, YYYY-MM-DD
 
|
 
|
 
| Date
 
| Optional
 
|-
 
| closed
 
| Date of the ARG closing, YYYY-MM-DD (to be used ONLY in conjunction with reopened)
 
|
 
|
 
| Date
 
| Optional
 
|-
 
| reopened
 
| Date of the ARG reopening, YYYY-MM-DD
 
|
 
|
 
| Date
 
| Optional
 
|-
 
| timeline
 
| Wikilink to the timeline article of the ARG
 
|
 
|
 
| String
 
| Optional
 
|-
 
| halloffame
 
| Wether to render a link to a Hall of Fame
 
|
 
| <code>true</code> or emtpy
 
| Boolean
 
| Optional
 
 
|}
 
|}
</noinclude>
+
<noinclude>{{ {{TNTN|documentation}} }}</noinclude>
 +
<includeonly>{{Cat}}{{pageType}}<span style="display:none">{{#set:argPopupContent=<p id="{{ROOTPAGENAME}}-popup">{{{popupContent|{{#if:{{#show:{{ROOTPAGENAME}}|?argImage}}|<span id="{{ROOTPAGENAME}}imagePlaceholder">{{#show:{{ROOTPAGENAME}}|?argImage}}</span>|<span id="{{ROOTPAGENAME}}defaultImagePlaceholder">Special:Filepath/NewExample3.png</span>}}<br><br>Status: '''{{#show:{{ROOTPAGENAME}}|?argStatus}}'''<br>Created By: {{#show:{{ROOTPAGENAME}}|?argCreator}}<br>Discovered on: {{#show:{{ROOTPAGENAME}}|?argDiscoverDate}}<br><br>{{#show:{{ROOTPAGENAME}}|?argDescription}}}}}</p>}}</span></includeonly>

Latest revision as of 14:47, 28 September 2021

Template:Argbox
NewExample3.png
<templatestyles src="Module:Documentation/styles.css"></templatestyles>
Template documentation[view] [edit] [history] [purge]
Description

This is the {{argbox}} or ARG Info Box meta-template. This template is used to create an arg infobox on a given page, as well as assign the page to a category determined by the root page name.

Syntax

Type {{argbox}} somewhere, with parameters as shown below.

Sample output
{{argbox
| float       = left
| name        = Valve ARG
| image       = File:NewExample3.png
| imagewidth  = 400
| description = This it the description of an arg, I somehow forgot about it
| creator     = [[Valve]]
| creator2    = [[Valve]]
| type        = Official
| status      = Active
| discovered  = 1970-01-31
| completed   = 1971-01-31
| closed      = 1971-01-31
| reopened    = 1972-01-31 
| timeline    = [[Valve]]
}}

Results in...

Valve ARG
Active since 1970-01-31
NewExample3.png
This it the description of an arg, I somehow forgot about it
Type Official
Creators Valve & Valve
Discovered 1970-01-31
Completed 1971-01-31
Closed 1971-01-31
Reopened 1972-01-31
Timeline Valve
Parameters
Parameter Description Default Accepted Values Type Status
float box is aligned to the the left or the right. right left or right String Optional
clear content is delayed until just the right or left column is complete. right left or right String Optional
name The name of the ARG infobox Title of the current page String Optional
image The thumb of the ARG infobox Image:Example.png any valid link from local source or external String Optional
imagewidth Width of the thumb image of the ARG info box. Also controls the width of the argbox itself. 400 any valid integer Int Optional
description Short description of the ARG String Optional
creator A creator of the ARG String Optional
creator2 A second creator of the ARG String Optional
creator3 A third creator of the ARG String Optional
type The type of the ARG Official, Unofficial, Investigation String Optional
status Status of the ARG Active, On Hold, Completed or Discontinued String Optional
discovered Date of the ARG discovery, YYYY-MM-DD Date Optional
completed Date of the ARG completion, YYYY-MM-DD Date Optional
closed Date of the ARG closing, YYYY-MM-DD Date Optional
reopened Date of the ARG reopening, YYYY-MM-DD Date Optional
timeline Wikilink to the timeline article of the ARG String Optional
halloffame Whether to render a link to a Hall of Fame true or emtpy Boolean Optional
popupContent Manual override for given arg's investigation list dialog popup Any string including parsable wikitext (no HTML) String Optional