Template:User/doc
This is a documentation subpage for Template:User. It contains usage information, categories and other content or metadata that is not part of the original template. |
Inserts links to an OpenStreetMap.org user's profile, traces, edits (after the user page on this wiki if that OSM user has one here).
Usage
- {{User|Preferred displayed name|wiki= [Wiki user name] |osm= [OSM user name] |m= [1/n/b] |f= [1] |noedits= [1] }}
The first parameter is mandatory. It is usually an OSM registered user name (used for edits, notes, etc.). It may also be used as the user name on the OSM wiki.
Note that this template assumes the user name is the same for both OSM.org and the OSM wiki:
- If a OSM user does not have an account on this wiki, you can specify
wiki=
explicitly (and no link will be generated to a user page on this wiki). - If a OSM user uses an account named differently on this wiki, you can specify
wiki=Wiki user name
explicitly to generate a link to his correct user page on this wiki). - Otherwise the OSM user name given in the first parameter will be used to generate a link to his identically named user page on this wiki.
You may also set the first parameter for specifying the username used on this wiki, and specify the alternate user name of OSM in the "osm=" parameter:
- If the
osm=
parameter is set to an empty value, there will be no links to any OSM account and its edit histories. The first parameter is only used for the wiki user name.
There are various reasons why the account names don't match between this wiki, and the OSM website/database, notably because user names don't have exactly the same requirements, and because the first letter of a user name is not case-sensiteon this wiki, but is case sensive on the OSM website and database. Some characters are also accepted in user names on one site but not another (this wiki does not allow "/" and does not differentiate a space with underscores, but still allows "%" and "+" in user names). Another reason is that OSM edits may require you use a separate account for mechanical edits, when this wiki may have only one user page for both OSM accounts. Also there are contributors on this wiki that do not contribute on OSM directly: the two projects are in fact separate, allowing distinct identities.
In all cases the first mandatory parameter will be the preferred name actually displayed, independantly of the account names used to logon or find users:
- on the wiki (changed by parameter
wiki=
), or - on the OSM database for submitting data or notes (changed by parameter
osm=
),
and both effective account names take their default value from this first parameter.
- Important:
- Don't attempt to URL-encode any user names (notably those containing spaces or non-ASCII characters), just use the normal, readable user names, with standard spaces and standard UTF-8 encoding (as used for normal text on this wiki): the effective encoding depends on the kind of targets for URLs or wikilinks, and where the user names are used in URLs (in the "/resource/path" or in a "?query" string, or in an "#anchor").
- Unlike wiki account names, OSM account names are fully case-sensitive, and make a distinction between space, underscore, plus, or %20.
- This template will determine the appropriate encoding for each generated URL on rendered links, depending on what each target site expects.
Optional parameters
wiki=
with an empty value will remove the link for users without account on this wiki, keeping only the link to user's page on OSM. If set to a non-empty value, it sets the actual title of the user's page in this wiki.osm=
with an empty value will remove the link for users without account on OSM, keeping only the link to user's page on this wiki. If set to a non-empty value, it sets the actual title of the user's page on OSM.noedits=1
will still show links to user's page on this wiki (unless it is removed bywiki=
set to an empty value) and on OSM (unless it is removed byosm=
set to an empty value), but will will remove links to their edits and history on OSM (ifosm=
is not set to an empty value).f=1
changes the default icon (which may be interpreted as a male user) to a more appropriate icon for a female user. Note in absence of this parameter, and if the user has an account on this wiki, the appropriate gender may be determined automatically from the local user's preferences on this wiki (but many users don't define it and this setting remains "neutral"). Normally this parameter is not needed if the user has an account on this wiki (i.e. the parameterwiki=
is not set to an empty value), where their gender is set in their preference.m=1
changes the default icon to a more appropriate icon for a male user. This is especially useful for users without any account on this wiki (wiki=
set to an empty value), whose default icon displayed is gender-neutral. Normally this parameter is not needed if the user has an account on this wiki (i.e. the parameterwiki=
is not set to an empty value), where their gender is set in their preference. This parameter should not be used simulatenously withf=1
(which will silently take precedence, i.e. will render a icon for a female user).
Examples
You type | You get |
---|---|
1. Examples for users with an account on wiki and on OSM (with additional external tools): | |
{{User|Harry Wood}} |
Harry Wood (on osm, edits, contrib, heatmap, chngset com.) |
{{User|phobie}} |
phobie (on osm, edits, contrib, heatmap, chngset com.) |
Some users have distinct account names on wiki and on OSM, you can select the prefered one to show first: | |
{{User|Sean de Basti|osm=Seandebasti}} |
Sean de Basti (Seandebasti on osm, edits, contrib, heatmap, chngset com.) |
{{User|Seandebasti|wiki=Sean de Basti}} |
Seandebasti (on osm, edits, contrib, heatmap, chngset com.) |
You may override the default gender specified on their wiki account or suppress it: | |
{{User|phobie|f=1}} |
phobie (on osm, edits, contrib, heatmap, chngset com.) |
{{User|phobie|m=1}} |
phobie (on osm, edits, contrib, heatmap, chngset com.) |
{{User|phobie|m=n}} |
phobie (on osm, edits, contrib, heatmap, chngset com.) |
2. Examples for users with an account on OSM only (with additional external tools): | |
{{User|Seandebasti|wiki=}} |
Seandebasti (on osm, edits, contrib, heatmap, chngset com.) |
{{User|Harry Wood|wiki=}} |
Harry Wood (on osm, edits, contrib, heatmap, chngset com.) |
{{User|phobie|wiki=}} |
phobie (on osm, edits, contrib, heatmap, chngset com.) |
You will probably want to override the default neutral gender as it's unspecified, or suppress it: | |
{{User|Seandebasti|wiki=|m=1}} |
Seandebasti (on osm, edits, contrib, heatmap, chngset com.) |
{{User|Harry Wood|wiki=|m=1}} |
Harry Wood (on osm, edits, contrib, heatmap, chngset com.) |
{{User|phobie|wiki=|f=1}} |
phobie (on osm, edits, contrib, heatmap, chngset com.) |
{{User|phobie|wiki=|m=1}} |
phobie (on osm, edits, contrib, heatmap, chngset com.) |
{{User|phobie|wiki=|m=n}} |
phobie (on osm, edits, contrib, heatmap, chngset com.) |
{{User|Wall·E|wiki=|m=b}} |
Wall·E (on osm, edits, contrib, heatmap, chngset com.) |
3. Examples for users with an account on wiki and on OSM (reduced version): | |
{{User|Sean de Basti|osm=Seandebasti|noedits=1}} |
Sean de Basti (Seandebasti on osm) |
{{User|Seandebasti|wiki=Sean de Basti|noedits=1}} |
Seandebasti (on osm) |
{{User|Sean de Basti|noedits=1}} |
Sean de Basti (on osm) |
{{User|Harry Wood|noedits=1}} |
Harry Wood (on osm) |
{{User|phobie|noedits=1}} |
phobie (on osm) |
You may also override the default gender specified on their wiki account or suppress it: | |
{{User|phobie|noedits=1|f=1}} |
phobie (on osm) |
{{User|phobie|noedits=1|m=1}} |
phobie (on osm) |
{{User|phobie|noedits=1|m=n}} |
phobie (on osm) |
4. Examples for users with an account on OSM only (reduced version): | |
{{User|Sean de Basti|osm=Seandebasti|wiki=|noedits=1}} |
Sean de Basti (on osm) |
{{User|Seandebasti|wiki=|noedits=1}} |
Seandebasti (on osm) |
{{User|Harry Wood|wiki=|noedits=1}} |
Harry Wood (on osm) |
{{User|phobie|wiki=|noedits=1}} |
phobie (on osm) |
You will probably want to override the default neutral gender as it's unspecified, or suppress it: | |
{{User|phobie|wiki=|noedits=1|f=1}} |
phobie (on osm) |
{{User|phobie|wiki=|noedits=1|m=1}} |
phobie (on osm) |
{{User|phobie|wiki=|noedits=1|m=n}} |
phobie |
{{User|Wall·E|wiki=|noedits=1|m=b}} |
Wall·E (on osm) |
5. Examples for users with an account on wiki only (no external tools): | |
{{User|Sean de Basti|osm=}} |
Sean de Basti |
{{User|Harry Wood|osm=}} |
Harry Wood |
Lettercase does not matter for the initial on wiki, choose which one you prefer to display | |
{{User|phobie|osm=}} |
phobie |
{{User|Phobie|osm=}} |
Phobie |
You can still override the prefered name to display: | |
{{User|(Mrs) Phobie|wiki=Phobie|osm=}} |
(Mrs) Phobie |
You can also override the default gender specified on their wiki account or suppress it: | |
{{User|phobie|osm=|f=1}} |
phobie |
{{User|phobie|osm=|m=1}} |
phobie |
{{User|phobie|osm=|m=n}} |
phobie |
See also
- {{OSM user}} - a simple link to the user's page on OSM (not the OSM wiki), without traces and edits.
- {{U}} - a plain link to a wiki user's page.
Inserts links to an OpenStreetMap.org user's profile, traces, edits (after the user page on this wiki if that OSM user has one here).
Parameter | Description | Type | Status | |
---|---|---|---|---|
Preferred display name | 1 | Usually an OSM registered user name (used for edits, notes, etc.) but may also be used as the user name on the OSM wiki.
| Line | required |
Wiki user name | wiki | An empty value will remove the link for users without account on this wiki, keeping only the link to user's page on OSM. A non-empty value sets the actual title of the user's page in this wiki. | User | optional |
OSM user name | osm | An empty value will remove the link for users without account on OSM, keeping only the link to user's page on this wiki. A non-empty value sets the actual title of the user's page on OSM. | Line | optional |
Male | m | Changes the default icon to a more appropriate icon for a male user. Especially useful for users without any account on this wiki. | Boolean | optional |
Female | f | Changes the default icon (which may be interpreted as a male user) to a more appropriate icon for a female user. In the absence of this parameter, and if the user has an account on this wiki, the appropriate gender may be determined automatically from the local user's preferences on this wiki (but many users don't define it and this setting remains "neutral"). Normally this parameter is not needed if the user has an account on this wiki (i.e. the parameter wiki= is not set to an empty value), where their gender is set in their preference. | Boolean | optional |
Hide OSM edit links | noedits | Disabling this option still links to user's page on this wiki (unless it is removed by wiki= set to an empty value) and on OSM (unless it is removed by osm= set to an empty value), but will remove links to their edits and history on OSM (if osm= is not set to an empty value). | Boolean | optional |