Jump to content

Template:Target/doc

From Meta, a Wikimedia project coordination wiki
Usage

For use with Global message delivery/Targets, mostly.

The template wraps around the MassMessage parserfunction {{#target: page | site }} for MediaWiki, documented on mw:Help:Extension:MassMessage.

Examples
  • With the user parameter:
    • {{target |user = Nemo bis|site = it.wikiquote.org}} (targets the default user's talk page) gives:
      User talk:Nemo bis it.wikiquote.org
    • {{target |user = Nemo bis/newsfeed|site = meta.wikimedia.org}} (targets a specific subpage of the user's talk page) gives:
      User talk:Nemo bis/newsfeed meta.wikimedia.org
  • With the page parameter:
    • {{target |page = User:Nemo bis/newsfeed|site = meta.wikimedia.org}} (targets a specific subpage in user's pages) gives:
      User:Nemo bis/newsfeed meta.wikimedia.org
    • {{target |page = Wikiversidad:Claustro Wikiversitario|site = es.wikiversity.org}} (targets a project news page on a localized project wiki) gives:
      Wikiversidad:Claustro Wikiversitario es.wikiversity.org
    • {{target |page = Wikisource:Scriptorium|site = wikisource.org}} (targets a project news page on an global project wiki) gives:
      Wikisource:Scriptorium wikisource.org
    • {{target |page = Commons:Signpost|site = commons.wikimedia.org}} }} (targets a project news page on an global community wiki) gives:
      Commons:Signpost wikisource.org
    • {{target |page = Wikimedia:Ágora|site = br.wikimedia.org}} (targets a project news page on a local community wiki) gives:
      Wikimedia:Ágora br.wikimedia.org
Errors
  • Incorrect combinations of parameters:
    • {{target |user = Nemo bis|page = User:Nemo bis|site = it.wikiquote.org}} (page ignored) gives:
      User talk:Nemo bis it.wikiquote.org
    • {{target |site = meta.wikimedia.org}} (missing user or page) gives:
      "{{{page}}}" is not a valid page title. meta.wikimedia.org
    • {{target |user = User name}} (missing site) gives:
      "{{{site}}}" is not a valid site. (unknown domain) {{{site}}}
    • {{target |page = Page name}} (missing site) gives:
      "{{{site}}}" is not a valid site. (unknown domain) {{{site}}}
  • Invalid site specified:
    • {{target |page = User name|site = xxx.wikimedia.org}} (an icon is displayed, but the project subdomain does not exist) gives:
      "xxx.wikimedia.org" is not a valid site. xxx.wikimedia.org
    • {{target |page = User name|site = xxx.wikipedia.org}} (an icon is displayed, but the language subdomain does not exist) gives:
      "xxx.wikipedia.org" is not a valid site. xxx.wikipedia.org
    • {{target |page = User name|site = wikipedia.org}} (no icon displayed, a required language subdomain is missing) gives:
      "wikipedia.org" is not a valid site. (unknown domain) wikipedia.org
    • {{target |page = User name|site = wikipedia}} (no icon displayed, unknown site or not a fully qualified domain name) gives:
      "wikipedia" is not a valid site. (unknown domain) wikipedia
Template data

For use with [[Global message delivery/Targets]], mostly.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
useruser

A user name on the target wiki, without any namespace (targets the default user's talk page on that wiki). This parameter must be removed if you want to use the alternate page parameter (you must set only one of these two parameters). Don't URL-encode its value and don't insert any wiki tag or HTML tag, but be careful about its exact letter case.

Example
Username
Usersuggested
pagepage

An alternate full page name on the target wiki (with its leading namespace and colon, or slash and subpage name if needed). Use it instead of the user parameter if you don't target the default talk page of a user but a subpage, or another community page; this parameter is not used if you set the user parameter (you must set only one of these two parameters). Don't URL-encode its value and don't insert any wiki tag or HTML tag, but be careful about its exact letter case.

Example
Project:Pagename/newsfeed
Page nameoptional
sitesite

The fully qualified domain name of the target wiki site. This can only contain letters (letter case is ignored), possibly digits and hyphens, and dots separators between domain labels. Its value is checked against known domain names to render a distinctive icon for the main wiki project. If the domain name is not set is unknown, a warning will be displayed without a leading icon.

Example
en.wikipedia.org
Stringrequired