Template:Forum link: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(Fix numbered list being created when the ''label'' parameter was passed)
(Add template data)
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<span class="plainlinks">[https://forum.flightgear.org/viewtopic.php?<!--
<span class="plainlinks"><!--
-->{{#if:{{{f|}}}|f={{{f}}}<!-- Add an ampersand if t, p or hilit are present afterwards
-->{{#if: {{{onlyicon|}}}
-->{{#if:{{{t|}}}|&|{{#if:{{{p|}}}|&|{{#if:{{{hilit|}}}|&|}}}}}}<!--
    | [[{{#if: {{{size|}}}
-->|}}{{#if:{{{t|}}}|t={{{t}}}<!-- Add an ampersand if p or hilit are present afterwards
          | File:FlightGear_logo.png
-->{{#if:{{{p|}}}|&|{{#if:{{{hilit|}}}|&|}}}}<!--
          | File:FlightGear icon 15px.png
-->|}}{{#if:{{{p|}}}|p={{{p}}}<!-- Add an ampersand if hilit is present afterwards
        }}<!--
-->{{#if:{{{hilit|}}}|&|}}<!--
      -->| {{{size|15px}}}<!--
-->|}}{{#if:{{{hilit|}}}|hilit={{{hilit}}}|}}{{#if:{{{label|}}}|&num;{{{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>
      -->| {{#if: {{{title|{{{text|}}}}}}
            | {{#if: {{{title|}}}
                | {{#switch: {{{type|view}}}
                    | view = <!--
                    - -->{{#if: {{{p|}}}
                          | {{LangSwitch
                              | de = '{{{title}}}' Post im FlightGear-Forum.
                              | en = '{{{title}}}' post on the FlightGear forum.
                            }}
                          | {{#if: {{{t|}}}
                              | {{LangSwitch
                                  | de = '{{{title}}}' Thema des FlightGear-Forums.
                                  | en = '{{{title}}}' topic on the FlightGear forum.
                                }}
                              | {{LangSwitch
                                  | de = '{{{title}}}' Unterforum des FlightGear-Forums.
                                  | en = '{{{title}}}' subforum of the FlightGear forum.
                                }}
                            }}
                        }}
                    | member = <!--
                      -->{{#if: {{{u|}}}
                            | {{LangSwitch
                                | de = Der FlightGear-Forum Benutzer '{{{title}}}'.
                                | en = The FlightGear forum user '{{{title}}}'.
                              }}
                            | {{LangSwitch
                                | de = Die Mitgliederliste des Forums.
                                | en = The FlightGear forum listing.
                              }}
                        }}
                    | search = <!--
                      -->{{#if: {{{t|}}}
                            | {{#if: {{{keywords|}}}
                                | {{LangSwitch
                                    | en = FlightGear topic search for '{{{keywords}}}'.
                                  }}
                                | {{LangSwitch
                                    | en = FlightGear topic search page.
                                  }}
                              }}
                            | {{#if: {{{f|}}}
                                | {{#if: {{{keywords|}}}
                                      | {{LangSwitch
                                          | en = FlightGear subforum search for '{{{keywords}}}'.
                                        }}
                                      | {{LangSwitch
                                          | en = FlightGear subforum search page.
                                        }}
                                  }}
                                | {{#if: {{{keywords|}}}
                                      | {{LangSwitch
                                          | en = FlightGear forum search for '{{{keywords}}}'.
                                        }}
                                        | {{LangSwitch
                                            | en = FlightGear forum search page.
                                        }}
                                  }}
                              }}
                        }}
                  }}
                | {{{text}}}
              }}
            | {{LangSwitch
                | de = Dies ist ein Link zum FlightGear-Forum.
                | en = This is a link to the FlightGear forum.
                | fr = Ceci est un lien vers le forum FlightGear.
              }}
          }}<!--
      -->| link={{forum url
                  | type                                  = {{{type|view}}}
                  | f{{#if:{{{f|}}}||NULL}}              = {{{f}}}
                  | t{{#if:{{{t|}}}||NULL}}              = {{{t}}}
                  | p{{#if:{{{p|}}}||NULL}}              = {{{p}}}
                  | u{{#if:{{{u|}}}||NULL}}              = {{{u}}}
                  | anchor{{#if:{{{anchor|}}}||NULL}}    = {{{anchor}}}
                  | hilit{{#if:{{{hilit|}}}||NULL}}      = {{{hilit}}}
                  | keywords{{#if:{{{keywords|}}}||NULL}} = {{{keywords}}}
                }}<!--
    -->]]
    | [{{forum url
          | type                                  = {{{type|view}}}
          | f{{#if:{{{f|}}}||NULL}}              = {{{f}}}
          | t{{#if:{{{t|}}}||NULL}}              = {{{t}}}
          | p{{#if:{{{p|}}}||NULL}}              = {{{p}}}
          | u{{#if:{{{u|}}}||NULL}}              = {{{u}}}
          | anchor{{#if:{{{anchor|}}}||NULL}}    = {{{anchor}}}
          | hilit{{#if:{{{hilit|}}}||NULL}}      = {{{hilit}}}
          | keywords{{#if:{{{keywords|}}}||NULL}} = {{{keywords}}}
        }} <!--
    -->{{#if: {{{title|{{{text|}}}}}}
          | {{#if: {{{title|}}}
              | {{#switch: {{{type|view}}}
                  | view = <!--
                  -->{{#if: {{{p|}}}
                        | {{LangSwitch
                            | de = ''{{{title}}}'' Post im Forum
                            | en = ''{{{title}}}'' post on the forum
                          }}
                        | {{#if: {{{t|}}}
                            | {{LangSwitch
                                | de = ''{{{title}}}'' Thema des Forums
                                | en = ''{{{title}}}'' topic on the forum
                              }}
                            | {{LangSwitch
                                | de = ''{{{title}}}'' Unterforum
                                | en = ''{{{title}}}'' subforum
                              }}
                          }}
                      }}
                  | member = <!--
                  -->{{#if: {{{u|}}}
                        | {{LangSwitch
                            | de = der Forum Benutzer ''{{{title}}}''
                            | en = the forum user ''{{{title}}}''
                          }}
                        | {{LangSwitch
                            | de = Die Mitgliederliste des Forums
                            | en = the forum member listing''
                          }}
                      }}
                  | search = <!--
                  -->{{#if: {{{t|}}}
                        | {{#if: {{{keywords|}}}
                              | {{LangSwitch
                                  | en = FlightGear topic search for '{{{keywords}}}'
                                }}
                              | {{LangSwitch
                                  | en = FlightGear topic search page
                                }}
                          }}
                        | {{#if: {{{f|}}}
                              | {{#if: {{{keywords|}}}
                                  | {{LangSwitch
                                      | en = FlightGear subforum search for '{{{keywords}}}'
                                    }}
                                  | {{LangSwitch
                                      | en = FlightGear subforum search page
                                    }}
                                }}
                              | {{#if: {{{keywords|}}}
                                  | {{LangSwitch
                                      | en = FlightGear forum search for '{{{keywords}}}'
                                    }}
                                  | {{LangSwitch
                                      | en = FlightGear forum search page
                                    }}
                                }}
                          }}
                      }}
                }}
              | {{{text}}}
            }}
        }}<!--
    -->]</span><!--
    -->{{#if: {{{noicon|}}}
        |
        | &#32;[[{{#if: {{{size|}}}
                    | File:FlightGear_logo.png
                    | File:FlightGear icon 15px.png
                  }}<!--
              -->| {{{size|15px}}}<!--
              -->| {{LangSwitch
                      | de = Dies ist ein Link zum FlightGear-Forum.
                      | en = This is a link to the FlightGear forum.
                      | fr = Ceci est un lien vers le forum FlightGear.
                    }}<!--
              -->| link={{project infrastructure|forum|link=no}}<!--
            -->]]
      }}
  }}<noinclude>
{{Informative template|1=
{{Informative template|1=
__NOTOC__
== Goal ==
== Goal ==
A template to standardize forum links.
This template is used to create MediaWiki links - either via text or the icon - to subforums, topics and posts on the FlightGear forum.


__TOC__
== Usage ==
== Usage ==
{{obr}}'''forumref'''{{!}}title={{!}}''t=''{{!}}''p=''{{!}}''label=''{{!}}''hilit=''{{!}}''f=''{{!}}''noicon=''{{cbr}}


; title: Topic title
{{obr}}'''forum link'''
{{!}} ''title''    =
{{!}} ''text''    =
{{!}} ''type''    =
{{!}} ''f''        =
{{!}} ''t''        =
{{!}} ''p''        =
{{!}} ''anchor''  =
{{!}} ''hilit''    =
{{!}} ''u''        =
{{!}} ''keywords'' =
{{!}} ''noicon''  =
{{!}} ''onlyicon'' =
{{!}} ''size''    =
{{cbr}}


; t: Thread number to be passed to phpBB's viewtopic.php (optional)
; title: Topic title (optional).  This will be italicised and used to build the link text.


; p: Post number to be passed to phpBB's viewtopic.php (optional)
; text: The link text (optional).  This is an alternative to the {{param|title}} parameter and, if supplied, will be used for the link text.


; label: HTML label, used for jumping to posts (optional)
; type: The forum interface type that can be one of:


; hilit: Words on the forum posts to be highlighted (optional)
:; view: The default value.  This is used for URLs to posts, topics, and posts, via phpBB's <code>viewforum.php</code> or <code>viewtopic.php</code>.


; f: Forum number to be passed to phpBB's viewtopic.php (optional)
:; member: For URLs of a user on the forum, via phpBB's <code>memberlist.php</code>.  This value will cause the {{param|f}}, {{param|t}}, {{param|p}}, {{param|anchor}}, and {{param|hilit}} parameters to be ignored.
 
:; search: For URLs performing forum searches, via phpBB's <code>search.php</code>.  This value will cause the {{param|p}}, {{param|anchor}}, and {{param|hilit}} parameters to be ignored.
 
; f: Forum number (optional).  Used with the {{param|type}} values of {{param||view}} and {{param||search}}.
 
; t: Topic number (optional).  Used with the {{param|type}} values of {{param||view}} and {{param||search}}.
 
; p: Post number (optional).  Used with the {{param|type}} value of {{param||view}}.
 
; anchor: HTML anchor, used for jumping to posts (optional).  Used with the {{param|type}} value of {{param||view}}.
 
; hilit: Words on the forum posts to be highlighted (optional).  Words should be separated by the plus character "+".  Used with the {{param|type}} value of {{param||view}}.
 
; u: User number (optional).  Used with the {{param|type}} value of {{param||member}}.
 
; keywords: The keywords to perform a forum search with (optional).  Words should be separated by the plus character "+".  Used with the {{param|type}} value of {{param||search}}.


; noicon: If true, the little FlightGear icon ([[File:FlightGear icon 15px.png]]) will not be shown.
; noicon: If true, the little FlightGear icon ([[File:FlightGear icon 15px.png]]) will not be shown.


== Example ==
; onlyicon: If true, only the little FlightGear icon ([[File:FlightGear icon 15px.png]]) will be shown.
  <nowiki>{{forumref|title=FlightGear Newsletter|t=7794}}</nowiki>
 
; size: The icon size (optional).  This should be a valid MediaWiki image size value, e.g. {{param||32px}}.
 
== Technical details ==
 
This template uses the {{tl|forum url}} template to construct the URI part of the link.  That template then uses the {{tl|project infrastructure}} template to provide the protocol and domain name part of the URI.
 
== Examples ==
 
=== No arguments ===
 
{{obr}}forum link{{cbr}}
 
{{forum link}}
 
=== View mode ===
 
==== A subforum (The FlightGear project) ====
 
{{obr}}forum link{{!}}f=42{{cbr}}
 
{{forum link|f=42}}
 
{{obr}}forum link{{!}}title=The FlightGear project{{!}}f=42{{cbr}}
 
{{forum link|title=The FlightGear project|f=42}}
 
{{obr}}forum link{{!}}text=The FlightGear project{{!}}f=42{{cbr}}
 
{{forum link|text=The FlightGear project|f=42}}
 
  {{obr}}forum link{{!}}title=The FlightGear project{{!}}f=42{{!}}noicon=yes{{cbr}}
 
{{forum link|title=The FlightGear project|f=42|noicon=yes}}
 
{{obr}}forum link{{!}}title=The FlightGear project{{!}}f=42{{!}}onlyicon=yes{{cbr}}
 
{{forum link|title=The FlightGear project|f=42|onlyicon=yes}}
 
==== A topic (FlightGear Newsletter) ====
 
{{obr}}forum link{{!}}t=7794{{cbr}}
 
{{forum link|t=7794}}
 
{{obr}}forum link{{!}}title=FlightGear Newsletter{{!}}t=7794{{cbr}}
 
{{forum link|title=FlightGear Newsletter|t=7794}}
 
{{obr}}forum link{{!}}text=FlightGear Newsletter{{!}}t=7794{{cbr}}
 
{{forum link|text=FlightGear Newsletter|t=7794}}
 
{{obr}}forum link{{!}}title=FlightGear Newsletter{{!}}t=7794{{!}}noicon=yes{{cbr}}
 
{{forum link|title=FlightGear Newsletter|t=7794|noicon=yes}}
 
{{obr}}forum link{{!}}title=FlightGear Newsletter{{!}}t=7794{{!}}onlyicon=yes{{cbr}}
 
{{forum link|title=FlightGear Newsletter|t=7794|onlyicon=yes}}
 
==== A post (Re: Marking topics as "solved") ====
 
{{obr}}forum link{{!}}p=111333{{cbr}}
 
{{forum link|p=111333}}
 
{{obr}}forum link{{!}}title=Re: Marking topics as "solved"{{!}}p=111333{{cbr}}
 
{{forum link|title=Re: Marking topics as "solved"|p=111333}}
 
{{obr}}forum link{{!}}text=Re: Marking topics as "solved"{{!}}p=111333{{cbr}}
 
{{forum link|text=Re: Marking topics as "solved"|p=111333}}
 
{{obr}}forum link{{!}}title=Re: Marking topics as "solved"{{!}}p=111333{{!}}noicon=yes{{cbr}}
 
{{forum link|title=Re: Marking topics as "solved"|p=111333|noicon=yes}}
 
{{obr}}forum link{{!}}title=Re: Marking topics as "solved"{{!}}p=111333{{!}}onlyicon=yes{{cbr}}
 
{{forum link|title=Re: Marking topics as "solved"|p=111333|onlyicon=yes}}
 
==== Subforum, topic and post ====
 
{{note|The {{param|f}} and {{param|t}} parameters are redundant in this URL.}}
 
{{obr}}forum link{{!}}f=8{{!}}t=10805{{!}}p=111333{{cbr}}
 
{{forum link|f=8|t=10805|p=111333}}
 
{{obr}}forum link{{!}}title=Re: Marking topics as "solved"{{!}}f=8{{!}}t=10805{{!}}p=111333{{cbr}}
 
{{forum link|title=Re: Marking topics as "solved"|f=8|t=10805|p=111333}}
 
{{obr}}forum link{{!}}text=Re: Marking topics as "solved"{{!}}f=8{{!}}t=10805{{!}}p=111333{{cbr}}
 
{{forum link|text=Re: Marking topics as "solved"|f=8|t=10805|p=111333}}
 
{{obr}}forum link{{!}}title=Re: Marking topics as "solved"{{!}}f=8{{!}}t=10805{{!}}p=111333{{!}}noicon=yes{{cbr}}
 
{{forum link|title=Re: Marking topics as "solved"|f=8|t=10805|p=111333|noicon=yes}}
 
{{obr}}forum link{{!}}title=Re: Marking topics as "solved"{{!}}f=8{{!}}t=10805{{!}}p=111333{{!}}onlyicon=yes{{cbr}}
 
{{forum link|title=Re: Marking topics as "solved"|f=8|t=10805|p=111333|onlyicon=yes}}
 
==== Topic and post ====
 
{{note|The {{param|t}} parameter is redundant in this URL.}}
 
{{obr}}forum link{{!}}t=10805{{!}}p=111333{{cbr}}
 
{{forum link|t=10805|p=111333}}
 
{{obr}}forum link{{!}}title=Re: Marking topics as "solved"{{!}}t=10805{{!}}p=111333{{cbr}}
 
{{forum link|title=Re: Marking topics as "solved"|t=10805|p=111333}}
 
{{obr}}forum link{{!}}text=Re: Marking topics as "solved"{{!}}t=10805{{!}}p=111333{{cbr}}
 
{{forum link|text=Re: Marking topics as "solved"|t=10805|p=111333}}


{{forumref|title=FlightGear Newsletter|t=7794}}
{{obr}}forum link{{!}}title=Re: Marking topics as "solved"{{!}}t=10805{{!}}p=111333{{!}}noicon=yes{{cbr}}
 
{{forum link|title=Re: Marking topics as "solved"|t=10805|p=111333|noicon=yes}}
 
{{obr}}forum link{{!}}title=Re: Marking topics as "solved"{{!}}t=10805{{!}}p=111333{{!}}onlyicon=yes{{cbr}}
 
{{forum link|title=Re: Marking topics as "solved"|t=10805|p=111333|onlyicon=yes}}
 
==== Anchoring ====
 
{{obr}}forum link{{!}}t=10805{{!}}anchor=p111333{{cbr}}
 
{{forum link|t=10805|anchor=p111333}}
 
{{obr}}forum link{{!}}title=Re: Marking topics as "solved"{{!}}t=10805{{!}}anchor=p111333{{cbr}}
 
{{forum link|title=Re: Marking topics as "solved"|t=10805|anchor=p111333}}
 
{{obr}}forum link{{!}}text=Re: Marking topics as "solved"{{!}}t=10805{{!}}anchor=p111333{{cbr}}
 
{{forum link|text=Re: Marking topics as "solved"|t=10805|anchor=p111333}}
 
{{obr}}forum link{{!}}title=Re: Marking topics as "solved"{{!}}t=10805{{!}}anchor=p111333{{!}}noicon=yes{{cbr}}
 
{{forum link|title=Re: Marking topics as "solved"|t=10805|anchor=p111333|noicon=yes}}
 
{{obr}}forum link{{!}}title=Re: Marking topics as "solved"{{!}}t=10805{{!}}anchor=p111333{{!}}onlyicon=yes{{cbr}}
 
{{forum link|title=Re: Marking topics as "solved"|t=10805|anchor=p111333|onlyicon=yes}}
 
==== Highlighting ====
 
{{obr}}forum link{{!}}t=10805{{!}}hilit=board+index{{cbr}}
 
{{forum link|t=10805|hilit=board+index}}
 
{{obr}}forum link{{!}}title=board index{{!}}t=10805{{!}}hilit=board+index{{cbr}}
 
{{forum link|title=board index|t=10805|hilit=board+index}}
 
{{obr}}forum link{{!}}text=board index{{!}}t=10805{{!}}hilit=board+index{{cbr}}
 
{{forum link|text=board index|t=10805|hilit=board+index}}
 
{{obr}}forum link{{!}}title=board index{{!}}t=10805{{!}}hilit=board+index{{!}}noicon=yes{{cbr}}
 
{{forum link|title=board index|t=10805|hilit=board+index|noicon=yes}}
 
{{obr}}forum link{{!}}title=board index{{!}}t=10805{{!}}hilit=board+index{{!}}onlyicon=yes{{cbr}}
 
{{forum link|title=board index|t=10805|hilit=board+index|onlyicon=yes}}
 
===== Highlight a post =====
 
{{obr}}forum link{{!}}title=Re: Marking topics as "solved"{{!}}p=111333{{!}}hilit=contains+a+problem{{cbr}}
 
{{forum link|title=Re: Marking topics as "solved"|p=111333|hilit=contains+a+problem}}
 
=== Member mode ===
 
==== Member listing ====
 
{{obr}}forum link{{!}}type=member{{cbr}}
 
{{forum link|type=member}}
 
{{obr}}forum link{{!}}title=Forum member listing{{!}}type=member{{cbr}}
 
{{forum link|title=Forum member listing|type=member}}
 
{{obr}}forum link{{!}}text=Forum member listing{{!}}type=member{{cbr}}
 
{{forum link|text=Forum member listing|type=member}}
 
{{obr}}forum link{{!}}title=Forum member listing{{!}}type=member{{!}}noicon=yes{{cbr}}
 
{{forum link|title=Forum member listing|type=member|noicon=yes}}
 
{{obr}}forum link{{!}}title=Forum member listing{{!}}type=member{{!}}onlyicon=yes{{cbr}}
 
{{forum link|title=Forum member listing|type=member|onlyicon=yes}}
 
==== Specific member ====
 
{{obr}}forum link{{!}}type=member{{!}}u=2{{cbr}}
 
{{forum link|type=member|u=2}}
 
{{obr}}forum link{{!}}title=curt{{!}}type=member{{!}}u=2{{cbr}}
 
{{forum link|title=curt|type=member|u=2}}
 
{{obr}}forum link{{!}}text=curt{{!}}type=member{{!}}u=2{{cbr}}
 
{{forum link|text=curt|type=member|u=2}}
 
{{obr}}forum link{{!}}title=curt{{!}}type=member{{!}}u=2{{!}}noicon=yes{{cbr}}
 
{{forum link|title=curt|type=member|u=2|noicon=yes}}
 
{{obr}}forum link{{!}}title=curt{{!}}type=member{{!}}u=2{{!}}onlyicon=yes{{cbr}}
 
{{forum link|title=curt|type=member|u=2|onlyicon=yes}}
 
=== Search mode ===
 
==== Search page ====
 
{{obr}}forum link{{!}}type=search{{cbr}}
 
{{forum link|type=search}}
 
{{obr}}forum link{{!}}title=Search page{{!}}type=search{{cbr}}
 
{{forum link|title=Search page|type=search}}
 
{{obr}}forum link{{!}}text=Search page{{!}}type=search{{cbr}}
 
{{forum link|text=Search page|type=search}}
 
{{obr}}forum link{{!}}title=Search page{{!}}type=search{{!}}noicon=yes{{cbr}}
 
{{forum link|title=Search page|type=search|noicon=yes}}
 
{{obr}}forum link{{!}}title=Search page{{!}}type=search{{!}}onlyicon=yes{{cbr}}
 
{{forum link|title=Search page|type=search|onlyicon=yes}}
 
==== Search everything ====
 
{{obr}}forum link{{!}}type=search{{!}}keywords=c172p+floats{{cbr}}
 
{{forum link|type=search|keywords=c172p+floats}}
 
{{obr}}forum link{{!}}title=Amphibious Cessna{{!}}type=search{{!}}keywords=c172p+floats{{cbr}}
 
{{forum link|title=Amphibious Cessna|type=search|keywords=c172p+floats}}
 
{{obr}}forum link{{!}}text=Amphibious Cessna{{!}}type=search{{!}}keywords=c172p+floats{{cbr}}
 
{{forum link|text=Amphibious Cessna|type=search|keywords=c172p+floats}}
 
{{obr}}forum link{{!}}title=Amphibious Cessna{{!}}type=search{{!}}keywords=c172p+floats{{!}}noicon=yes{{cbr}}
 
{{forum link|title=Amphibious Cessna|type=search|keywords=c172p+floats|noicon=yes}}
 
{{obr}}forum link{{!}}title=Amphibious Cessna{{!}}type=search{{!}}keywords=c172p+floats{{!}}onlyicon=yes{{cbr}}
 
{{forum link|title=Amphibious Cessna|type=search|keywords=c172p+floats|onlyicon=yes}}
 
==== Search a subforum ====
 
{{obr}}forum link{{!}}type=search{{!}}f=4{{!}}keywords=c172p+floats{{cbr}}
 
{{forum link|type=search|f=4|keywords=c172p+floats}}
 
{{obr}}forum link{{!}}title=Amphibious Cessna{{!}}type=search{{!}}f=4{{!}}keywords=c172p+floats{{cbr}}
 
{{forum link|title=Amphibious Cessna|type=search|f=4|keywords=c172p+floats}}
 
{{obr}}forum link{{!}}text=Amphibious Cessna{{!}}type=search{{!}}f=4{{!}}keywords=c172p+floats{{cbr}}
 
{{forum link|text=Amphibious Cessna|type=search|f=4|keywords=c172p+floats}}
 
{{obr}}forum link{{!}}title=Amphibious Cessna{{!}}type=search{{!}}f=4{{!}}keywords=c172p+floats{{!}}noicon=yes{{cbr}}
 
{{forum link|title=Amphibious Cessna|type=search|f=4|keywords=c172p+floats|noicon=yes}}
 
{{obr}}forum link{{!}}title=Amphibious Cessna{{!}}type=search{{!}}f=4{{!}}keywords=c172p+floats{{!}}onlyicon=yes{{cbr}}
 
{{forum link|title=Amphibious Cessna|type=search|f=4|keywords=c172p+floats|onlyicon=yes}}
 
==== Search a topic ====
 
{{obr}}forum link{{!}}type=search{{!}}t=25157{{!}}keywords=c172p+floats{{cbr}}
 
{{forum link|type=search|t=25157|keywords=c172p+floats}}
 
{{obr}}forum link{{!}}title=Amphibious Cessna{{!}}type=search{{!}}t=25157{{!}}keywords=c172p+floats{{cbr}}
 
{{forum link|title=Amphibious Cessna|type=search|t=25157|keywords=c172p+floats}}
 
{{obr}}forum link{{!}}text=Amphibious Cessna{{!}}type=search{{!}}t=25157{{!}}keywords=c172p+floats{{cbr}}
 
{{forum link|text=Amphibious Cessna|type=search|t=25157|keywords=c172p+floats}}
 
{{obr}}forum link{{!}}title=Amphibious Cessna{{!}}type=search{{!}}t=25157{{!}}keywords=c172p+floats{{!}}noicon=yes{{cbr}}
 
{{forum link|title=Amphibious Cessna|type=search|t=25157|keywords=c172p+floats|noicon=yes}}
 
{{obr}}forum link{{!}}title=Amphibious Cessna{{!}}type=search{{!}}t=25157{{!}}keywords=c172p+floats{{!}}onlyicon=yes{{cbr}}
 
{{forum link|title=Amphibious Cessna|type=search|t=25157|keywords=c172p+floats|onlyicon=yes}}
 
=== Different icon sizes ===
 
==== Text and icon ====
 
{{obr}}forum link{{!}}title=Re: Marking topics as "solved"{{!}}p=111333{{!}}size=15px{{cbr}}
 
{{forum link|title=Re: Marking topics as "solved"|p=111333|size=15px}}
 
{{obr}}forum link{{!}}title=Re: Marking topics as "solved"{{!}}p=111333{{!}}size=32px{{cbr}}
 
{{forum link|title=Re: Marking topics as "solved"|p=111333|size=32px}}
 
{{obr}}forum link{{!}}title=Re: Marking topics as "solved"{{!}}p=111333{{!}}size=64px{{cbr}}
 
{{forum link|title=Re: Marking topics as "solved"|p=111333|size=64px}}
 
{{obr}}forum link{{!}}title=Re: Marking topics as "solved"{{!}}p=111333{{!}}size=200px{{cbr}}
 
{{forum link|title=Re: Marking topics as "solved"|p=111333|size=200px}}
 
==== Icon only ====
 
{{obr}}forum link{{!}}title=Re: Marking topics as "solved"{{!}}p=111333{{!}}onlyicon=yes{{!}}size=15px{{cbr}}
 
{{forum link|title=Re: Marking topics as "solved"|p=111333|onlyicon=yes|size=15px}}
 
{{obr}}forum link{{!}}title=Re: Marking topics as "solved"{{!}}p=111333{{!}}onlyicon=yes{{!}}size=32px{{cbr}}
 
{{forum link|title=Re: Marking topics as "solved"|p=111333|onlyicon=yes|size=32px}}
 
{{obr}}forum link{{!}}title=Re: Marking topics as "solved"{{!}}p=111333{{!}}onlyicon=yes{{!}}size=64px{{cbr}}
 
{{forum link|title=Re: Marking topics as "solved"|p=111333|onlyicon=yes|size=64px}}
 
{{obr}}forum link{{!}}title=Re: Marking topics as "solved"{{!}}p=111333{{!}}onlyicon=yes{{!}}size=200px{{cbr}}
 
{{forum link|title=Re: Marking topics as "solved"|p=111333|onlyicon=yes|size=200px}}
 
== Related templates ==


== Related template ==
* {{tl|forum}}
* {{tl|forum}}
* {{tl|project infrastructure}}
* {{tl|forum url}}
}}
}}


[[Category:Link templates]]
<templatedata>
</noinclude>
{
"params": {
"onlyicon": {
"description": "If true, only the little FlightGear icon will be shown.",
"type": "boolean"
},
"size": {
"label": "Icon size",
"description": "This should be a valid MediaWiki image size value, e.g. 32px.",
"type": "unknown"
},
"title": {
"label": "Topic title",
"description": "This will be italicised and used to build the link text.",
"type": "string"
},
"text": {
"label": "Link text",
"description": "This is an alternative to the title parameter and, if supplied, will be used for the link text.",
"type": "string"
},
"type": {
"label": "Type",
"description": "The forum interface type.",
"type": "string",
"suggestedvalues": [
"view",
"member",
"search"
],
"default": "view"
},
"p": {
"label": "Post id",
"description": "Used with the type value of view.",
"type": "number"
},
"t": {
"label": "Topic id",
"description": "Used with the type values of view and search.",
"type": "number"
},
"u": {
"label": "User id",
"description": "Used with the type value of member.",
"type": "number"
},
"keywords": {
"label": "Keywords",
"description": "The keywords to perform a forum search with (optional). Words should be separated by the plus character \"+\". Used with the type value of search.",
"type": "string"
},
"f": {
"label": "Forum id",
"description": "Used with the type values of view and search.",
"type": "number"
},
"anchor": {
"label": "Anchor",
"description": "Used for jumping to posts (optional). Used with the type value of view."
},
"hilit": {
"description": "Words on the forum posts to be highlighted (optional). Words should be separated by the plus character \"+\". Used with the type value of view."
},
"noicon": {
"description": "If true, the little FlightGear icon will not be shown.",
"type": "boolean"
}
},
"description": "This template is used to create MediaWiki links - either via text or the icon - to subforums, topics and posts on the FlightGear forum.",
"paramOrder": [
"title",
"text",
"type",
"f",
"t",
"p",
"u",
"anchor",
"hilit",
"keywords",
"noicon",
"onlyicon",
"size"
]
}
</templatedata>
 
[[Category:Link templates]]</noinclude>

Latest revision as of 08:20, 23 February 2024

[1] 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 MediaWiki links - either via text or the icon - to subforums, topics and posts on the FlightGear forum.

Usage

{{forum link
| title    =
| text     =
| type     =
| f        =
| t        =
| p        =
| anchor   =
| hilit    =
| u        =
| keywords =
| 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.
type
The forum interface type that can be one of:
view
The default value. This is used for URLs to posts, topics, and posts, via phpBB's viewforum.php or viewtopic.php.
member
For URLs of a user on the forum, via phpBB's memberlist.php. This value will cause the f, t, p, anchor, and hilit parameters to be ignored.
search
For URLs performing forum searches, via phpBB's search.php. This value will cause the p, anchor, and hilit parameters to be ignored.
f
Forum number (optional). Used with the type values of view and search.
t
Topic number (optional). Used with the type values of view and search.
p
Post number (optional). Used with the type value of view.
anchor
HTML anchor, used for jumping to posts (optional). Used with the type value of view.
hilit
Words on the forum posts to be highlighted (optional). Words should be separated by the plus character "+". Used with the type value of view.
u
User number (optional). Used with the type value of member.
keywords
The keywords to perform a forum search with (optional). Words should be separated by the plus character "+". Used with the type value of search.
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.
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}}

[2] This is a link to the FlightGear forum.

View mode

A subforum (The FlightGear project)

{{forum link|f=42}}

[3] This is a link to the FlightGear forum.

{{forum link|title=The FlightGear project|f=42}}

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

{{forum link|text=The FlightGear project|f=42}}

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

{{forum link|title=The FlightGear project|f=42|noicon=yes}}

The FlightGear project subforum

{{forum link|title=The FlightGear project|f=42|onlyicon=yes}}

'The FlightGear project' subforum of the FlightGear forum.

A topic (FlightGear Newsletter)

{{forum link|t=7794}}

[4] This is a link to the FlightGear forum.

{{forum link|title=FlightGear Newsletter|t=7794}}

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

{{forum link|text=FlightGear Newsletter|t=7794}}

FlightGear Newsletter This is a link to the FlightGear forum.

{{forum link|title=FlightGear Newsletter|t=7794|noicon=yes}}

FlightGear Newsletter topic on the forum

{{forum link|title=FlightGear Newsletter|t=7794|onlyicon=yes}}

'FlightGear Newsletter' topic on the FlightGear forum.

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

{{forum link|p=111333}}

[5] This is a link to the FlightGear forum.

{{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.

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

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

{{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}}

'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.
{{forum link|f=8|t=10805|p=111333}}

[6] This is a link to the FlightGear forum.

{{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.

{{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.

{{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}}

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

Topic and post

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

[7] This is a link to the FlightGear forum.

{{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.

{{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.

{{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}}

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

Anchoring

{{forum link|t=10805|anchor=p111333}}

[8] This is a link to the FlightGear forum.

{{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.

{{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.

{{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}}

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

Highlighting

{{forum link|t=10805|hilit=board+index}}

[9] This is a link to the FlightGear forum.

{{forum link|title=board index|t=10805|hilit=board+index}}

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

{{forum link|text=board index|t=10805|hilit=board+index}}

board index This is a link to the FlightGear forum.

{{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}}

'board index' topic on the FlightGear forum.

Highlight a post
{{forum link|title=Re: Marking topics as "solved"|p=111333|hilit=contains+a+problem}}

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

Member mode

Member listing

{{forum link|type=member}}

[10] This is a link to the FlightGear forum.

{{forum link|title=Forum member listing|type=member}}

the forum member listing This is a link to the FlightGear forum.

{{forum link|text=Forum member listing|type=member}}

Forum member listing This is a link to the FlightGear forum.

{{forum link|title=Forum member listing|type=member|noicon=yes}}

the forum member listing

{{forum link|title=Forum member listing|type=member|onlyicon=yes}}

The FlightGear forum listing.

Specific member

{{forum link|type=member|u=2}}

[11] This is a link to the FlightGear forum.

{{forum link|title=curt|type=member|u=2}}

the forum user curt This is a link to the FlightGear forum.

{{forum link|text=curt|type=member|u=2}}

curt This is a link to the FlightGear forum.

{{forum link|title=curt|type=member|u=2|noicon=yes}}

the forum user curt

{{forum link|title=curt|type=member|u=2|onlyicon=yes}}

The FlightGear forum user 'curt'.

Search mode

Search page

{{forum link|type=search}}

[12] This is a link to the FlightGear forum.

{{forum link|title=Search page|type=search}}

FlightGear forum search page This is a link to the FlightGear forum.

{{forum link|text=Search page|type=search}}

Search page This is a link to the FlightGear forum.

{{forum link|title=Search page|type=search|noicon=yes}}

FlightGear forum search page

{{forum link|title=Search page|type=search|onlyicon=yes}}

FlightGear forum search page.

Search everything

{{forum link|type=search|keywords=c172p+floats}}

[13] This is a link to the FlightGear forum.

{{forum link|title=Amphibious Cessna|type=search|keywords=c172p+floats}}

FlightGear forum search for 'c172p+floats' This is a link to the FlightGear forum.

{{forum link|text=Amphibious Cessna|type=search|keywords=c172p+floats}}

Amphibious Cessna This is a link to the FlightGear forum.

{{forum link|title=Amphibious Cessna|type=search|keywords=c172p+floats|noicon=yes}}

FlightGear forum search for 'c172p+floats'

{{forum link|title=Amphibious Cessna|type=search|keywords=c172p+floats|onlyicon=yes}}

FlightGear forum search for 'c172p+floats'.

Search a subforum

{{forum link|type=search|f=4|keywords=c172p+floats}}

[14] This is a link to the FlightGear forum.

{{forum link|title=Amphibious Cessna|type=search|f=4|keywords=c172p+floats}}

FlightGear subforum search for 'c172p+floats' This is a link to the FlightGear forum.

{{forum link|text=Amphibious Cessna|type=search|f=4|keywords=c172p+floats}}

Amphibious Cessna This is a link to the FlightGear forum.

{{forum link|title=Amphibious Cessna|type=search|f=4|keywords=c172p+floats|noicon=yes}}

FlightGear subforum search for 'c172p+floats'

{{forum link|title=Amphibious Cessna|type=search|f=4|keywords=c172p+floats|onlyicon=yes}}

link=https://forum.flightgear.org/search.php?keywords=c172p+floats&fid[]=4

Search a topic

{{forum link|type=search|t=25157|keywords=c172p+floats}}

[15] This is a link to the FlightGear forum.

{{forum link|title=Amphibious Cessna|type=search|t=25157|keywords=c172p+floats}}

FlightGear topic search for 'c172p+floats' This is a link to the FlightGear forum.

{{forum link|text=Amphibious Cessna|type=search|t=25157|keywords=c172p+floats}}

Amphibious Cessna This is a link to the FlightGear forum.

{{forum link|title=Amphibious Cessna|type=search|t=25157|keywords=c172p+floats|noicon=yes}}

FlightGear topic search for 'c172p+floats'

{{forum link|title=Amphibious Cessna|type=search|t=25157|keywords=c172p+floats|onlyicon=yes}}

FlightGear topic search for 'c172p+floats'.

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 This is a link to the FlightGear forum.

{{forum link|title=Re: Marking topics as "solved"|p=111333|size=32px}}

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

{{forum link|title=Re: Marking topics as "solved"|p=111333|size=64px}}

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

{{forum link|title=Re: Marking topics as "solved"|p=111333|size=200px}}

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

Icon only

{{forum link|title=Re: Marking topics as "solved"|p=111333|onlyicon=yes|size=15px}}

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

{{forum link|title=Re: Marking topics as "solved"|p=111333|onlyicon=yes|size=32px}}

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

{{forum link|title=Re: Marking topics as "solved"|p=111333|onlyicon=yes|size=64px}}

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

{{forum link|title=Re: Marking topics as "solved"|p=111333|onlyicon=yes|size=200px}}

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

Related templates


This template is used to create MediaWiki links - either via text or the icon - to subforums, topics and posts on the FlightGear forum.

Template parameters

ParameterDescriptionTypeStatus
Topic titletitle

This will be italicised and used to build the link text.

Stringoptional
Link texttext

This is an alternative to the title parameter and, if supplied, will be used for the link text.

Stringoptional
Typetype

The forum interface type.

Suggested values
view member search
Default
view
Stringoptional
Forum idf

Used with the type values of view and search.

Numberoptional
Topic idt

Used with the type values of view and search.

Numberoptional
Post idp

Used with the type value of view.

Numberoptional
User idu

Used with the type value of member.

Numberoptional
Anchoranchor

Used for jumping to posts (optional). Used with the type value of view.

Unknownoptional
hilithilit

Words on the forum posts to be highlighted (optional). Words should be separated by the plus character "+". Used with the type value of view.

Unknownoptional
Keywordskeywords

The keywords to perform a forum search with (optional). Words should be separated by the plus character "+". Used with the type value of search.

Stringoptional
noiconnoicon

If true, the little FlightGear icon will not be shown.

Booleanoptional
onlyicononlyicon

If true, only the little FlightGear icon will be shown.

Booleanoptional
Icon sizesize

This should be a valid MediaWiki image size value, e.g. 32px.

Unknownoptional