Difference between revisions of "Template:Idgames"

From DoomWiki.org

m (Adapt recoding that avoids a redirect for use of the file parameter)
m (no unnamed path, as the unnamed {2} is placed after ?id=)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
<includeonly><span class="plainlinks">{{#if:{{{2|{{{file|{{{id|}}}}}}}}}|[https://www.doomworld.com/idgames/{{#if:{{{file|}}}||?id=}}{{{2|{{{file|{{{id}}}}}}}}} {{{1|{{{title|{{PAGENAME}}}}}}}}]{{#if:{{{linkonly|}}}||&nbsp;at [https://www.doomworld.com/idgames/ Doomworld/idgames]}}|Error: no file or id given, see [[Template:Idgames|the instructions]] to use this template.}}</span></includeonly><noinclude>
 
<includeonly><span class="plainlinks">{{#if:{{{2|{{{file|{{{id|}}}}}}}}}|[https://www.doomworld.com/idgames/{{#if:{{{file|}}}||?id=}}{{{2|{{{file|{{{id}}}}}}}}} {{{1|{{{title|{{PAGENAME}}}}}}}}]{{#if:{{{linkonly|}}}||&nbsp;at [https://www.doomworld.com/idgames/ Doomworld/idgames]}}|Error: no file or id given, see [[Template:Idgames|the instructions]] to use this template.}}</span></includeonly><noinclude>
 +
<br>
 +
This template is used for linking to a file (usually a [[PWAD]]) at the [[Doomworld]]/[[Idgames archive|idgames]] interface (''with'' a reference to its frontpage).
 +
 
<u>Usage</u>
 
<u>Usage</u>
 
This is used for linking to a file (usually a [[PWAD]]) at the [[Doomworld]]/[[Idgames archive|idgames]] interface, as:
 
  
 
: '''<tt><nowiki>{{idgames|file=somepath|title=somename}}</nowiki></tt>'''
 
: '''<tt><nowiki>{{idgames|file=somepath|title=somename}}</nowiki></tt>'''
: '''<tt><nowiki>{{idgames|id=somenumber|title=somename}}</nowiki></tt>'''
+
: '''<tt><nowiki>{{idgames|id=somenumber|title=somename}}</nowiki></tt>''' <span style="color: #ff0000; background-color: inherit;">(Deprecated usage)</span>
  
 
where ''somepath'' is the file's path in the archive or ''somenumber'' is the file ID and ''somename'' is normally the file's title or description (although, like any hyperlink, it can say other things instead).
 
where ''somepath'' is the file's path in the archive or ''somenumber'' is the file ID and ''somename'' is normally the file's title or description (although, like any hyperlink, it can say other things instead).
  
''Example:''  
+
''Examples:''  
:<tt><nowiki>{{idgames|file=levels/doom/d-f/eternity.zip|Eternity}}</nowiki></tt> becomes {{idgames|file=levels/doom/d-f/eternity.zip|Eternity}}
+
:<tt><nowiki>{{idgames|file=levels/doom/d-f/eternity|Eternity}}</nowiki></tt> becomes {{idgames|file=levels/doom/d-f/eternity|Eternity}}
 
:<tt><nowiki>{{idgames|id=1046|title=Eternity}}</nowiki></tt> becomes {{idgames|id=1046|title=Eternity}}
 
:<tt><nowiki>{{idgames|id=1046|title=Eternity}}</nowiki></tt> becomes {{idgames|id=1046|title=Eternity}}
  
 
*The title can also be the first, unnamed parameter: <tt><nowiki>{{idgames|Eternity|id=1046}}</nowiki></tt> becomes {{idgames|Eternity|id=1046}}.
 
*The title can also be the first, unnamed parameter: <tt><nowiki>{{idgames|Eternity|id=1046}}</nowiki></tt> becomes {{idgames|Eternity|id=1046}}.
*The path or id can also be the second unnamed parameter: <tt><nowiki>{{idgames|Eternity|1046}}</nowiki></tt> becomes {{idgames|Eternity|1046}}.
+
*The id can also be the second unnamed parameter: <tt><nowiki>{{idgames|Eternity|1046}}</nowiki></tt> becomes {{idgames|Eternity|1046}}.
 
*If no title is given, the template uses the page title.
 
*If no title is given, the template uses the page title.
 
*If no path or id is given, the template displays an error message: {{idgames}}
 
*If no path or id is given, the template displays an error message: {{idgames}}
*If the "<span class="plainlinks">at [https://www.doomworld.com/idgames/ Doomworld/idgames]</span>" bit is not desired, the linkonly parameter can be used: <tt><nowiki>{{idgames|Eternity|1046|linkonly=1}}</nowiki></tt> becomes {{idgames|Eternity|1046|linkonly=1}}.
+
*If the "<span class="plainlinks">at [https://www.doomworld.com/idgames/ Doomworld/idgames]</span>" bit is not desired, the linkonly parameter can be used: <tt><nowiki>{{idgames|Eternity|1046|linkonly=1}}</nowiki></tt> becomes {{idgames|Eternity|1046|linkonly=1}}. Alternatively, use the {{tl|ig}} template.
  
 
[[Category:External link templates]]</noinclude>
 
[[Category:External link templates]]</noinclude>

Latest revision as of 03:20, 30 December 2019


This template is used for linking to a file (usually a PWAD) at the Doomworld/idgames interface (with a reference to its frontpage).

Usage

{{idgames|file=somepath|title=somename}}
{{idgames|id=somenumber|title=somename}} (Deprecated usage)

where somepath is the file's path in the archive or somenumber is the file ID and somename is normally the file's title or description (although, like any hyperlink, it can say other things instead).

Examples:

{{idgames|file=levels/doom/d-f/eternity|Eternity}} becomes Eternity at Doomworld/idgames
{{idgames|id=1046|title=Eternity}} becomes Eternity at Doomworld/idgames
  • The title can also be the first, unnamed parameter: {{idgames|Eternity|id=1046}} becomes Eternity at Doomworld/idgames.
  • The id can also be the second unnamed parameter: {{idgames|Eternity|1046}} becomes Eternity at Doomworld/idgames.
  • If no title is given, the template uses the page title.
  • If no path or id is given, the template displays an error message: Error: no file or id given, see the instructions to use this template.
  • If the "at Doomworld/idgames" bit is not desired, the linkonly parameter can be used: {{idgames|Eternity|1046|linkonly=1}} becomes Eternity. Alternatively, use the {{ig}} template.