Extension talk:CustomUserCreateForm

In MediaWiki 11.1.0, error as follows:

Fatal error: Cannot redeclare class UserloginTemplate in

/home/memswiki/public_html/extensions/customUserCreateForm/templates/customUserlogin.php on line 94

On customUserlogin.php needs to rename UserLoginTemplate class to customUserLoginTemplate

Note
The UsercreateTemplate and UserloginTemplate classes have been split into separate files. Be sure to be careful with that.Jasper Deng (talk) 05:40, 26 February 2012 (UTC)

How to add a custom field
First of all, this was made by using Mediawiki 1.17.0 and customUserCreateForm version 0.1 Said so, let's start

Add the field to the registration form
File: templates/customUserLogin.php Process:
 * Add the following line somewhere in the middle of the execute method of the customUsercreateTemplate class.

Managing the data retrieved by the new fields and adding it to the database
File: templates/customUserCreateForm.php Process: Example:
 * Add a new AddNewAccount hook at the top of the file:
 * Create a new function that will handle the data with the same name as stated on the AddNewAccount hook registration. All the data from the registration process can be retrieved via wgRequest global variable
 * Store the data in the user_properties table by using wfGetDB (DB_MASTER)

Add new data to Special:Preferences page
File: templates/customUserCreateForm.php Process: Example:
 * Add a new GetPreferences hook at the top of the file:
 * Create a new function that will handle the custom user preferences section with the same name as stated on the GetPreferences</tt> hook registration.
 * Call the data in the user_properties table by using the preferences variable

Create the custom system messages for the new fields

 * For each new property in the preferences, visit the MediaWiki:systemMessageForTheProperty article of your wiki and edit it by adding the name of the field you wish to appear next to the preferences box field.

Get data from the database
The SQL query for getting the data from the database should go as following: That should be all! Enjoy your new customized registration tool --Fladei (talk) 20:01, 15 April 2012 (UTC)