Template:Forum link: Difference between revisions
(Preliminary multi-language support by using the {{LangSwitch}} template for every text element.) |
(German language support.) |
||
Line 10: | Line 10: | ||
| {{#if: {{{p|}}} | | {{#if: {{{p|}}} | ||
| {{LangSwitch | | {{LangSwitch | ||
| de = '{{{title}}}' Post im FlightGear-Forum. | |||
| en = '{{{title}}}' post on the FlightGear forum. | | en = '{{{title}}}' post on the FlightGear forum. | ||
}} | }} | ||
| {{#if: {{{t|}}} | | {{#if: {{{t|}}} | ||
| {{LangSwitch | | {{LangSwitch | ||
| de = '{{{title}}}' Thema des FlightGear-Forums. | |||
| en = '{{{title}}}' topic on the FlightGear forum. | | en = '{{{title}}}' topic on the FlightGear forum. | ||
}} | }} | ||
| {{LangSwitch | | {{LangSwitch | ||
| de = '{{{title}}}' Unterforum des FlightGear-Forums. | |||
| en = '{{{title}}}' subforum of the FlightGear forum. | | en = '{{{title}}}' subforum of the FlightGear forum. | ||
}} | }} | ||
Line 24: | Line 27: | ||
}} | }} | ||
| {{LangSwitch | | {{LangSwitch | ||
| de = Dies ist ein Link zum FlightGear-Forum. | |||
| en = This is a link to the FlightGear forum. | | en = This is a link to the FlightGear forum. | ||
}} | }} | ||
Line 46: | Line 50: | ||
| {{#if: {{{p|}}} | | {{#if: {{{p|}}} | ||
| {{LangSwitch | | {{LangSwitch | ||
| de = ''{{{title}}}'' Post im Forum | |||
| en = ''{{{title}}}'' post on the forum | | en = ''{{{title}}}'' post on the forum | ||
}} | }} | ||
| {{#if: {{{t|}}} | | {{#if: {{{t|}}} | ||
| {{LangSwitch | | {{LangSwitch | ||
| de = ''{{{title}}}'' Thema des Forums | |||
| en = ''{{{title}}}'' topic on the forum | | en = ''{{{title}}}'' topic on the forum | ||
}} | }} | ||
| {{LangSwitch | | {{LangSwitch | ||
| de = ''{{{title}}}'' Unterforum | |||
| en = ''{{{title}}}'' subforum | | en = ''{{{title}}}'' subforum | ||
}} | }} | ||
Line 70: | Line 77: | ||
-->| {{{size|15px}}}<!-- | -->| {{{size|15px}}}<!-- | ||
-->| {{LangSwitch | -->| {{LangSwitch | ||
| de = Dies ist ein Link zum FlightGear-Forum. | |||
| en = This is a link to the FlightGear forum. | | en = This is a link to the FlightGear forum. | ||
}}<!-- | }}<!-- |
Revision as of 08:46, 5 June 2019
Goal
This template is used to create MediaWiki links - either via text or the icon - to subforums, topics and posts on the FlightGear forum.
Usage
{{forum link | title = | text = | f = | t = | p = | anchor = | hilit = | noicon = | onlyicon = | size = }}
- 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 "+".
- size
- The icon size (optional). This should be a valid MediaWiki image size value, e.g. 32px.
Technical details
This template uses the {{forum url}} template to construct the URI part of the link. That template then uses the {{project infrastructure}} template to provide the protocol and domain name part of the URI.
Examples
No arguments
{{forum link}}
A subforum (The FlightGear project)
{{forum link|f=42}}
{{forum link|title=The FlightGear project|f=42}}
The FlightGear project subforum
{{forum link|text=The FlightGear project|f=42}}
{{forum link|title=The FlightGear project|f=42|noicon=yes}}
The FlightGear project subforum
{{forum link|title=The FlightGear project|f=42|onlyicon=yes}}
A topic (FlightGear Newsletter)
{{forum link|t=7794}}
{{forum link|title=FlightGear Newsletter|t=7794}}
FlightGear Newsletter topic on the forum
{{forum link|text=FlightGear Newsletter|t=7794}}
{{forum link|title=FlightGear Newsletter|t=7794|noicon=yes}}
FlightGear Newsletter topic on the forum
{{forum link|title=FlightGear Newsletter|t=7794|onlyicon=yes}}
A post (Re: Marking topics as "solved")
{{forum link|p=111333}}
{{forum link|title=Re: Marking topics as "solved"|p=111333}}
Re: Marking topics as "solved" post on the forum
{{forum link|text=Re: Marking topics as "solved"|p=111333}}
Re: Marking topics as "solved"
{{forum link|title=Re: Marking topics as "solved"|p=111333|noicon=yes}}
Re: Marking topics as "solved" post on the forum
{{forum link|title=Re: Marking topics as "solved"|p=111333|onlyicon=yes}}
Subforum, topic and post
Note The f and t parameters are redundant in this URL. |
{{forum link|f=8|t=10805|p=111333}}
{{forum link|title=Re: Marking topics as "solved"|f=8|t=10805|p=111333}}
Re: Marking topics as "solved" post on the forum
{{forum link|text=Re: Marking topics as "solved"|f=8|t=10805|p=111333}}
Re: Marking topics as "solved"
{{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
{{forum link|title=Re: Marking topics as "solved"|f=8|t=10805|p=111333|onlyicon=yes}}
Topic and post
Note The t parameter is redundant in this URL. |
{{forum link|t=10805|p=111333}}
{{forum link|title=Re: Marking topics as "solved"|t=10805|p=111333}}
Re: Marking topics as "solved" post on the forum
{{forum link|text=Re: Marking topics as "solved"|t=10805|p=111333}}
Re: Marking topics as "solved"
{{forum link|title=Re: Marking topics as "solved"|t=10805|p=111333|noicon=yes}}
Re: Marking topics as "solved" post on the forum
{{forum link|title=Re: Marking topics as "solved"|t=10805|p=111333|onlyicon=yes}}
Anchoring
{{forum link|t=10805|anchor=p111333}}
{{forum link|title=Re: Marking topics as "solved"|t=10805|anchor=p111333}}
Re: Marking topics as "solved" topic on the forum
{{forum link|text=Re: Marking topics as "solved"|t=10805|anchor=p111333}}
Re: Marking topics as "solved"
{{forum link|title=Re: Marking topics as "solved"|t=10805|anchor=p111333|noicon=yes}}
Re: Marking topics as "solved" topic on the forum
{{forum link|title=Re: Marking topics as "solved"|t=10805|anchor=p111333|onlyicon=yes}}
Highlighting
{{forum link|t=10805|hilit=board+index}}
{{forum link|title=board index|t=10805|hilit=board+index}}
board index topic on the forum
{{forum link|text=board index|t=10805|hilit=board+index}}
{{forum link|title=board index|t=10805|hilit=board+index|noicon=yes}}
board index topic on the forum
{{forum link|title=board index|t=10805|hilit=board+index|onlyicon=yes}}
Different icon sizes
Text and icon
{{forum link|title=Re: Marking topics as "solved"|p=111333|size=15px}}
Re: Marking topics as "solved" post on the forum
{{forum link|title=Re: Marking topics as "solved"|p=111333|size=32px}}
Re: Marking topics as "solved" post on the forum
{{forum link|title=Re: Marking topics as "solved"|p=111333|size=64px}}
Re: Marking topics as "solved" post on the forum
{{forum link|title=Re: Marking topics as "solved"|p=111333|size=200px}}
Re: Marking topics as "solved" post on the forum
Icon only
{{forum link|title=Re: Marking topics as "solved"|p=111333|onlyicon=yes|size=15px}}
{{forum link|title=Re: Marking topics as "solved"|p=111333|onlyicon=yes|size=32px}}
{{forum link|title=Re: Marking topics as "solved"|p=111333|onlyicon=yes|size=64px}}
{{forum link|title=Re: Marking topics as "solved"|p=111333|onlyicon=yes|size=200px}}
Related templates
- {{forum}}
- {{project infrastructure}}
- {{forum url}}