Jump to content

Extension:NewUserMessage

From mediawiki.org
MediaWiki extensions manual
NewUserMessage
Release status: stable
Implementation User activity , Hook
Description Add a message to the newly created user's talk pages
Author(s)
Latest version 3.6.0 (2016-10-31)
MediaWiki 1.36+
PHP 7.3+
Database changes No
  • $wgNewUserMessageOnFirstEdit
  • $wgNewUserMessageOnAutoCreate
  • $wgNewUserMinorEdit
  • $wgNewUserSuppressRC
Licence GNU General Public License 2.0 or later
Download
Translate the NewUserMessage extension if it is available at translatewiki.net
Issues Open tasks · Report a bug

The NewUserMessage extension adds a message to the talk pages of newly created wiki accounts.

Installation

[edit]
  • Download and move the extracted NewUserMessage folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:
    cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/NewUserMessage
    
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'NewUserMessage' );
    
  • Configure as required
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration

[edit]

Global variables

[edit]

There are some global variables that affect the extension's operation. These should be set in your LocalSettings file after the require_once of the NewUserMessage.php script.

Variable Default value Meaning
$wgNewUserSuppressRC true Exclude the new user message creation from recent changes. By default they are not included even if Show minor edits is selected on RecentChanges or Watchlist. If set to false, these edits will be displayed.
$wgNewUserMinorEdit true Mark the new user message creation as a minor edit.
$wgNewUserMessageOnAutoCreate false Should auto creation (CentralAuth) trigger a new user message?
$wgNewUserMessageOnFirstEdit false Should the first edit trigger a new user message. This for use with CentralAuth for which we ignore autocreate by default. Without CentralAuth, the message is triggered on registration and this config has no effect.

In-wiki configuration

[edit]

Other settings of the extension can be made in the MediaWiki namespace.

Page title Default value Meaning
MediaWiki:Newusermessage-template-subject Template:Welcome-subject Specify a template to wrap the new user message thread subject within. 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.
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). Used as a fallback when MediaWiki:Newusermessage-template-body is not set.
MediaWiki:Newuseredit-summary Adding [[Template:Welcome|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. The user set here is marked as reserved and won't be able to login! If this user does not exist, "MediaWiki default" will show up as editing user.
MediaWiki:Newusermessage-signatures none Optional feature. If this page exists and contains a bullet list of linked user names, one of these user names will be randomly selected and used in the talk page signature instead of MediaWiki:Newusermessage-editor.
MediaWiki:Newusermessage-substitute‎ none Optional feature. If this page exists and contains a "1" (or anything else not spaces or a "-" hypthen), 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:

== Welcome to our Wiki ==

Hello {{{name}}} ...
Template parameters
  • |name= - User name
  • |realName= - Real name (can be empty)

See also

[edit]