Extension:NewUserMessage
|
NewUserMessage Release status: stable |
|||
|---|---|---|---|
| Implementation | User activity, Hook | ||
| Description | Add a message to newly created user's talk pages | ||
| Author(s) | Nad, Siebrand | ||
| Last version | 3.4 (2012-09-26) | ||
| MediaWiki | 1.19+ | ||
| Database changes | no | ||
| License | GPL v2+ | ||
| Download |
CHANGELOG |
||
|
|||
|
|||
| Check usage and version matrix | |||
| Bugs: list open list all report | |||
Usually after a new user registers on a MediaWiki, the message in MediaWiki:Welcomecreation is displayed. This extensions allows a message in a specified template to be added into the new users talk page instead.
In case LiquidThreads is installed, this extension will create a new thread on the user talk page. See In-wiki configuration for details.
Contents |
Download [edit]
You can download the extension directly from the MediaWiki source code repository (browse code). You can get:
- One of the extensions tags
Not all extensions have tags. Some extensions have tags for each release, in which case those tags have the same stability as the release. To download a tag
- Go to the tags list
- Click the name of the tag you want to download
- Click "snapshot"
- The latest version of one of the extensions branches
Each extension has a master branch containing the latest code (might be unstable). Extensions can have further branches as well.
- Go to the branches list
- Click the branch name
- Click "snapshot"
- A snapshot made during the release of a MediaWiki version.
This might be unstable and is not guaranteed to work with the associated MediaWiki version.
After you've got the code, save it into the extensions/NewUserMessage directory of your wiki.
If you are familiar with git and have shell access to your server, you can obtain the extension, with all its tags and branches, as follows:
cd extensions
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/NewUserMessage.git
Installation [edit]
- Create a directory
NewUserMessagein your$IP/extensionsdirectory. - Extract the files to this
$IP/extensions/NewUserMessagedirectory. - Add
to the bottom of LocalSettings.php.require_once( "$IP/extensions/NewUserMessage/NewUserMessage.php" );
- Installation can now be verified through Special:Version of your wiki.
Usage [edit]
Global variables [edit]
There are some global variables which affect the operation of the extension. These should be set in your LocalSettings file after the require_once of the NewUserMessage.php script.
| Variable | Default value | Meaning |
|---|---|---|
| $wgNewUserSuppressRC | false | Specify whether or not the new user message creation should show up in recent changes. If set to true, those edits won't be displayed even if "show bot edits" is selected on RecentChanges or Watchlist. |
| $wgNewUserMinorEdit | true | Should the new user message creation be a minor edit? |
| $wgNewUserMessageOnAutoCreate | false | Should auto creation (CentralAuth) trigger a new user message? |
In-wiki configuration [edit]
Other settings of the extension can be made in the MediaWiki: namespace.
| Article title | Default value | Meaning |
|---|---|---|
| MediaWiki:Newusermessage-template | Template:Welcome | Specify a template to wrap the new user message within. You can create translations (e.g. MediaWiki:Newusermessage-template/es) that will be used when the registered user has set a different interface language on registration (this is possible through &uselang parameter or more easily through login language links). |
| MediaWiki:Newusermessage-template-subject | Template:Welcome-subject | Specify a template to wrap the new user message thread subject within. Only used when LiquidThreads is installed and active on user talk pages. Always preprocessed and substituted by the parser. |
| MediaWiki:Newusermessage-template-body | Template:Welcome-body | Specify a template to wrap the new user message thread body within. Only used when LiquidThreads is installed and active on user talk pages. |
| MediaWiki:Newuseredit-summary | Adding [[welcome message]] to new user's talk page | Edit summary for the recent changes entry of a new users message. Always in content language. |
| MediaWiki:Newusermessage-editor | New user message | Set the username of the user that makes the edit on user talk pages. If this user does not exist, "MediaWiki default" will show up as editing user. The user set here is marked as reserved and won't be able to login! |
| MediaWiki:Newusermessage-signatures | None | Optional feature. if it exists and contains a list of user names (* signature newline * etc...), these user names will be added after the template (randomly) along with the date and time. This feature is inactive when LiquidThreads is installed and new user messages are posted as threads. |
| MediaWiki:Newusermessage-substitute | None | Optional feature. If the page exists and contains any text (but spaces or a single dash ("-")), the welcome template will be substituted in the talk page. |
Note that these items are articles, to edit them go to the article in your browser and edit the text accordingly.
Example NewUserMessage page [edit]
A very simple example of the page you should create as Template:Welcome:
== Hello {{{name}}} ==
Welcome to our Wiki
Possible template parameters [edit]
- {{{name}}}: User name
- {{{realName}}}: Real name (can be empty)
Example NewUserMessage pages with LiquidThreads [edit]
Subject [edit]
A very simple example of the page you should create as Template:Welcome-subject:
Hello {{{name}}}
This message will be used as the thread subject - preprocessed and substituted. If this page is empty, this extension will not do anything when LiquidThreads is installed.
- Template parameter
- name: User name (user real name if used at registration)
Body [edit]
A very simple example of the page you should create as Template:Welcome-body:
Welcome to our Wiki, {{{realName|{{{name}}}}}}
This message will be used as the thread body. It will be substituted if MediaWiki:Newusermessage-substitute has contents. If this page is empty, this extension will not do anything when LiquidThreads is installed.
- Template parameters
- name: User name
- realName: User real name
Hooks [edit]
This extension adds one new hook:
| This extension is being used on one or more Wikimedia projects. This probably means that the extension is stable and works well enough to be used by such high-traffic websites. Look for this extension's name in Wikimedia's CommonSettings.php and InitialiseSettings.php configuration files to see where it's installed. A full list of the extensions installed on a particular wiki can be seen on the wiki's Special:Version page. |