##############################################################
## MOD Title: Add Address and Skypename to Userprofile
## MOD Author: CBACK <
webmaster@cback.de > (Christian Knerr)
http://www.community.cback.de
## MOD Description: Add the Fields
## - Given Name
## - Name
## - Street and Number
## - ZIP Code and City
## - Telephone Number
## - Skype Name
##
## to your Userprofile.
##
## It is possible to change these values also over the ACP
## Usermanagement, during Registration and into the
## Userprofile, like you can do this with other Profile Fields.
## MOD Version: 1.0.1
##
## Installation Level: Intermediate
## Installation Time: 20 Minutes
## Files To Edit: 9
## admin/admin_users.php
## includes/usercp_avatar.php
## includes/usercp_register.php
## includes/usercp_viewprofile.php
## language/lang_english/lang_main.php
## language/lang_german/lang_main.php
## templates/subSilver/admin/user_edit_body.tpl
## templates/subSilver/profile_add_body.tpl
## templates/subSilver/profile_view_body.tpl
## Included Files: n/a
##############################################################
## For Security Purposes, Please Check:
http://www.phpbb.com/mods/downloads/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MODs not offered
## in our MOD-Database, located at:
http://www.phpbb.com/mods/downloads/
##############################################################
## MOD History:
##
## 2005-06-18 - Version 1.0.0
## - First Release created for
www.mlm-infos.de
## Thanks for supporting the CBACK Project!
##
## 2005-06-30 - Version 1.0.1
## - FIX: Registration malfunction
##
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ SQL ]------------------------------------------
#
ALTER TABLE phpbb_users ADD user_vorname VARCHAR(255) AFTER user_interests;
ALTER TABLE phpbb_users ADD user_name VARCHAR(255) AFTER user_vorname;
ALTER TABLE phpbb_users ADD user_strasse VARCHAR(255) AFTER user_name;
ALTER TABLE phpbb_users ADD user_ort VARCHAR(255) AFTER user_strasse;
ALTER TABLE phpbb_users ADD user_telefon VARCHAR(255) AFTER user_ort;
ALTER TABLE phpbb_users ADD user_skype VARCHAR(255) AFTER user_telefon;
#
#-----[ OPEN ]------------------------------------------
#
language/lang_german/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
$lang['Interests'] = 'Interessen';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['Vorname'] = 'Vorname';
$lang['Name'] = 'Name';
$lang['Strasse'] = 'Straße / Nr.';
$lang['Ort'] = 'PLZ / Ort';
$lang['Telefon'] = 'Telefon';
$lang['Skype'] = 'Skype';
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
$lang['Interests'] = 'Interests';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['Vorname'] = 'Given Name';
$lang['Name'] = 'Name';
$lang['Strasse'] = 'Street / Nr.';
$lang['Ort'] = 'ZIP Code / City';
$lang['Telefon'] = 'Telephone';
$lang['Skype'] = 'Skype';
#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_viewprofile.php
#
#-----[ FIND ]------------------------------------------
#
'INTERESTS' => ( $profiledata['user_interests'] ) ? $profiledata['user_interests'] : ' ',
#
#-----[ AFTER, ADD ]------------------------------------------
#
'VORNAME' => ( $profiledata['user_vorname'] ) ? $profiledata['user_vorname'] : ' ',
'L_VORNAME' => $lang['Vorname'],
'NAME' => ( $profiledata['user_name'] ) ? $profiledata['user_name'] : ' ',
'L_NAME' => $lang['Name'],
'STRASSE' => ( $profiledata['user_strasse'] ) ? $profiledata['user_strasse'] : ' ',
'L_STRASSE' => $lang['Strasse'],
'ORT' => ( $profiledata['user_ort'] ) ? $profiledata['user_ort'] : ' ',
'L_ORT' => $lang['Ort'],
'TELEFON' => ( $profiledata['user_telefon'] ) ? $profiledata['user_telefon'] : ' ',
'L_TELEFON' => $lang['Telefon'],
'SKYPE' => ( $profiledata['user_skype'] ) ? $profiledata['user_skype'] : ' ',
'L_SKYPE' => $lang['Skype'],
#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_register.php
#
#-----[ FIND ]------------------------------------------
#
$strip_var_list = array('username' => 'username', 'email' => 'email', 'icq' => 'icq', 'aim' => 'aim', 'msn' => 'msn', 'yim' => 'yim', 'website' => 'website', 'location' => 'location', 'occupation' => 'occupation', 'interests' => 'interests');
#
#-----[ IN-LINE FIND ]------------------------------------------
#
'interests'
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, 'vorname' => 'vorname', 'name' => 'name', 'strasse' => 'strasse', 'ort' => 'ort', 'telefon' => 'telefon', 'skype' => 'skype'
#
#-----[ FIND (2 times!!)]------------------------------------------
#
$interests = stripslashes($interests);
#
#-----[ AFTER, ADD ]------------------------------------------
#
$vorname = stripslashes($vorname);
$name = stripslashes($name);
$strasse = stripslashes($strasse);
$ort = stripslashes($ort);
$telefon = stripslashes($telefon);
$skype = stripslashes($skype);
#
#-----[ FIND ]------------------------------------------
#
$sql = "UPDATE " . USERS_TABLE . "
#
#-----[ IN-LINE FIND ]------------------------------------------
#
$interests) . "'
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, user_vorname = '" . str_replace("\'", "''", $vorname) . "', user_name = '" . str_replace("\'", "''", $name) . "', user_strasse = '" . str_replace("\'", "''", $strasse) . "', user_ort = '" . str_replace("\'", "''", $ort) . "', user_telefon = '" . str_replace("\'", "''", $telefon) . "', user_skype = '" . str_replace("\'", "''", $skype) . "'
#
#-----[ FIND ]---------------------------------------------------
#
$sql = "INSERT INTO " . USERS_TABLE . "
#
#-----[ IN-LINE FIND ]------------------------------------------
#
user_interests
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, user_vorname, user_name, user_strasse, user_ort, user_telefon, user_skype
#
#-----[ FIND ]------------------------------------------
#
VALUES ($user_id, '" . str_replace("\'", "''", $username) . "', " . time() . ", '" . str_replace("\'", "''", $new_password) . "', '" . str_replace("\'", "''", $email) . "', '" . str_replace("\'", "''", $icq) . "', '" . str_replace("\'", "''", $website) . "', '" . str_replace("\'", "''", $occupation) . "', '" . str_replace("\'", "''", $location) . "', '" . str_replace("\'", "''", $interests) . "', '" . str_replace("\'", "''", $signature) . "', '$signature_bbcode_uid', $avatar_sql, $viewemail, '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', '" . str_replace("\'", "''", $yim) . "', '" . str_replace("\'", "''", $msn) . "', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $popup_pm, $user_timezone, '" . str_replace("\'", "''", $user_dateformat) . "', '" . str_replace("\'", "''", $user_lang) . "', $user_style, 0, 1, ";
#
#-----[ IN-LINE FIND ]------------------------------------------
#
str_replace("\'", "''", $interests) . "'
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, '" . str_replace("\'", "''", $vorname) . "', '" . str_replace("\'", "''", $name) . "', '" . str_replace("\'", "''", $strasse) . "', '" . str_replace("\'", "''", $ort) . "', '" . str_replace("\'", "''", $telefon) . "', '" . str_replace("\'", "''", $skype) . "',
#
#-----[ FIND ]------------------------------------------
#
$interests = $userdata['user_interests'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
$vorname = $userdata['user_vorname'];
$name = $userdata['user_name'];
$strasse = $userdata['user_strasse'];
$ort = $userdata['user_ort'];
$telefon = $userdata['user_telefon'];
$skype = $userdata['user_skype'];
#
#-----[ FIND ]------------------------------------------
#
display_avatar_gallery($mode, $avatar_category
#
#-----[ IN-LINE FIND ]------------------------------------------
#
$interests
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, $vorname, $name, $strasse, $ort, $telefon, $skype
#
#-----[ FIND (2 times!!)]------------------------------------------
#
'INTERESTS' => $interests,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'VORNAME' => $vorname,
'L_VORNAME' => $lang['Vorname'],
'NAME' => $name,
'L_NAME' => $lang['Name'],
'STRASSE' => $strasse,
'L_STRASSE' => $lang['Strasse'],
'ORT' => $ort,
'L_ORT' => $lang['Ort'],
'TELEFON' => $telefon,
'L_TELEFON' => $lang['Telefon'],
'SKYPE' => $skype,
'L_SKYPE' => $lang['Skype'],
#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_avatar.php
#
#-----[ FIND ]------------------------------------------
#
function display_avatar_gallery($mode, &$category
#
#-----[ IN-LINE FIND ]------------------------------------------
#
&$interests
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, &$vorname, &$name, &$strasse, &$ort, &$telefon, &$skype
#
#-----[ FIND ]------------------------------------------
#
$params = array('coppa', 'user_id'
#
#-----[ IN-LINE FIND ]------------------------------------------
#
'dateformat'
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, 'vorname', 'name', 'strasse', 'ort', 'telefon', 'skype'
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_users.php
#
#-----[ FIND ]------------------------------------------
#
$interests = ( !empty($HTTP_POST_VARS['interests']) ) ? trim(strip_tags( $HTTP_POST_VARS['interests'] ) ): '';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$vorname = ( !empty($HTTP_POST_VARS['vorname']) ) ? trim(strip_tags( $HTTP_POST_VARS['vorname'] ) ) : '';
$name = ( !empty($HTTP_POST_VARS['name']) ) ? trim(strip_tags( $HTTP_POST_VARS['name'] ) ) : '';
$strasse = ( !empty($HTTP_POST_VARS['strasse']) ) ? trim(strip_tags( $HTTP_POST_VARS['strasse'] ) ) : '';
$ort = ( !empty($HTTP_POST_VARS['ort']) ) ? trim(strip_tags( $HTTP_POST_VARS['ort'] ) ) : '';
$telefon = ( !empty($HTTP_POST_VARS['telefon']) ) ? trim(strip_tags( $HTTP_POST_VARS['telefon'] ) ) : '';
$skype = ( !empty($HTTP_POST_VARS['skype']) ) ? trim(strip_tags( $HTTP_POST_VARS['skype'] ) ) : '';
#
#-----[ FIND (2 Times!!)]------------------------------------------
#
$interests = htmlspecialchars(stripslashes($interests));
#
#-----[ AFTER, ADD ]------------------------------------------
#
$vorname = htmlspecialchars(stripslashes($vorname));
$name = htmlspecialchars(stripslashes($name));
$strasse = htmlspecialchars(stripslashes($strasse));
$ort = htmlspecialchars(stripslashes($ort));
$telefon = htmlspecialchars(stripslashes($telefon));
$skype = htmlspecialchars(stripslashes($skype));
#
#-----[ FIND ]------------------------------------------
#
$sql = "UPDATE " . USERS_TABLE . "
#
#-----[ IN-LINE FIND ]------------------------------------------
#
$interests) . "'
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, user_vorname = '" . str_replace("\'", "''", $vorname) . "', user_name = '" . str_replace("\'", "''", $name) . "', user_strasse = '" . str_replace("\'", "''", $strasse) . "', user_ort = '" . str_replace("\'", "''", $ort) . "', user_telefon = '" . str_replace("\'", "''", $telefon) . "', user_skype = '" . str_replace("\'", "''", $skype) . "'
#
#-----[ FIND ]------------------------------------------
#
$interests = htmlspecialchars($this_userdata['user_interests']);
#
#-----[ AFTER, ADD ]------------------------------------------
#
$vorname = htmlspecialchars($this_userdata['user_vorname']);
$name = htmlspecialchars($this_userdata['user_name']);
$strasse = htmlspecialchars($this_userdata['user_strasse']);
$ort = htmlspecialchars($this_userdata['user_ort']);
$telefon = htmlspecialchars($this_userdata['user_telefon']);
$skype = htmlspecialchars($this_userdata['user_skype']);
#
#-----[ FIND ]------------------------------------------
#
$s_hidden_fields .= '<input type="hidden" name="interests" value="' . str_replace("\"", """, $interests) . '" />';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$s_hidden_fields .= '<input type="hidden" name="vorname" value="' . str_replace("\"", """, $vorname) . '" />';
$s_hidden_fields .= '<input type="hidden" name="name" value="' . str_replace("\"", """, $name) . '" />';
$s_hidden_fields .= '<input type="hidden" name="strasse" value="' . str_replace("\"", """, $strasse) . '" />';
$s_hidden_fields .= '<input type="hidden" name="ort" value="' . str_replace("\"", """, $ort) . '" />';
$s_hidden_fields .= '<input type="hidden" name="telefon" value="' . str_replace("\"", """, $telefon) . '" />';
$s_hidden_fields .= '<input type="hidden" name="skype" value="' . str_replace("\"", """, $skype) . '" />';
#
#-----[ FIND ]------------------------------------------
#
'INTERESTS' => $interests,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'VORNAME' => $vorname,
'L_VORNAME' => $lang['Vorname'],
'NAME' => $name,
'L_NAME' => $lang['Name'],
'STRASSE' => $strasse,
'L_STRASSE' => $lang['Strasse'],
'ORT' => $ort,
'L_ORT' => $lang['Ort'],
'TELEFON' => $telefon,
'L_TELEFON' => $lang['Telefon'],
'SKYPE' => $skype,
'L_SKYPE' => $lang['Skype'],
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/profile_add_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td class="row1"><span class="gen">{L_INTERESTS}:</span></td>
<td class="row2">
<input type="text" class="post"style="width: 200px" name="interests" size="35" maxlength="150" value="{INTERESTS}" />
</td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<tr>
<td class="row1"><span class="gen">{L_VORNAME}:</span></td>
<td class="row2"> <input type="text" class="post"style="width: 200px" name="vorname" size="35" maxlength="250" value="{VORNAME}" /> </td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_NAME}:</span></td>
<td class="row2"> <input type="text" class="post"style="width: 200px" name="name" size="35" maxlength="250" value="{NAME}" /> </td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_STRASSE}:</span></td>
<td class="row2"> <input type="text" class="post"style="width: 200px" name="strasse" size="35" maxlength="250" value="{STRASSE}" /> </td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_ORT}:</span></td>
<td class="row2"> <input type="text" class="post"style="width: 200px" name="ort" size="35" maxlength="250" value="{ORT}" /> </td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_TELEFON}:</span></td>
<td class="row2"> <input type="text" class="post"style="width: 200px" name="telefon" size="35" maxlength="250" value="{TELEFON}" /> </td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_SKYPE}:</span></td>
<td class="row2"> <input type="text" class="post"style="width: 200px" name="skype" size="35" maxlength="250" value="{SKYPE}" /> </td>
</tr>
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/profile_view_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td valign="top" align="right"><span class="gen">{L_INTERESTS}:</span></td>
<td> <b><span class="gen">{INTERESTS}</span></b></td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<tr>
<td valign="top" align="right"><span class="gen">{L_VORNAME}:</span></td>
<td> <b><span class="gen">{VORNAME}</span></b></td>
</tr>
<tr>
<td valign="top" align="right"><span class="gen">{L_NAME}:</span></td>
<td> <b><span class="gen">{NAME}</span></b></td>
</tr>
<tr>
<td valign="top" align="right"><span class="gen">{L_STRASSE}:</span></td>
<td> <b><span class="gen">{STRASSE}</span></b></td>
</tr>
<tr>
<td valign="top" align="right"><span class="gen">{L_ORT}:</span></td>
<td> <b><span class="gen">{ORT}</span></b></td>
</tr>
<tr>
<td valign="top" align="right"><span class="gen">{L_TELEFON}:</span></td>
<td> <b><span class="gen">{TELEFON}</span></b></td>
</tr>
<tr>
<td valign="top" align="right"><span class="gen">{L_SKYPE}:</span></td>
<td> <b><span class="gen">{SKYPE}</span></b></td>
</tr>
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/user_edit_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td class="row1"><span class="gen">{L_INTERESTS}</span></td>
<td class="row2">
<input type="text" name="interests" size="35" maxlength="150" value="{INTERESTS}" />
</td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<tr>
<td class="row1"><span class="gen">{L_VORNAME}</span></td>
<td class="row2"> <input class="post" type="text" name="vorname" size="35" maxlength="250" value="{VORNAME}" /> </td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_NAME}</span></td>
<td class="row2"> <input class="post" type="text" name="name" size="35" maxlength="250" value="{NAME}" /> </td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_STRASSE}</span></td>
<td class="row2"> <input class="post" type="text" name="strasse" size="35" maxlength="250" value="{STRASSE}" /> </td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_ORT}</span></td>
<td class="row2"> <input class="post" type="text" name="ort" size="35" maxlength="250" value="{ORT}" /> </td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_TELEFON}</span></td>
<td class="row2"> <input class="post" type="text" name="telefon" size="35" maxlength="250" value="{TELEFON}" /> </td>
</tr>
<tr>
<td class="row1"><span class="gen">{L_SKYPE}</span></td>
<td class="row2"> <input class="post" type="text" name="skype" size="35" maxlength="250" value="{SKYPE}" /> </td>
</tr>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM