Zum Inhalt springen

Wikipedia:Lua/Modul/Pinging/en

aus Wikipedia, der freien Enzyklopädie
Dies ist eine alte Version dieser Seite, zuletzt bearbeitet am 30. Oktober 2015 um 15:43 Uhr durch PerfektesChaos (Diskussion | Beiträge) (+). Sie kann sich erheblich von der aktuellen Version unterscheiden.
Vorlagenprogrammierung Diskussionen Lua Test Unterseiten
Modul Deutsch English

Modul: Dokumentation

Pinging – Module with functions for any kind of user lists, especially for echo pings.

Functions for templates

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.

Common option parameters for all user list functions:
:
postfix character/string
default: :
empty assignment makes it disappear
p
like : (legacy)
@
prefix character/string
default: @
empty assignment makes it disappear
/
separator character/string
default:  |_
May be set both in template and #invoke. Assignment in template takes precedence.
Terminating or leading _ will be displayed as space which might be escaped by HTML entity.

 will be turned into line breaks.

ping

Create a list of user page links from a list of nicks, which should trigger echo mention if occurring in a signed section.

1
User nick (no leading user:).
2 3 4 5 6 7 8 9 ...
Any number of user nicks.
labeln
Assign different displayed link title to nick n.
Legacy for enwiki.
max
0 – Do not show error message if maxecho exceeded.
Chose another limit than by system.
May turn user name list into linklist for other purposes.
Available for both #invoke and template transclusion; the latter takes precedence.
default: Show error if 50 exceeded.

noping

Like ping, but all links as URL. No mentioning by echo, therefore max out of scope.

massmessage

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.

1
Source page, one of
  • local page name
  • heading #, followed by curid (pageid) surviving page moves
mandatory
2
List title
Must not contain links
Members will be shown if omitted
@
Parameter may be used to show both list title and members
max
0 – Do not show error message if maxecho exceeded
Chose another limit than by system.
May turn user name list into linklist for other purposes.
Available for both #invoke and template transclusion; the latter takes precedence.
default: Show error if 50 exceeded.
subst
Requires that #invoke is directly preceeded by subst: if set in any mode.
Available for #invoke only.
Supposed to be the name of the top including page (template title) which will be shown in error message.

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}}

maxecho

Just tell the current limitation for pinged users by a single edit: 50

failsafe

Version identification on this wiki: 2022-11-14

Examples (test page)

A test page illustrates practical use.

Functions for Lua modules (API)

Currently none.

Usage

General library; no limitations.

Dependencies

None.