Extension:NewUserMessage: Difference between revisions
Appearance
Content deleted Content added
m use Template:phpi |
mNo edit summary |
||
| (31 intermediate revisions by 15 users not shown) | |||
| Line 7: | Line 7: | ||
* [[User:Nad|Aran Dunkley]] |
* [[User:Nad|Aran Dunkley]] |
||
* [[User:Siebrand|Siebrand Mazeland]] |
* [[User:Siebrand|Siebrand Mazeland]] |
||
|php = |
|php = 7.3+ |
||
|version = 3.6.0 |
|version = 3.6.0 |
||
|mediawiki = 1. |
|mediawiki = 1.36+ |
||
|needs-updatephp = No |
|needs-updatephp = No |
||
|update = 2016-10-31 |
|update = 2016-10-31 |
||
|download = {{WikimediaDownload|NewUserMessage}} |
|download = {{WikimediaDownload|NewUserMessage|phab=ENUM}} |
||
|changelog = |
|changelog = |
||
|description = <translate><!--T:1--> Add a message to newly created user's talk pages</translate> |
|description = <translate><!--T:1--> Add a message to the newly created user's talk pages</translate> |
||
|bugzilla = NewUserMessage |
|bugzilla = NewUserMessage |
||
|pagedrive1 = true |
|||
}} |
}} |
||
<translate> |
<translate> |
||
<!--T:2--> |
<!--T:2--> |
||
The '''NewUserMessage''' extension adds a message to the talk pages of newly created wiki accounts. |
The '''NewUserMessage''' extension adds a message to the talk pages of newly created wiki accounts. |
||
| ⚫ | |||
Usually after a new user registers on a wiki powered by MediaWiki, the message in [[MediaWiki:Welcomecreation]] is displayed. This extension allows a message in a specified template to be added into the new user's talk page instead. |
|||
== Installation == <!--T:5--> |
== Installation == <!--T:5--> |
||
</translate> |
</translate> |
||
{{ExtensionInstall |
{{ExtensionInstall |
||
|registration= |
|registration=required |
||
|repo-name=NewUserMessage |
|repo-name=NewUserMessage |
||
|custom-steps=* [[#Configuration|<translate><!--T:6--> Configure as required</translate>]] |
|custom-steps=* [[#Configuration|<translate><!--T:6--> Configure as required</translate>]] |
||
|no-registration-version=1.26 |
|||
}} |
}} |
||
{{anchor|Configuration}} |
|||
<translate> |
<translate> |
||
== Configuration == <!--T:7--> |
== Configuration == <!--T:7--> |
||
| Line 41: | Line 35: | ||
<!--T:9--> |
<!--T:9--> |
||
There are some global variables |
There are some global variables that affect the extension's operation. These should be set in your <tvar name=ls>''LocalSettings''</tvar> file after the <tvar name=requireonce>''require_once''</tvar> of the <tvar name=newusermsg>''NewUserMessage.php''</tvar> script. |
||
</translate> |
</translate> |
||
{| class="wikitable" |
{| class="wikitable" |
||
!<translate><!--T:10--> Variable</translate>!!<translate><!--T:11--> Default value</translate>!!<translate><!--T:12--> Meaning</translate> |
! <translate><!--T:10--> Variable</translate> !! <translate><!--T:11--> Default value</translate> !! <translate><!--T:12--> Meaning</translate> |
||
|- |
|- |
||
| {{phpi|$wgNewUserSuppressRC}} |
| {{phpi|$wgNewUserSuppressRC}} |
||
| {{phpi|false}} |
| {{phpi|false}} |
||
| <translate><!--T:13--> Specify whether or not the new user message creation should show up in recent changes. If set to <tvar |
| <translate><!--T:13--> Specify whether or not the new user message creation should show up in recent changes. If set to <tvar name=true><code>true</code></tvar>, those edits will not be displayed even if "show bot edits" is selected on RecentChanges or Watchlist.</translate> |
||
|- |
|- |
||
| {{phpi|$wgNewUserMinorEdit}} |
| {{phpi|$wgNewUserMinorEdit}} |
||
| Line 62: | Line 56: | ||
<translate> |
<translate> |
||
=== In-wiki configuration === <!--T:16--> |
=== In-wiki configuration === <!--T:16--> |
||
| ⚫ | |||
{{anchor|In-wiki configuration}} |
|||
| ⚫ | |||
<!--T:17--> |
<!--T:17--> |
||
Other settings of the extension can be made in the |
Other settings of the extension can be made in the <tvar name=1><code>MediaWiki</code></tvar> namespace. |
||
</translate> |
</translate> |
||
{| class="wikitable" |
{| class="wikitable" |
||
!<translate><!--T:18--> Page title</translate>!!<translate><!--T:19--> Default value</translate>!!<translate><!--T:20--> Meaning</translate> |
! <translate><!--T:18--> Page title</translate> !! <translate><!--T:19--> Default value</translate> !! <translate><!--T:20--> Meaning</translate> |
||
|- |
|- |
||
| <code>MediaWiki:Newusermessage-template</code> |
| <code>MediaWiki:Newusermessage-template</code> |
||
| <code>Template:Welcome</code> |
| <code>Template:Welcome</code> |
||
| <translate><!--T:21--> Specify a template to wrap the new user message within. You can create translations (e.g. <tvar |
| <translate><!--T:21--> Specify a template to wrap the new user message within. You can create translations (e.g. <tvar name=subpage><code>MediaWiki:Newusermessage-template/es</code></tvar>) that will be used when the registered user has set a different interface language on registration (this is possible through [[<tvar name=params>Special:MyLanguage/Manual:Parameters to index.php</tvar>|&uselang]] parameter or more easily through [[<tvar name=loginlanglinks>Special:MyLanguage/Manual:$wgLoginLanguageSelector</tvar>|login language links]]). Used as a fallback when <code>MediaWiki:Newusermessage-template-body</code> is not set.</translate> |
||
|- |
|- |
||
| <code>MediaWiki:Newusermessage-template-subject</code> |
| <code>MediaWiki:Newusermessage-template-subject</code> |
||
| Line 82: | Line 74: | ||
| <code>MediaWiki:Newusermessage-template-body</code> |
| <code>MediaWiki:Newusermessage-template-body</code> |
||
| <code>Template:Welcome-body</code> |
| <code>Template:Welcome-body</code> |
||
| <translate><!--T:23--> Specify a template to wrap the new user message thread body within. |
| <translate><!--T:23--> Specify a template to wrap the new user message thread body within.</translate> |
||
|- |
|- |
||
| <code>MediaWiki:Newuseredit-summary</code> |
| <code>MediaWiki:Newuseredit-summary</code> |
||
| < |
| <syntaxhighlight lang=moin inline>Adding [[Template:Welcome|welcome message]] to new user's talk page</syntaxhighlight> |
||
to new user's talk page</nowiki></code> |
|||
| <translate><!--T:24--> Edit summary for the recent changes entry of a new users message. Always in content language.</translate> |
| <translate><!--T:24--> Edit summary for the recent changes entry of a new users message. Always in content language.</translate> |
||
|- |
|- |
||
| <code>MediaWiki:Newusermessage-editor</code> |
| <code>MediaWiki:Newusermessage-editor</code> |
||
| <code>New user message</code> |
| <code>New user message</code> |
||
| <translate><!--T:25--> Set the username of the user that makes the edit on user talk pages. |
| <translate><!--T:25--> Set the username of the user that makes the edit on user talk pages.</translate> '''<translate><!--T:58--> The user set here is marked as reserved and won't be able to login!</translate>''' <translate><!--T:59--> If this user does not exist, "MediaWiki default" will show up as editing user.</translate> |
||
|- |
|- |
||
| <code>MediaWiki:Newusermessage-signatures</code> |
| <code>MediaWiki:Newusermessage-signatures</code> |
||
| ''none'' |
|||
| <code>None</code> |
|||
| <translate><!--T:26--> Optional feature. if it exists and contains a list of user names (* [[<tvar |
| <translate><!--T:26--> Optional feature. if it exists and contains a list of user names (* [[<tvar name=sig>Special:MyLanguage/Help:signature</tvar>|signature]] newline * etc…), these user names will be added after the template (randomly) along with the date and time.</translate> |
||
|- |
|- |
||
| <code>MediaWiki:Newusermessage-substitute</code> |
| <code>MediaWiki:Newusermessage-substitute</code> |
||
| ''none'' |
|||
| <code>None</code> |
|||
| <translate><!--T:27--> Optional feature. If the page exists and contains any text (but spaces or a single dash ("-")), the welcome template will be [[<tvar |
| <translate><!--T:27--> Optional feature. If the page exists and contains any text (but spaces or a single dash ("-")), the welcome template will be [[<tvar name=subst>Special:MyLanguage/Help:substitution</tvar>|substitute]]d in the talk page.</translate> |
||
|} |
|} |
||
<translate> |
<translate> |
||
<!--T:28--> |
<!--T:28--> |
||
Note that these items are ''articles'', to edit them go to the article in your browser and edit the text accordingly. |
Note that these items are ''articles'', to edit them, go to the article in your browser and edit the text accordingly. |
||
=== Example NewUserMessage page === <!--T:29--> |
=== Example NewUserMessage page === <!--T:29--> |
||
| Line 110: | Line 101: | ||
A very simple example of the page you should create as Template:Welcome: |
A very simple example of the page you should create as Template:Welcome: |
||
</translate> |
</translate> |
||
{{#tag:syntaxhighlight |
|||
| |
|||
<source lang=moin> |
|||
<translate nowrap> |
<translate nowrap> |
||
== Welcome to our Wiki == <!--T:31--> |
== Welcome to our Wiki == <!--T:31--> |
||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
</translate> |
</translate> |
||
|lang=wikitext |
|||
</source> |
|||
}} |
|||
<translate> |
<translate> |
||
| Line 122: | Line 116: | ||
;Template parameters |
;Template parameters |
||
</translate> |
</translate> |
||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
== See also == <!--T:56--> |
|||
| ⚫ | |||
| ⚫ | |||
* {{Ll|Extension:Create User Page}} <translate><!--T:57--> - checks on login whether the user has a user page and, if not, creates it.</translate> |
|||
{{OnWikimedia}} |
{{OnWikimedia}} |
||
{{Used by}} |
|||
Latest revision as of 02:26, 21 June 2026
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 |
|
|
| 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 | edit source]- Download and move the extracted
NewUserMessagefolder to yourextensions/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
Done – Navigate to Special:Versionon your wiki to verify that the extension is successfully installed.
Configuration
[edit | edit source]Global variables
[edit | edit source]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
|
false
|
Specify whether or not the new user message creation should show up in recent changes. If set to true, those edits will not 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 | edit source]Other settings of the extension can be made in the MediaWiki namespace.
| Page 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). Used as a fallback when MediaWiki:Newusermessage-template-body is not set.
|
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: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 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. |
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 | edit source]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 | edit source]- Extension:Create User Page - checks on login whether the user has a user page and, if not, creates it.
| 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. |
| This extension is included in the following wiki farms/hosts and/or packages: |
Categories:
- Stable extensions
- User activity extensions
- Hook extensions
- LocalUserCreated extensions
- PageSaveComplete extensions
- UserGetReservedNames extensions
- GPL licensed extensions
- Extensions in Wikimedia version control
- All extensions
- Extensions used on Wikimedia
- Extensions included in Canasta
- Extensions included in Miraheze
- Extensions included in ProWiki
- Extensions included in Telepedia
- Extensions included in Weird Gloop
