phpBB Version: 3.0.x (getestet mit 3.0.7)
Beschreibung: Mit diesem kleinen Snippet wird bei der Registrierung auch der Wohnort abgefragt. Dieser ist zugleich ein Pflichtfeld, was zur Folge hat das das Registrieren ohne Angabe eines Wohnortes nicht möglich ist.
Wenn das Profilfeld kein Pflichtfeld sein soll, lass einfach die roten Änderungen weg.
Öffne: includes/ucp/ucp_profile.php
Öffne: includes/ucp/ucp_register.php//Diese Veränderung muss nicht mehr gemacht werden, wenn "Prime Birthdate Require" installiert ist.
Suche:Danach einfügen:Code: Alles auswählen
$error = validate_data($data, $validate_array);
Code: Alles auswählen
if ($data['location'] == '') { $error[] = $user->lang['TOO_SHORT_LOCATION']; }
Öffne: styles/prosilver/template/ucp_profile_profile_info.htmlSuche:Danach einfügen:Code: Alles auswählen
'tz' => request_var('tz', (float) $config['board_timezone']),
Suche:Code: Alles auswählen
'user_from' => request_var('user_from', '', true),
Danach einfügen:Code: Alles auswählen
'tz' => request_var('tz', (float) $timezone),
Suche:Code: Alles auswählen
'user_from' => request_var('user_from', '', true),
Danach einfügen:Code: Alles auswählen
'lang' => array('match', false, '#^[a-z_\-]{2,}$#i'), ));
Suche:Code: Alles auswählen
if ($data['user_from'] == '') { $error[] = $user->lang['TOO_SHORT_LOCATION']; }
Danach einfügen:Code: Alles auswählen
'user_inactive_time' => $user_inactive_time,
Suche:Code: Alles auswählen
'user_from' => $data['user_from'],
Danach einfügen:Code: Alles auswählen
'EMAIL_CONFIRM' => $data['email_confirm'],
Code: Alles auswählen
'USER_FROM' => $data['user_from'],
Öffne: styles/prosilver/template/ucp_register.html
Öffne: styles/subsilver2/template/ucp_profile_profile_info.htmlSuche:Danach einfügen:Code: Alles auswählen
<dl> <dt><label for="tz">{L_TIMEZONE}:</label></dt> <dd><select name="tz" id="tz" class="autowidth">{S_TZ_OPTIONS}</select></dd> </dl>
Code: Alles auswählen
<dl> <dt><label for="user_from">{L_LOCATION}:</label></dt> <dd><input type="text" tabindex="3" name="user_from" id="user_from" size="25" maxlength="100" value="{USER_FROM}" class="inputbox autowidth" title="{L_LOCATION}" /></dd> </dl>
Öffne: styles/subsilver2/template/ucp_register.html
Suche:Danach einfügen:Code: Alles auswählen
<tr> <td class="row1"><b class="genmed">{L_TIMEZONE}: </b></td> <td class="row2"><select name="tz">{S_TZ_OPTIONS}</select></td> </tr>
Code: Alles auswählen
<tr> <td class="row1"><b class="genmed">{L_LOCATION}: </b></td> <td class="row2"><input type="text" tabindex="3" name="user_from" id="user_from" size="25" maxlength="100" value="{USER_FROM}" class="inputbox autowidth" title="{L_LOCATION}" /></td> </tr>