Difference between revisions of "Template:Forum link"

From Kerbal Space Program Wiki
Jump to: navigation, search
m (Colons.)
m (Minor tweaks.)
Line 1: Line 1:
[http://kerbalspaceprogram.com/forum/showthread.php/{{{threadID}}}{{#if: {{{threadName}}}|{{{threadName}}}|}}{{#if: {{{postID}}}|#post{{{postID}}}|}} Forum thread {{{threadID}}}{{#if: {{{threadName}}}|, "{{{threadName}}}"]<noinclude>
+
[http://kerbalspaceprogram.com/forum/showthread.php/{{{threadID}}}{{#if: {{{threadName}}}|-{{{threadName}}}|}}{{#if: {{{postID}}}|&#35;post{{{postID}}}|}} Forum thread {{{threadID}}}{{#if: {{{threadName}}}|, "{{{threadName}}}"]<noinclude>
  
 
<pre>
 
<pre>

Revision as of 01:21, 8 October 2012

Forum thread {{{threadID}}}{{#if: {{{threadName}}}|, "{{{threadName}}}"

http://kerbalspaceprogram.com/forum/showthread.php/{{{threadID}}}
if {{{threadName}}} // thread name is defined as a non-empty string
   -{{{threadName}}}
if {{{postID}}} // post ID is defined as a non-empty string
   #post{{{postID}}}

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"