Extension talk:CustomUserCreateForm/de

Anmerkung
Die beiden Klassen Usercreate und Userlogin wurden in 2 Dateien aufgeteilt und heißen jetzt: Usercreate.php und Userlogin.php

Wie fügt man ein benutzerdefiniertes Feld hinzu
Zunächst wurde dies durch Mediawiki 1.17.0 und CustomUserCreateForm möglich gemacht. Lasse uns starten.

Vorbereitung
Alle Arbeiten nach Extension:CustomUserCreateForm wurden durchgeführt.

Felder zum Anmeldeformular hinzufügen
Datei: extensions/customUserCreateForm/templates/customUsercreate.php Process:


 * Füge folgende Zeilen irgendwo in der Mitte der Execute Methode der customUsercreateTemplate Klasse ein.

Beispiel:

Das Speichern der Daten, die durch die neuen Felder erzeugt werden, in die Datenbank
Datei: extensions/customUserCreateForm/customUserCreateForm.php Prozess:
 * Ein neuen AddNewAccount Anker am Anfang der Datei einfügen:
 * Eine neue Funktion einfügen mit dem Namen von der AddNewAccount Anker Registrierung. Alle Daten der zusätzlichen Felder werden über der globalen Variable wgRequest eingelesen.
 * Aktuelle User ID einlesen.
 * Mit der Funktion wfGetDB (DB_MASTER) wird ein Objekt $dbw auf die Datenbank geholt.
 * $dbw->insert( 'user_properties'</tt> Speicher die Daten in die Tabelle user_properties</tt>.
 * Die Tabelle besteht aus den Feldern up_user, up_property, up_value</tt> und werden mit einem Array übergeben.

Beispiel:

Add new data to Special:Preferences page
File: templates/customUserCreateForm.php</tt> Process: Example:
 * Add a new GetPreferences</tt> 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)

If you wish to inject text into the UI this DOES NOT WORK. FIX IS INCLUDED
The function prototype needs to be:

NOT

$template needs to be passed by reference because the execute function that renders the content is call after the hooks are exected.

-Michael Lapinski -mtl[attt]mit[dot]edu

Extension NOT clear
Can you please provide more about how does this extension work and how to create new columns in database if i want to add birth date and country ' ANY ADVICE PLEASE

Is this extension still supported
Is this extension still supported please let us know

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 Old: templates/customUserLogin.php</tt> File New: templates/customUsercreate.php</tt> Process:
 * Add the following line somewhere in the middle of the execute method of the customUsercreateTemplate</tt> class.

Managing the data retrieved by the new fields and adding it to the database
File: templates/customUserCreateForm.php</tt> Process: Example:
 * Add a new AddNewAccount</tt> 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</tt> global variable
 * Store the data in the user_properties table by using wfGetDB (DB_MASTER)</tt>

Add new data to Special:Preferences page
File: templates/customUserCreateForm.php</tt> Process: Example:
 * Add a new GetPreferences</tt> 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)

If you wish to inject text into the UI this DOES NOT WORK. FIX IS INCLUDED
The function prototype needs to be:

NOT

$template needs to be passed by reference because the execute function that renders the content is call after the hooks are exected.

-Michael Lapinski -mtl[attt]mit[dot]edu

Extension NOT clear
Can you please provide more about how does this extension work and how to create new columns in database if i want to add birth date and country ' ANY ADVICE PLEASE

Is this extension still supported
Is this extension still supported please let us know

Übersetzt: Gieselkalk (talk) 23:16, 18 July 2012 (UTC)