Module:Request for permission links/doc: Difference between revisions
SilverLocust (talk | contribs) m fix duplicate |
SilverLocust (talk | contribs) instructions |
||
Line 1: | Line 1: | ||
This module implements {{tl|Request for permission links}}. Please see the template page for documentation. |
This module implements {{tl|Request for permission links}}. Please see the template page for documentation. |
||
=== Adding new links === |
|||
To add a new link, find an empty line in the section between lines 38 and 92 and add either a link <syntaxhighlight lang="Lua" inline>l[#l+1] = '[URL external link]'</syntaxhighlight> or a wikilink <syntaxhighlight lang="Lua" inline>l[#l+1] = '[[Page|wikilink]]'</syntaxhighlight>. However, replace any instance of a username in the link with <syntaxhighlight lang="Lua" inline>'..userURL..'</syntaxhighlight> (for a URL/external link) or |
|||
<syntaxhighlight lang="Lua" inline>'..username..'</syntaxhighlight> (for a wikilink). |
|||
Each new <code>l</code> (link string) will automatically have a spaced [[middot]] between it and the previous link. To skip the spaced dot, add a line before the new link with <syntaxhighlight lang="Lua" inline>before('')</syntaxhighlight>. See the existing links in the module for examples. |
|||
For a permission-specific, wrap the link(s) with a condition, such as: |
|||
<syntaxhighlight lang="Lua">if permission == 'New page reviewer' then |
|||
l[#l+1] = |
|||
end</syntaxhighlight> |
|||
=== Differences since the template was changed to use this module === |
|||
The functional difference since converting to a module is primarily that this checks each permission subpage to see if there are multiple requests. If multiple, it adds a parenthetical such as (<small>requesting [[Wikipedia:Requests for permissions/AutoWikiBrowser#User:Example|AutoWikiBrowser]], [[Wikipedia:Requests for permissions/Pending changes reviewer#User:Example|Pending changes reviewer]]</small>) after the userpage link. |
The functional difference since converting to a module is primarily that this checks each permission subpage to see if there are multiple requests. If multiple, it adds a parenthetical such as (<small>requesting [[Wikipedia:Requests for permissions/AutoWikiBrowser#User:Example|AutoWikiBrowser]], [[Wikipedia:Requests for permissions/Pending changes reviewer#User:Example|Pending changes reviewer]]</small>) after the userpage link. |
||
If there is only one request found, then the parenthetical appears on the main [[Wikipedia:Requests for permissions]] page but not on the subpage where the request appears. Additionally, in this case the links specific to that permission are also shown on the main page. Previously, these links only appeared when viewing the subpage for that permission. |
If there is only one request found, then the parenthetical appears on the main [[Wikipedia:Requests for permissions]] page but not on the subpage where the request appears. Additionally, in this case the links specific to that permission are also shown on the main page. Previously, these links only appeared when viewing the subpage for that permission. |
||
=== Notify links === |
|||
The following do not currently have "notify" links: {{tls|AutoWikiBrowser granted}}, {{tls|Confirmed granted}}, {{tls|Extended confirmed granted}}. |
The following do not currently have "notify" links: {{tls|AutoWikiBrowser granted}}, {{tls|Confirmed granted}}, {{tls|Extended confirmed granted}}. |
||
Revision as of 11:19, 24 May 2024
This module implements {{Request for permission links}}. Please see the template page for documentation.
Adding new links
To add a new link, find an empty line in the section between lines 38 and 92 and add either a link l[#l+1] = '[URL external link]'
or a wikilink l[#l+1] = '[[Page|wikilink]]'
. However, replace any instance of a username in the link with '..userURL..'
(for a URL/external link) or
'..username..'
(for a wikilink).
Each new l
(link string) will automatically have a spaced middot between it and the previous link. To skip the spaced dot, add a line before the new link with before('')
. See the existing links in the module for examples.
For a permission-specific, wrap the link(s) with a condition, such as:
if permission == 'New page reviewer' then
l[#l+1] =
end
Differences since the template was changed to use this module
The functional difference since converting to a module is primarily that this checks each permission subpage to see if there are multiple requests. If multiple, it adds a parenthetical such as (requesting AutoWikiBrowser, Pending changes reviewer) after the userpage link.
If there is only one request found, then the parenthetical appears on the main Wikipedia:Requests for permissions page but not on the subpage where the request appears. Additionally, in this case the links specific to that permission are also shown on the main page. Previously, these links only appeared when viewing the subpage for that permission.
Notify links
The following do not currently have "notify" links: {{subst:AutoWikiBrowser granted}}, {{subst:Confirmed granted}}, {{subst:Extended confirmed granted}}.