Difference between revisions of "Template:forumlink"

m (Removed newlines (they were also being transcluded, duh))
m (added example of use)
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
a small template to link to a post on the forum. it (should be) template safe, thats why I'm making it.
+
A small template to link to a post on the forum. it (should be) template safe, that's why I'm making it.
 +
 
 +
its a basic template that takes two key parms, and one optional parm as follows.
 +
 
 +
Given the link:
 +
:<tt><nowiki>http://love2d.org/forums/viewtopic.php?f=4&t=1623</nowiki></tt>
 +
 
 +
The template should be called as:
 +
:<tt><nowiki>{{forumlink|forum=4|topic=1623}}</nowiki></tt>
 +
Resulting in:
 +
:{{forumlink|forum=4|topic=1623}}
 +
 
 +
We can add the optional <tt>title</tt> parm to give it a nicer name:
 +
:<tt><nowiki>{{forumlink|forum=4|topic=1623|title=the ulove thread on the forums}}</nowiki></tt>
 +
Resulting in:
 +
:{{forumlink|forum=4|topic=1623|title=the uLove thread on the forums}}
 +
 
 
</noinclude>
 
</noinclude>
 
+
<includeonly>[http://love2d.org/forums/viewtopic.php?f={{{forum|}}}&t={{{topic|}}} {{{title|<sup>#{{{topic}}}</sup> }}}]</includeonly>
<includeonly>[http://love2d.org/forums/viewtopic.php?f={{{forum|3}}}&t={{{topic|}}} {{{title|<sup>#{{{topic}}}</sup> }}}]</includeonly>
 

Revision as of 01:44, 12 September 2010

A small template to link to a post on the forum. it (should be) template safe, that's why I'm making it.

its a basic template that takes two key parms, and one optional parm as follows.

Given the link:

http://love2d.org/forums/viewtopic.php?f=4&t=1623

The template should be called as:

{{forumlink|forum=4|topic=1623}}

Resulting in:

#1623

We can add the optional title parm to give it a nicer name:

{{forumlink|forum=4|topic=1623|title=the ulove thread on the forums}}

Resulting in:

the uLove thread on the forums