User:Bugman/forum link: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(Added examples for testing the 'noicon' and 'onlyicon' parameters.)
(Support for the 'onlyicon' parameter.)
Line 1: Line 1:
<span class="plainlinks">[<!--
<span class="plainlinks"><!--
-->{{User:Bugman/forum url|
-->{{#if: {{{onlyicon|}}}
    | f{{#if:{{{f|}}}||NULL}}          = {{{f}}}
     | [[File:FlightGear icon 15px.png<!--
     | t{{#if:{{{t|}}}||NULL}}          = {{{t}}}
      -->| {{#if: {{{title|{{{text|}}}}}}
    | p{{#if:{{{p|}}}||NULL}}          = {{{p}}}
            | {{#if: {{{title|}}}
    | anchor{{#if:{{{anchor|}}}||NULL}} = {{{anchor}}}
                | {{#if: {{{p|}}}
    | hilit{{#if:{{{hilit|}}}||NULL}}  = {{{hilit}}}
                    | '{{{title}}}' post on the FlightGear forum.
  }} <!--
                    | {{#if: {{{t|}}}
-->{{#if: {{{title|{{{text|}}}}}}
                        | '{{{title}}}' topic on the FlightGear forum.
    | {{#if: {{{title|}}}
                        | '{{{title}}}' subforum of the FlightGear forum.
        | {{#if: {{{p|}}}
                      }}
            | ''{{{title}}}'' post on the forum
                  }}
            | {{#if: {{{t|}}}
                | {{{text}}}
                | ''{{{title}}}'' topic on the forum
                | ''{{{title}}}'' subforum
               }}
               }}
           }}
            | This is a link to the FlightGear forum.
        | {{{text}}}
           }}<!--
      -->| link={{User:Bugman/forum url
                  | f{{#if:{{{f|}}}||NULL}}          = {{{f}}}
                  | t{{#if:{{{t|}}}||NULL}}          = {{{t}}}
                  | p{{#if:{{{p|}}}||NULL}}          = {{{p}}}
                  | anchor{{#if:{{{anchor|}}}||NULL}} = {{{anchor}}}
                  | hilit{{#if:{{{hilit|}}}||NULL}}  = {{{hilit}}}
                }}<!--
    -->]]
    | [{{User:Bugman/forum url
          | f{{#if:{{{f|}}}||NULL}}          = {{{f}}}
          | t{{#if:{{{t|}}}||NULL}}          = {{{t}}}
          | p{{#if:{{{p|}}}||NULL}}          = {{{p}}}
          | anchor{{#if:{{{anchor|}}}||NULL}} = {{{anchor}}}
          | hilit{{#if:{{{hilit|}}}||NULL}}  = {{{hilit}}}
        }} <!--
    -->{{#if: {{{title|{{{text|}}}}}}
          | {{#if: {{{title|}}}
              | {{#if: {{{p|}}}
                  | ''{{{title}}}'' post on the forum
                  | {{#if: {{{t|}}}
                      | ''{{{title}}}'' topic on the forum
                      | ''{{{title}}}'' subforum
                    }}
                }}
              | {{{text}}}
            }}
          | Forum link
        }}<!--
    -->]</span><!--
    -->{{#if: {{{noicon|}}}
        |
        | &#32;[[File:FlightGear icon 15px.png<!--
              -->| This is a link to the FlightGear forum.<!--
              -->| link={{project infrastructure|forum|link=no}}<!--
            -->]]
       }}
       }}
    | Forum link
  }}<!--
-->]</span><!--
-->{{#if: {{{noicon|}}}
    |
    | &#32;[[File:FlightGear icon 15px.png<!--
          -->| This is a link to the FlightGear forum<!--
          -->| link={{project infrastructure|forum|link=no}}<!--
        -->]]
   }}<noinclude>
   }}<noinclude>
{{Informative template|1=
{{Informative template|1=

Revision as of 11:20, 3 June 2019

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

This template is used to create links to forums, topics and posts on the FlightGear forum. It uses the User:Bugman/forum url template to construct the URI part of the link, and the {{project infrastructure}} template is used to create a link to the forum front page.

Usage

{{forum link
| title    =
| text     =
| f        =
| t        =
| p        =
| anchor   =
| hilit    =
| noicon   =
| onlyicon =
}}
title
Topic title (optional). This will be italicised and used to build the link text.
text
The link text (optional). This is an alternative to the title parameter and, if supplied, will be used for the link text.
f
Forum number to be passed to phpBB's viewtopic.php (optional).
t
Thread number to be passed to phpBB's viewtopic.php (optional).
p
Post number to be passed to phpBB's viewtopic.php (optional).
anchor
HTML anchor, used for jumping to posts (optional).
hilit
Words on the forum posts to be highlighted (optional). Words should be separated by the plus character "+".
noicon
If true, the little FlightGear icon (FlightGear icon 15px.png) will not be shown.
onlyicon
If true, only the little FlightGear icon (FlightGear icon 15px.png) will be shown.

Examples

No arguments

{{User:Bugman/forum link}}

Forum link This is a link to the FlightGear forum.

A subforum (The FlightGear project)

{{User:Bugman/forum link|f=42}}

Forum link This is a link to the FlightGear forum.

{{User:Bugman/forum link|title=The FlightGear project|f=42}}

The FlightGear project subforum This is a link to the FlightGear forum.

{{User:Bugman/forum link|text=The FlightGear project|f=42}}

The FlightGear project This is a link to the FlightGear forum.

{{User:Bugman/forum link|title=The FlightGear project|f=42|noicon=yes}}

The FlightGear project subforum

{{User:Bugman/forum link|title=The FlightGear project|f=42|onlyicon=yes}}

'The FlightGear project' subforum of the FlightGear forum.

A topic (FlightGear Newsletter)

{{User:Bugman/forum link|t=7794}}

Forum link This is a link to the FlightGear forum.

{{User:Bugman/forum link|title=FlightGear Newsletter|t=7794}}

FlightGear Newsletter topic on the forum This is a link to the FlightGear forum.

{{User:Bugman/forum link|text=FlightGear Newsletter|t=7794}}

FlightGear Newsletter This is a link to the FlightGear forum.

{{User:Bugman/forum link|title=FlightGear Newsletter|t=7794|noicon=yes}}

FlightGear Newsletter topic on the forum

{{User:Bugman/forum link|title=FlightGear Newsletter|t=7794|onlyicon=yes}}

'FlightGear Newsletter' topic on the FlightGear forum.

A post (Re: Marking topics as "solved")

{{User:Bugman/forum link|p=111333}}

Forum link This is a link to the FlightGear forum.

{{User:Bugman/forum link|title=Re: Marking topics as "solved"|p=111333}}

Re: Marking topics as "solved" post on the forum This is a link to the FlightGear forum.

{{User:Bugman/forum link|text=Re: Marking topics as "solved"|p=111333}}

Re: Marking topics as "solved" This is a link to the FlightGear forum.

{{User:Bugman/forum link|title=Re: Marking topics as "solved"|p=111333|noicon=yes}}

Re: Marking topics as "solved" post on the forum

{{User:Bugman/forum link|title=Re: Marking topics as "solved"|p=111333|onlyicon=yes}}

'Re: Marking topics as "solved"' post on the FlightGear forum.

Subforum, topic and post

Note  The f and t parameters are redundant in this URL.
{{User:Bugman/forum link|f=8|t=10805|p=111333}}

Forum link This is a link to the FlightGear forum.

{{User:Bugman/forum link|title=Re: Marking topics as "solved"|f=8|t=10805|p=111333}}

Re: Marking topics as "solved" post on the forum This is a link to the FlightGear forum.

{{User:Bugman/forum link|text=Re: Marking topics as "solved"|f=8|t=10805|p=111333}}

Re: Marking topics as "solved" This is a link to the FlightGear forum.

{{User:Bugman/forum link|title=Re: Marking topics as "solved"|f=8|t=10805|p=111333|noicon=yes}}

Re: Marking topics as "solved" post on the forum

{{User:Bugman/forum link|title=Re: Marking topics as "solved"|f=8|t=10805|p=111333|onlyicon=yes}}

'Re: Marking topics as "solved"' post on the FlightGear forum.

Topic and post

Note  The t parameter is redundant in this URL.
{{User:Bugman/forum link|t=10805|p=111333}}

Forum link This is a link to the FlightGear forum.

{{User:Bugman/forum link|title=Re: Marking topics as "solved"|t=10805|p=111333}}

Re: Marking topics as "solved" post on the forum This is a link to the FlightGear forum.

{{User:Bugman/forum link|text=Re: Marking topics as "solved"|t=10805|p=111333}}

Re: Marking topics as "solved" This is a link to the FlightGear forum.

{{User:Bugman/forum link|title=Re: Marking topics as "solved"|t=10805|p=111333|noicon=yes}}

Re: Marking topics as "solved" post on the forum

{{User:Bugman/forum link|title=Re: Marking topics as "solved"|t=10805|p=111333|onlyicon=yes}}

'Re: Marking topics as "solved"' post on the FlightGear forum.

Anchoring

{{User:Bugman/forum link|t=10805|anchor=p111333}}

Forum link This is a link to the FlightGear forum.

{{User:Bugman/forum link|title=Re: Marking topics as "solved"|t=10805|anchor=p111333}}

Re: Marking topics as "solved" topic on the forum This is a link to the FlightGear forum.

{{User:Bugman/forum link|text=Re: Marking topics as "solved"|t=10805|anchor=p111333}}

Re: Marking topics as "solved" This is a link to the FlightGear forum.

{{User:Bugman/forum link|title=Re: Marking topics as "solved"|t=10805|anchor=p111333|noicon=yes}}

Re: Marking topics as "solved" topic on the forum

{{User:Bugman/forum link|title=Re: Marking topics as "solved"|t=10805|anchor=p111333|onlyicon=yes}}

'Re: Marking topics as "solved"' topic on the FlightGear forum.

Highlighting

{{User:Bugman/forum link|t=10805|hilit=board+index}}

Forum link This is a link to the FlightGear forum.

{{User:Bugman/forum link|title=board index|t=10805|hilit=board+index}}

board index topic on the forum This is a link to the FlightGear forum.

{{User:Bugman/forum link|text=board index|t=10805|hilit=board+index}}

board index This is a link to the FlightGear forum.

{{User:Bugman/forum link|title=board index|t=10805|hilit=board+index|noicon=yes}}

board index topic on the forum

{{User:Bugman/forum link|title=board index|t=10805|hilit=board+index|onlyicon=yes}}

'board index' topic on the FlightGear forum.

Related templates