Template:Reply to

From The Sims Wiki, a collaborative database for The Sims series
Jump to navigation Jump to search

@Example:

Template documentation (View · Edit · History · Purge)
{{Ping}}

This template uses Lua

Description[edit source]

This template is used to trigger notifications for users when replying to a thread on a talk page or other discussion noticeboard. Normally, this can be accomplished simply by adding a link to the user's userpage (e.g. [[User:Example|Example]]. This template simplifies the process and adds an "@" symbol at the beginning to make it a little more aesthetically pleasing.

Usage[edit source]

{{reply to|Username}} Message text. ~~~~

The edit that adds this template must meet the following requirement for notifications to work:

  • The edit must add new lines of text, not just edit existing lines.
  • The edit must be signed by adding ~~~~ to the end of the message.
    • If you have specified a custom signature, it must contain a plain wiki link ([[ ]]) to your user page, user talk page, or contributions page; it cannot be embedded in a template.
  • The edit must either be entirely within an existing sections (it cannot have new section headers in the middle) or start a new section (starts with a new section header).
    • Only sections of level 2 and above count.
  • If the number of detected to-be-pinged users exceeds 50, no notifications will be delivered.

You can also ping multiple users, up to a maximum of 50.

{{reply to|Username1|Username2}} Message text. ~~~~

Specify a nickname[edit source]

You can display any text in place of a username by using |labelX=, where X is the index of a positional parameter, counting from 1. For example:

"{{reply to|2=Example|3=label1=Exemplar|4=Example2|5=label2=John}}" produces "@Exemplar and John:"

You can also use |label= in place of |label1=. For example:

"{{reply to|2=Example|3=label=John}}" produces "@John:"

Specify a prefix[edit source]

To change the prefix, use |prefix=custom prefix. For example:

"{{reply to|Example|3=prefix=Hello  }}" produces "Hello Example:"

Or you can remove the prefix entirely by using |prefix=. For example:

"{{reply to|Example|3=prefix=}}" produces "Example:"

Customise punctuation[edit source]

By default, the template will insert a colon after the final name. To change this, specify the required character using the |p= parameter. For example:

"{{reply to|Example|3=p=—}}" produces "@Example"

The parameter omits leading or trailing spaces. Use   instead. For example:

"{{reply to|Example|3=p= –}} Text message" produces "@Example – Text message"

To simply remove the colon, use the parameter with an empty value:

"{{reply to|Example|3=p=}}" produces "@Example"

Customise conjunction[edit source]

By default, the template will use the word "and" between multiple names. To change this, specify the required conjunction using the |c= parameter. For example:

"{{reply to|Example|Example2|4=c=or}}" produces "@Example or Example2:"
"Neither {{reply to|Example|Example2|Example3|5=c=nor}}" produces "Neither @Example, Example2, nor Example3:"

To simply remove the conjunction, use the parameter with an empty value:

"{{reply to|Example|Example2|4=c=}}" produces "@Example, Example2:"

Or don't use![edit source]

If you are using the |prefix= and |p= together to just display one user name, then there is no need to use this template. Simply code [[User:username|]] or {{u|username}}. This will generate the same notifications as are generated by the template.

Error messages[edit source]

Username not given[edit source]

Sometimes, when the recipient's username contains an equal sign, for example {{reply to|test=test}}, it will show:

Error in Template:Reply to: Username not given.

To fix this, simply add 1= at the beginning of the username, 2= at the second username, 3= at the third username and so on:

{{reply to|1=test=test}}

More than 50 names specified[edit source]

If more than 50 names are specified in the template, it will show:

Error in Template:Reply to: More than 50 names specified.

This is a limitation of the notification system, as documented in the manual. Note that the system limitation is per edit, so while splitting a longer list between two templates will avoid this error message, none of the notifications will be sent. In the rare case you need to notify more than 50 people, it will need to be done in multiple edits.

Credits[edit source]

This template was copied from the English Wikipedia. This template's documentation was partially copied from there as well.

See also[edit source]

  • {{Hidden ping}} - when you need to mention users without displaying any text
  • {{No ping}} - when you need to link to users without mentioning them

Visit Template:Reply to/doc to edit this text! (How does this work?) (Refresh this text - why?)