| Vorlagenprogrammierung | Diskussionen | Lua | Test | Unterseiten | |||
| Modul | Deutsch | English | Modul: | Dokumentation | |||
Pinging – Module with functions for any kind of user lists, especially for echo pings.
All functions expect the parameter list from the template transclusion which will embed them. #invoke has no parameters, if not explicitly mentioned. Anything is optional if not explicitly mentioned.
Whitespace ahead and after any content is ignored.
All functions listing users (ping, noping, massmessage) support common optional parameters. They may be provided both with #invoke as default for a certain template as well as for a particular transclusion – the latter takes precedence.
:_ will be displayed as simple space.: (legacy).@_ will be displayed as simple space. |__ will be displayed as simple space. will be turned into line breaks.Create a list of user page links from a list of nicks, which should trigger echo mention if occurring in a signed section.
user:).0 – Do not show error message if maxecho exceeded.#invoke and template transclusion; the latter takes precedence.Like ping, but all links as URL. No mentioning by echo, therefore max out of scope.
Retrieve a list of recipients from a list of massmessage targets. This function is „expensive“. The usage of expensive functions per page is limited to 500.
#, followed by curid (pageid) surviving page moves.#invoke only._ provided nothing visual will be displayed.#invoke only.0 – Do not show error message if maxecho exceeded.#invoke and template transclusion; the latter takes precedence.#invoke is directly preceeded by subst: if set in any mode.#invoke only.On defining pages, the parser function call {{#target: is supposed to be downcased, with no spaces within.
The parser functions need to be present within the page source itself, not indirectly via templates.
{{#target:Benutzer:PerfektesChaos}}
{{#target:Project:Noticeboard|en.wikipedia.org}}
Just tell the current limitation for pinged users by a single edit: 50
Version identification on this wiki: 2022-11-14
A test page illustrates practical use.
Some functions may be used by other modules:
local lucky, Pinging = pcall( require, "Module:Pinging" )
if type( Pinging ) == "table" then
mw.log( Pinging.maxecho() )
else
-- error; Pinging contains error message
return "<span class=\"error\">" .. Pinging .. "</span>"
end
If succeeded there are available:
#invoke as listed aboveGeneral library; no limitations.