Front End User Registration (fe users): Unterschied zwischen den Versionen
| Zeile 126: | Zeile 126: | ||
###LABEL_STATUS### ###REQUIRED_STATUS### ###EVAL_ERROR_FIELD_status### ###MISSING_STATUS### ###TCA_INPUT_status### | ###LABEL_STATUS### ###REQUIRED_STATUS### ###EVAL_ERROR_FIELD_status### ###MISSING_STATUS### ###TCA_INPUT_status### | ||
| + | |||
| + | == Eigene Felder hinzufügen == | ||
| + | http://www.herzogkienast.de/tutorials/benutzerregistrierung-erweitern.html | ||
| + | |||
| + | Prinzip: | ||
| + | * Extension erstellen die fe_user mit den benötigten Feldern erweitert | ||
| + | * HTML Template bearbeiten | ||
| + | * TCA Array für Selectboxen etc. bearbeiten und localconf mit hook erweitern. | ||
| + | |||
| + | Beispiel zusätzliches Company Feld | ||
| + | <pre> | ||
| + | <!-- ###SUB_INCLUDED_FIELD_company### --> | ||
| + | <dt> | ||
| + | <label for="tx-srfeuserregister-pi1-company"> | ||
| + | ###LABEL_COMPANY### ###REQUIRED_COMPANY###</label> | ||
| + | </dt> | ||
| + | <dd> | ||
| + | <!-- ###SUB_ERROR_FIELD_company### --> | ||
| + | <p>###EVAL_ERROR_FIELD_company###</p> | ||
| + | <!-- ###SUB_ERROR_FIELD_company### --> | ||
| + | <!-- ###SUB_REQUIRED_FIELD_company### --> | ||
| + | <p>###MISSING_COMPANY###</p> | ||
| + | <!-- ###SUB_REQUIRED_FIELD_company### --> | ||
| + | <input id="tx-srfeuserregister-pi1-company" | ||
| + | type="text" size="40" maxlength="50" | ||
| + | title="###TOOLTIP_COMPANY###" | ||
| + | name="###NAME_COMPANY###" /> | ||
| + | </dd> | ||
| + | <!-- ###SUB_INCLUDED_FIELD_company### --> | ||
| + | </pre> | ||
| + | |||
| + | Beispiel für TCA Felder | ||
| + | |||
| + | TCA-Marker, wie im Codebeispiel unten, ersetzt werden und dieser Marker platziert werden '###TCA_INPUT_tx_srfeuserextrafieldindustry_industry###. | ||
| + | <pre> | ||
| + | <!-- ###SUB_INCLUDED_FIELD_tx_srfeuserextrafieldindustry_ | ||
| + | industry### --> | ||
| + | <dt> | ||
| + | <label for="tx-srfeuserregister-pi1-industry"> | ||
| + | ###LABEL_TX_SRFEUSEREXTRAFIELDINDUSTRY_INDUSTRY### | ||
| + | ###REQUIRED_TX_SRFEUSEREXTRAFIELDINDUSTRY_INDUSTRY### | ||
| + | </label> | ||
| + | </dt> | ||
| + | <dd> | ||
| + | <!-- ###SUB_ERROR_FIELD_tx_srfeuserextrafieldindustry | ||
| + | _industry### --> | ||
| + | <p>###EVAL_ERROR_FIELD_tx_srfeuserextrafieldindustry | ||
| + | _industry###</p> | ||
| + | <!-- ###SUB_ERROR_FIELD_tx_srfeuserextrafieldindustry | ||
| + | _industry### --> | ||
| + | <!-- ###SUB_REQUIRED_FIELD_tx_srfeuserextrafieldindustry | ||
| + | _industry### --> | ||
| + | <p>###MISSING_TX_SRFEUSEREXTRAFIELDINDUSTRY | ||
| + | _INDUSTRY###</p> | ||
| + | <!-- ###SUB_REQUIRED_FIELD_tx_srfeuserextrafieldindustry | ||
| + | _industry### --> | ||
| + | ###TCA_INPUT_tx_srfeuserextrafieldindustry_industry### | ||
| + | </dd> | ||
| + | <!-- ###SUB_INCLUDED_FIELD_tx_srfeuserextrafieldindustry | ||
| + | _industry### --> | ||
| + | </pre> | ||
| + | |||
| + | ext_localconf.php in der neuen Extension mit Hook um das neue Feld zu registrieren (nur bei tca feldern) | ||
| + | <pre> | ||
| + | <?php | ||
| + | if (TYPO3_MODE=='FE') { | ||
| + | $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'] | ||
| + | ['sr_feuser_register']['extendingTCA'][] | ||
| + | = 'sr_feuser_extrafield_industry'; | ||
| + | } | ||
| + | ?> | ||
| + | </pre> | ||
| + | |||
| + | TypoScript Template - Felder zuweisen | ||
| + | |||
| + | In Ihrem TS-Template müssen Sie nun noch das entsprechende Feld zuweisen. | ||
| + | |||
| + | Zunächst in den constants wie folgt: | ||
| + | |||
| + | plugin.tx_srfeuserregister_pi1.formFields = tx_srfeuserextrafieldindustry_industry,image, username | ||
| + | |||
| + | Und im Setup bei create.fields und edit.fields. | ||
| + | |||
| + | Sofern das Feld ein Pflichtfeld sein soll, muss es sowohl in den Constants bei plugin.tx_srfeuserregister_pi1.requiredFields, als auch im Setup bei create.required angegeben werden. | ||
| + | |||
| + | === Sprachlabel === | ||
| + | </pre> | ||
| + | plugin.tx_srfeuserregister_pi1._LOCAL_LANG { | ||
| + | de { | ||
| + | fe_users.tx_srfeuserextrafieldindustry_industry = | ||
| + | Branchenauswahl: | ||
| + | fe_users.tx_srfeuserextrafieldindustry_industry.I.0 = | ||
| + | --- | ||
| + | fe_users.tx_srfeuserextrafieldindustry_industry.I.1 = | ||
| + | Produzent1 | ||
| + | fe_users.tx_srfeuserextrafieldindustry_industry.I.2 = | ||
| + | Produzent2 | ||
| + | fe_users.tx_srfeuserextrafieldindustry_industry.I.3 = | ||
| + | Produzent3 | ||
| + | fe_users.tx_srfeuserextrafieldindustry_industry.I.4 = | ||
| + | Produzent4 | ||
| + | fe_users.tx_srfeuserextrafieldindustry_industry.I.5 = | ||
| + | Produzent5 | ||
| + | } | ||
| + | } | ||
| + | <pre> | ||
Version vom 6. November 2013, 11:53 Uhr
Veralteter Artikel. Siehe auch:
Typo3 - Benutzer Registrierung (sr feuser register)
Konfiguration
Front End User Registration extension - Kurzanleitung Stand 31.5.2006 TS-Einstellungen mit folgendem prefix:
plugin.tx_srfeserregister_pi1.
Extensions Installieren
- die Extension
- static_info_libary (sr_static_info) + static_info_tables
- Keine Pflicht aber nützlich sind: New Login Box (newloginbox), KB MD5 FE Password (kb_md5fepw) und FE, BE Library (fh_library).
Statisches Template einfügen
- 'FE User Registration CSS-styled' (1.4.9+ of extension Static Info Library (sr_static_info) oder 'FE User Registration Old Style'.
SysOrdner für die FrontendUser
- Anlegen und darin zwei Frontend User Gruppen (nicht bestätigte und bestätigte Registrierungen)
- Wie angegeben die Konstanten auf diese Usergruppen IDs setzen:
userGroupUponRegistration=[gruppe1] userGroupAfterConfirmation==[gruppe2]
- Konstanten anlegen:
pid = [Ordner-Seite]
Login (Anmeldeseite) erstellen
- “General Storage Storage” (Allgemeine Datensatzsammlung) auf den Userordner setzen
- New Login Box anlegen
- dahinter die Front End User Registration extension CODE leer,Starting Point auf den UserOrdner
- Konstanten wie unten setzen
loginPID=[AnmeldeseitenID]
Register Seite erstellen
- unter der Anmeldeseite erstellen Access (Zugriff) auf “Hide at login” (Beim Login verstecken)
- Front End User Registration mit CODE CREATE und Startpunkt auf den User Ordner
- Konstante setzen:
registerPID=[Registier-SeiteID]
Edit-Seite erstellen (Profil bearbeiten)
- Seite erstellen Zugriff nur für registrierte Nutzer Gruppe (siehe oben)
- Front End User Registration extension mit CODE EDIT und Startpunkt auf den User Ordner
- Konstante setzen:
editPID = [Edit-PageID]
Confirm-Seite (Anmeldebestätigung)
- Seite erstellen Zugriff wie bei Registrierseite 'hide at login'(Beim Login verstecken)
- Front End User Registration extension einfügen CODE-Feld leer, Starting Point auf User Ordner
- Konstante setzen:
confirmPID = [ConfirmPID]
Registrierformular anpassen
- Die Felder und Pflichtfelder werden im TS Template bei den Konstanten gesetzt (Angegebene Werte sind default Werte:
formFields=username,password, first_name,last_name,date_of_birth,email, address,city,zone, static_info_country,zip, telephone,language, title,company,www, module_sys_dmail_category, module_sys_dmail_html,disable
requiredFields=username,password,name,email
Weitere Einstellungen
Alle weiteren Einstellungen lassen sich jetzt mit dem Constant Editor erledigen
Von Hand lassen sich die Einstellungen nach dem folgenden Schema im Constants Feld vornehmen:
plugin.tx_srfeuserregister_pi1.property = value
Weitere Infos Hier: http://typo3.org/documentation/document-library/extension-manuals/sr_feuser_register/2.3.6/view/5/4/
Weitere wichtige Einstellungen:
email = schlegel@geo-bit.de siteName = typo3.webmynet.de enableEmailConfirmation = 0 enableEmailOnApprove = 0 enableEmailOnRefuse = 0 enableEmailOnUpdate = 0 enableEmailOnDelete = 0
Template
Formular-Felder
s.o.
Marker (Auswahl)
Für das Formular:
- FORM_NAME###
- FORM_URL###
- LABEL_ENTER_ACCOUNT_INFO###
- LABEL_REQUIRED_INFO_NOTICE###
- LABEL_USERNAME### ###REQUIRED_USERNAME###
- EVAL_ERROR_FIELD_username###
- MISSING_USERNAME###
- LABEL_PASSWORD### ###REQUIRED_PASSWORD###
- EVAL_ERROR_FIELD_password###
- MISSING_PASSWORD###
- TOOLTIP_PASSWORD###
- LABEL_PASSWORD_REPEAT###
- LABEL_TOOLTIP_PASSWORD_AGAIN###
- LABEL_NAME### ###REQUIRED_NAME### ###EVAL_ERROR_FIELD_name### ###MISSING_NAME###
- LABEL_FIRST_NAME### ...
- LABEL_LAST_NAME### ...
- LABEL_STATUS### ###REQUIRED_STATUS### ###EVAL_ERROR_FIELD_status### ###MISSING_STATUS### ###TCA_INPUT_status###
Eigene Felder hinzufügen
http://www.herzogkienast.de/tutorials/benutzerregistrierung-erweitern.html
Prinzip:
- Extension erstellen die fe_user mit den benötigten Feldern erweitert
- HTML Template bearbeiten
- TCA Array für Selectboxen etc. bearbeiten und localconf mit hook erweitern.
Beispiel zusätzliches Company Feld
<!-- ###SUB_INCLUDED_FIELD_company### --> <dt> <label for="tx-srfeuserregister-pi1-company"> ###LABEL_COMPANY### ###REQUIRED_COMPANY###</label> </dt> <dd> <!-- ###SUB_ERROR_FIELD_company### --> <p>###EVAL_ERROR_FIELD_company###</p> <!-- ###SUB_ERROR_FIELD_company### --> <!-- ###SUB_REQUIRED_FIELD_company### --> <p>###MISSING_COMPANY###</p> <!-- ###SUB_REQUIRED_FIELD_company### --> <input id="tx-srfeuserregister-pi1-company" type="text" size="40" maxlength="50" title="###TOOLTIP_COMPANY###" name="###NAME_COMPANY###" /> </dd> <!-- ###SUB_INCLUDED_FIELD_company### -->
Beispiel für TCA Felder
TCA-Marker, wie im Codebeispiel unten, ersetzt werden und dieser Marker platziert werden '###TCA_INPUT_tx_srfeuserextrafieldindustry_industry###.
<!-- ###SUB_INCLUDED_FIELD_tx_srfeuserextrafieldindustry_ industry### --> <dt> <label for="tx-srfeuserregister-pi1-industry"> ###LABEL_TX_SRFEUSEREXTRAFIELDINDUSTRY_INDUSTRY### ###REQUIRED_TX_SRFEUSEREXTRAFIELDINDUSTRY_INDUSTRY### </label> </dt> <dd> <!-- ###SUB_ERROR_FIELD_tx_srfeuserextrafieldindustry _industry### --> <p>###EVAL_ERROR_FIELD_tx_srfeuserextrafieldindustry _industry###</p> <!-- ###SUB_ERROR_FIELD_tx_srfeuserextrafieldindustry _industry### --> <!-- ###SUB_REQUIRED_FIELD_tx_srfeuserextrafieldindustry _industry### --> <p>###MISSING_TX_SRFEUSEREXTRAFIELDINDUSTRY _INDUSTRY###</p> <!-- ###SUB_REQUIRED_FIELD_tx_srfeuserextrafieldindustry _industry### --> ###TCA_INPUT_tx_srfeuserextrafieldindustry_industry### </dd> <!-- ###SUB_INCLUDED_FIELD_tx_srfeuserextrafieldindustry _industry### -->
ext_localconf.php in der neuen Extension mit Hook um das neue Feld zu registrieren (nur bei tca feldern)
<?php
if (TYPO3_MODE=='FE') {
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']
['sr_feuser_register']['extendingTCA'][]
= 'sr_feuser_extrafield_industry';
}
?>
TypoScript Template - Felder zuweisen
In Ihrem TS-Template müssen Sie nun noch das entsprechende Feld zuweisen.
Zunächst in den constants wie folgt:
plugin.tx_srfeuserregister_pi1.formFields = tx_srfeuserextrafieldindustry_industry,image, username
Und im Setup bei create.fields und edit.fields.
Sofern das Feld ein Pflichtfeld sein soll, muss es sowohl in den Constants bei plugin.tx_srfeuserregister_pi1.requiredFields, als auch im Setup bei create.required angegeben werden.
Sprachlabel
plugin.tx_srfeuserregister_pi1._LOCAL_LANG {
de {
fe_users.tx_srfeuserextrafieldindustry_industry =
Branchenauswahl:
fe_users.tx_srfeuserextrafieldindustry_industry.I.0 = --- fe_users.tx_srfeuserextrafieldindustry_industry.I.1 =
Produzent1
fe_users.tx_srfeuserextrafieldindustry_industry.I.2 =
Produzent2
fe_users.tx_srfeuserextrafieldindustry_industry.I.3 =
Produzent3
fe_users.tx_srfeuserextrafieldindustry_industry.I.4 =
Produzent4
fe_users.tx_srfeuserextrafieldindustry_industry.I.5 =
Produzent5
}
}