Extension:NewUserMessage

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.

Installation
Download the latest snapshot and extract it to your extensions directory. Then include it in your LocalSettings.php file as in the following example.

Global variables
There are some global variables which affect the operation of the extension. These should be set in your LocalSettings file after the include of the NewUserMessage.php script.

In-wiki configuration
Other settings of the extension can be made in the MediaWiki: namespace. Note that these items are articles, to edit them go to the article in your browser and edit the text accordingly.

Example NewUserMessage page
A very simple example of the page you should create as Template:Welcome:

Hello
Welcome to our Wiki

Showing User's Real Name in the User page
If your trying to get an enterprise to accept the internal use of a wiki working against an LDAP directory than usernames like id6753478 are not gonna fly. You can insert the User's real name into the User Page. This allows admins to click on id6753478 and see a message like "User id6753478 is Joey Balitore"

Open up NewUserMessage.php and make this insert around line 42 $rName= $user->getRealName;

Now the entire function starting at line 31 should look so /* * Add the template message if the users talk page doesn't already exist */ function wfCreateNewUserMessage($user) { global $wgNewUserMessageTemplate;

//Eddie wants Real Name! $rName= $user->getRealName; $name = $user->getName; $talk = $user->getUserPage;

if (!$talk->exists) { $article = new Article($talk); $article->insertNewArticle('{'.'{'."$wgNewUserMessageTemplate|$name|$rName}}",false,false,true,false); }

return true; }

Now skip the template and jump right to the article /MediaWiki:NewUserMessage User: is:

That's it. Try adding a new user to see the effect.