Difference between revisions of "Template:Forum link"

From Kerbal Space Program Wiki
Jump to: navigation, search
m (Minor tweaks.)
m (*renamed Parameter Table to Parameter table;)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[http://kerbalspaceprogram.com/forum/showthread.php/{{{threadID}}}{{#if: {{{postID}}}|&#35;post{{{postID}}}|}} Forum thread {{{threadID}}}{{#if: {{{threadName}}}|, "{{{threadName}}}"|}}]<noinclude>
+
[http://forum.kerbalspaceprogram.com/threads/{{{threadID}}}{{#if: {{{postID|}}}|&#35;post{{{postID}}}}} {{{text|Forum thread {{{threadID}}}{{#if: {{{threadName|}}}|, "{{{threadName}}}"}}}}}]<noinclude>
  
<pre>
+
{{Parameter table|parameters=
http://kerbalspaceprogram.com/forum/showthread.php/{{{threadID}}}
+
{{Parameter row|threadID|The ID of the thread}}
if {{{threadName}}} // thread name is defined as a non-empty string
+
{{Parameter row|postID|The ID of the post.|Not set}}
  -{{{threadName}}}
+
{{Parameter row|text|Custom link text.|<tt>Forum thread {{{threadID}}}</tt>}}
if {{{postID}}} // post ID is defined as a non-empty string
+
{{Parameter row|threadName|The name of the thread.|Not set}}
  #post{{{postID}}}
+
}}
</pre>
 
  
 
See http://www.mediawiki.org/wiki/Help:Templates#Default_values for more information.
 
See http://www.mediawiki.org/wiki/Help:Templates#Default_values for more information.

Latest revision as of 12:02, 19 December 2014

Forum thread {{{threadID}}}

# Optional Description Default
threadID No The ID of the thread
postID Yes The ID of the post. Not set
text Yes Custom link text. Forum thread {{{threadID}}}
threadName Yes The name of the thread. Not set

See http://www.mediawiki.org/wiki/Help:Templates#Default_values for more information.

Template

Usage Produces
{{forum link | threadID=12406}}
 Forum thread 12406
{{forum link | threadID=12406 | threadName=Show off your awesome KSP Pictures}}
 Forum thread 12406, "Show off your awesome KSP Pictures"
{{forum link | threadID=12406 | postID=182021}}
 Forum thread 12406
{{forum link | threadID=12406 | threadName=Show off your awesome KSP Pictures | postID=182021}}
 Forum thread 12406, "Show off your awesome KSP Pictures"