Hmm, hab meine Veränderungen jetzt nach der Anleitung des "Neues Feld in Profil einfügen" Hack gemacht..
Code: Alles auswählen
SQL:
ALTER TABLE `phpbb_users`
ADD `user_pre_name` VARCHAR( 25 ),
ADD `user_name` VARCHAR( 17 ) ,
ADD `user_street` VARCHAR( 25 ) ,
ADD `user_plz` VARCHAR( 5 ) ,
ADD `user_phone` VARCHAR( 16 ) ,
ADD `user_cell` VARCHAR( 16 ) ,
ADD `user_lk1` VARCHAR( 25 ) ,
ADD `user_lk2` VARCHAR( 25 ) ,
ADD `user_occupation_loc` VARCHAR( 255 ) ;
REPLACE:
\templates\your_tmpl\profile_add_body.tpl
OPEN:
\lang_german\lang_main.php
SEARCH:
// Profiles/Registration
EDIT/ADD:
$lang['Personal_info'] = 'Persönliche-Informationen';
$lang['Personal_info_warn'] = 'Achtung! Diese Informationen können öffentlich abrufbar sein. Bitte genau überprüfen welche sichtbar sein sollen.';
$lang['Pre_name'] = 'Vorname';
$lang['Name'] = 'Name';
$lang['Street'] = 'Straße, Hausnummer';
$lang['Plz'] = 'Postleitzahl';
$lang['Phone'] = 'Festnetznummer';
$lang['Cell'] = 'Handynummer';
$lang['Lk1'] = 'Leistungskurs 1';
$lang['Lk2'] = 'Leistungskurs 2';
$lang['Occupation_loc'] = 'Studienort, bzw. Ort der Tätigkeit';
OPEN:
\includes\usercp_register.php
SEARCH:
$template->assign_vars(array(
ADD, AFTER:
'PRE_NAME' => $pre_name,
'NAME' => $name,
'STREET' => $street,
'PLZ' => $plz,
'PHONE' => $phone,
'CELL' => $cell,
'LK1' => $lk1,
'LK2' => $lk2,
'OCCUPATION_LOC' => $occupation_loc,
'L_PERSONAL_INFO' => $lang['Personal_info'],
'L_PERSONAL_INFO_NOTICE' => $lang['Personal_info_warn'],
'L_PRE_NAME' => $lang['Pre_name'],
'L_NAME' => $lang['Name'],
'L_STREET' => $lang['Street'],
'L_PLZ' => $lang['Plz']
'L_PHONE' => $lang['Phone'],
'L_CELL' => $lang['Cell'],
'L_LK1' => $lang['Lk1'],
'L_LK2' => $lang['Lk2'],
'L_OCCUPATION_LOC' => $lang['Occupation_loc'],
SEARCH:
$strip_var_list = array(
INCLUDE IN THAT LINE:
, 'pre_name' => 'pre_name', 'name' => 'name', 'street' => 'street', 'plz' => 'plz', 'phone' => 'phone', 'cell' => 'cell', 'lk1' => 'lk1', 'lk2' => 'lk2', 'occupation_loc' => 'occupation_loc'
SEARCH:
validate_optional_fields(
INCLUDE IN THAT LINE:
, $pre_name, $name, $street, $plz, $phone, $cell, $lk1, $lk2, $occupation_loc
SEARCH (2 TIMES)
$interests = stripslashes($interests);
ADD, AFTER:
$pre_name = stripslashes($pre_name);
$name = stripslashes($name);
$street = stripslashes($street);
$plz = stripslashes($plz);
$phone = stripslashes($phone);
$cell = stripslashes($cell);
$lk1 = stripslashes($lk1);
$lk2 = stripslashes($lk2);
$occupation_loc = stripslashes($occupation_loc);
SEARCH:
$sql = "UPDATE " . USERS_TABLE . "
INCLUDE IN NEXT LINE
, user_pre_name = '" . str_replace("\'", "''", $pre_name) . "', user_name = '" . str_replace("\'", "''", $name) . "', user_street = '" . str_replace("\'", "''", $street) . "', user_plz = '" . str_replace("\'", "''", $plz) . "', user_phone = '" . str_replace("\'", "''", $phone) . "', user_cell = '" . str_replace("\'", "''", $cell) . "', user_lk1 = '" . str_replace("\'", "''", $lk1) . "', user_lk2 = '" . str_replace("\'", "''", $lk2) . "', user_occupation_loc = '" . str_replace("\'", "''", $occupation_loc) . "'
SEARCH:
$sql = "INSERT INTO " . USERS_TABLE . " (
INCLUDE IN LINE:
, user_pre_name, user_name, user_street, user_plz, user_phone, user_cell, user_lk1, user_lk2, user_occupation_loc
FINDE IN NEXT LINE:
, $user_style, 0, 1, ";
INCLUDE, BEFORE:
, '" . str_replace("\'", "''", $pre_name) . "', '" . str_replace("\'", "''", $name) . "', '" . str_replace("\'", "''", $street) . "', '" . str_replace("\'", "''", $plz) . "', '" . str_replace("\'", "''", $phone) . "', '" . str_replace("\'", "''", $cell) . "', '" . str_replace("\'", "''", $lk1) . "', '" . str_replace("\'", "''", $lk2) . "', '" . str_replace("\'", "''", $occupation_loc) . "'
SEARCH:
$interests = $userdata['user_interests'];
ADD, AFTER:
$pre_name = $userdata['user_pre_name'];
$name = $userdata['user_name'];
$street = $userdata['user_street'];
$plz = $userdata['user_plz'];
$phone = $userdata['user_phone'];
$cell = $userdata['user_cell'];
$lk1 = $userdata['user_lk1'];
$lk2 = $userdata['user_lk2'];
$occupation_loc = $userdata['user_occupation_loc'];
SEARCH:
, $userdata['session_id']);
INCLUDE, BEFORE:
, $pre_name, $name, $street, $plz, $phone, $cell, $lk1, $lk2, $occupation_loc
Alles funktioniert "prima", d.h. ich habe alle Felder die ich will kann Daten eintragen, verändern und er merkt sie sich auch wenn ich auf den Absendenbutton gehe.
Dummerweise bleibt mein Problem immernoch bestehen. Nach wenigen Sekunden im Profil springt der Browser wieder auf die Fehlerseite und es kommt die Fehlermeldung.
Ich weiss nicht woran es liegen könnte.