Hi fellow wiki editors!

To help newly registered users get more familiar with the wiki (and maybe older users too) there is now a {{Welcome to the wiki}} template. Have a look at it and feel free to add it to new users discussion pages (and perhaps your own).

I have tried to keep the template short, but meaningful. /Johan G

Difference between revisions of "Template:Forum link"

From FlightGear wiki
Jump to: navigation, search
(The correct server is forum.flightgear.org)
(Fix query parameters present even if the arguments were not passed; make style more in line with Template:Wikipedia for uniformity)
Line 1: Line 1:
<includeonly>[https://forum.flightgear.org/viewtopic.php?f={{{f|}}}&t={{{t|}}}&p={{{p|}}}&hilit={{{hilit|}}}{{{label|}}} {{#if:{{{title|}}}|"{{{title|}}}" in the forums|Forum link}}]</includeonly><noinclude>
+
<span class="plainlinks">[https://forum.flightgear.org/viewtopic.php?<!--
 +
-->{{#if:{{{f|}}}|f={{{f}}}<!-- Add an ampersand if t, p or hilit are present afterwards
 +
-->{{#if:{{{t|}}}|&|{{#if:{{{p|}}}|&|{{#if:{{{hilit|}}}|&|}}}}}}<!--
 +
-->|}}{{#if:{{{t|}}}|t={{{t}}}<!-- Add an ampersand if p or hilit are present afterwards
 +
-->{{#if:{{{p|}}}|&|{{#if:{{{hilit|}}}|&|}}}}<!--
 +
-->|}}{{#if:{{{p|}}}|p={{{p}}}<!-- Add an ampersand if hilit is present afterwards
 +
-->{{#if:{{{hilit|}}}|&|}}<!--
 +
-->|}}{{#if:{{{hilit|}}}|hilit={{{hilit}}}|}}{{#if:{{{label|}}}|#{{{label}}}|}} {{#if:{{{title|}}}|''{{{title}}}'' on the forum|Forum link}}]</span>{{#if: {{{noicon|}}} | | &#32;[[File:FlightGear icon 15px.png|This is a link to the FlightGear forum|link=Template:Forumref]] }}<noinclude>
 
{{Informative template|1=
 
{{Informative template|1=
 
__NOTOC__
 
__NOTOC__
Line 6: Line 13:
  
 
== Usage ==
 
== Usage ==
  <nowiki>{{</nowiki>'''forumref''' <nowiki>|</nowiki>title= <nowiki>|</nowiki>''t='' <nowiki>|</nowiki>''p='' <nowiki>|</nowiki>''label='' <nowiki>|</nowiki>''hilit='' <nowiki>|</nowiki>''f=''<nowiki>}}</nowiki>
+
  {{obr}}'''forumref'''{{!}}title={{!}}''t=''{{!}}''p=''{{!}}''label=''{{!}}''hilit=''{{!}}''f=''{{!}}''noicon=''{{cbr}}
  
; title: Topic title
+
; title: Topic title
  
; t: t-number (argument for phpbb viewtopic.php) (optional)
+
; t: Thread number to be passed to phpBB's viewtopic.php (optional)
  
; p: p-number (argument for phpbb viewtopic.php) (optional)
+
; p: Post number to be passed to phpBB's viewtopic.php (optional)
  
; label: html label, used for jumping to posts (optional)
+
; label: HTML label, used for jumping to posts (optional)
  
; hilit: Words on the forum to be highlight (optional)
+
; hilit: Words on the forum posts to be highlighted (optional)
  
; f: f-number (argument for phpbb viewtopic.php) (optional)
+
; f: Forum number to be passed to phpBB's viewtopic.php (optional)
 +
 
 +
; noicon: If true, the little FlightGear icon ([[File:FlightGear icon 15px.png]]) will not be shown.
  
 
== Example ==
 
== Example ==
  <nowiki>{{forumref |title=FlightGear Newsletter |t=7794}}</nowiki>
+
  <nowiki>{{forumref|title=FlightGear Newsletter|t=7794}}</nowiki>
  
{{forumref |title=FlightGear Newsletter |t=7794 }}
+
{{forumref|title=FlightGear Newsletter|t=7794}}
  
 
== Related template ==
 
== Related template ==

Revision as of 13:09, 13 May 2016

Forum link This is a link to the FlightGear forum

The following template description is not displayed when the template is inserted in an article.

Goal

A template to standardize forum links.

Usage

{{forumref|title=|t=|p=|label=|hilit=|f=|noicon=}}
title
Topic title
t
Thread number to be passed to phpBB's viewtopic.php (optional)
p
Post number to be passed to phpBB's viewtopic.php (optional)
label
HTML label, used for jumping to posts (optional)
hilit
Words on the forum posts to be highlighted (optional)
f
Forum number to be passed to phpBB's viewtopic.php (optional)
noicon
If true, the little FlightGear icon (FlightGear icon 15px.png) will not be shown.

Example

{{forumref|title=FlightGear Newsletter|t=7794}}

Template:Forumref

Related template