Template:Forumlink/doc: Difference between revisions

From NPOWiki
Jump to navigation Jump to search
update, should add more examples, maybe later...
No edit summary
 
Line 45: Line 45:


Other than when "post" is used and requires a topic, parameters for specific pages will take precedence in the order listed above.
Other than when "post" is used and requires a topic, parameters for specific pages will take precedence in the order listed above.
Due to technical limitations, brackets <code>[]</code> cannot be used in display text in links. They can be replaced with parentheses <code>()</code>.


==Examples==
==Examples==

Latest revision as of 14:05, 10 November 2025

This page contains the documentation for Template:Forumlink. It includes information about the template, such as usage and categories, and is not displayed when using the template itself.

This template is used to link to any forum on a website, or a specific page in it. Commonly used sites are available as shortcuts; other sites can specify the software used to automate the correct link.

This template makes use of Lua code at Module:Forumlink. Please use the template rather than invoking the module directly.

Available parameters

  • first unnamed parameter: either the name of a shortcut (see below) or the website's host name and domain (e.g. npowned.net or forums.example.com). If not using a shortcut, must also use type.
  • second unnamed parameter: the text to display for the link. This will intelligently default to text based on what is linked to. See also parameter title.
  • Content-specific parameters:
    • topic: used to link to a specific topic on the forum.
    • post: used to link to a specific post in a topic. On most forums, this will also require the topic to be specified. (See below for details; the template will warn you if it needs the topic.)
    • profile: used to link to a forum member's profile.
    • forum: used to link to a particular subforum.
    • news: used to link to a news post (only available on some sites).
    • announcement: used to link to a forum announcement (only available on some sites).
  • type: used to specify the forum software so the template can generate the correct link. Omit this if using a shortcut.
  • title: if the default generated text is desired, but the parsed title is not correct (e.g. capitalization, removed punctuation characters, etc.), use this parameter to specify the title to use.
  • forumname: if not using a shortcut, and further not using custom display text (second unnamed parameter), this parameter can be used to change the forum portion of the default display text instead of showing the forum's URL domain.
  • http: if the site is available on http only (not https), define this parameter (e.g. |http=x).
  • numbered: define this parameter to format the link as a default numbered link (no link text).

Shortcuts

The following shortcuts are currently available. More can be added as needed. They are not case sensitive, but should be uppercase for propriety.

Games:

Communities:

Types

The following forum types are currently supported. More can be added as needed. They are not case sensitive.

  • Invision - Invision Community. Note: on these forums the page ID and slug (hyphenated phrase) are both required. The slug will be used to generate the default link text.
  • MyBB - current(?) MyBB with shorter URLs that all end in .html.
  • MyBBold - an older version of MyBB with longer .php and query-based URLs.
  • phpBB - good ol' phpBB. Note: to link to a topic, you do not need to include the f=### part of the URL. Also, you can use |post= on its own, without a topic. (At least on the version used on the NS forums.)

Notes

If no named parameter is specified, the template will link to the forum index (homepage).

Other than when "post" is used and requires a topic, parameters for specific pages will take precedence in the order listed above.

Due to technical limitations, brackets [] cannot be used in display text in links. They can be replaced with parentheses ().

Examples