Add Name and Address to Profile

Potrebujete preložiť mód, či hack? Pomôžeme vám

Moderátor: Moderátori

Add Name and Address to Profile

Poslaťod evryl » Ned Okt 14, 2007 11:52 am

pls potreboval by som preložit 1 mod do sk alebo cz aj z postupom instalacie komu ho možem poslat vopred dakujem
evryl
Pokročilý
Pokročilý
 
Príspevky: 105
Registrovaný: Pon Sep 24, 2007 3:00 pm

Poslaťod korey_666 » Ned Okt 14, 2007 12:27 pm

posli ho sem
korey_666
Profesionál
Profesionál
 
Príspevky: 315
Registrovaný: Štv Okt 04, 2007 12:51 pm

Poslaťod evryl » Ned Okt 14, 2007 1:14 pm

prosil by som keby sa dalo preložit cele aj z tím hore čo je v angličtine teda cele aby som vedel čo mám robyt a ak by sa dalo niak to upravit aby to bolo bez tel čísel a udaje boli povinne dakujem

Kód: Vybrať všetko
##############################################################
## MOD Title: Add Name and Address to Profile (Not viewable by the Public)
## MOD Version:   1.0.0 (U.S.A. Version)
## TESTED and installed on phpBB 2.0.20 (May 2006)
## MOD Author: ~HG~ < admin@galahscorner.com > (Rod Angell) http://www.galahscorner.com
## Assistant Author: RMcGirr83 <rmcgirr83@myeastern.com> http://betraythis.com 
##
##
## MOD Description: Adds the following fields
##                  - Given Name
##                  - Surname
##                  - Street and Number
##                  - City
##                  - Zip
##                  - Telephone Number
##                  - Cellphone Number
##                  - Voip Number
##                 
##
##         This mod when installed will help prevent bots and spammers from registering as
##         they will be required to enter personal information in their profile.
##         Current members will have to add the information if they wish to change anything 
##         in their own profile.
##
##
## Installation Level: Intermediate
## Installation Time: 20 Minutes
## Files To Edit: 7
##                admin/admin_users.php
##                includes/usercp_avatar.php
##                includes/usercp_register.php
##             language/lang_english/lang_admin.php
##                language/lang_english/lang_main.php
##                templates/subSilver/admin/user_edit_body.tpl
##                templates/subSilver/profile_add_body.tpl
##               
##
############################################################## 
## MOD History:
##
##   2006-05-31  -  Version 1.0.0
##      - First Release 
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ SQL ]------------------------------------------
#
# Remember to change the table prefix to that used on your database
#
# Authors NOTE: You can change all instances of zip to
#               suit what ever your country uses.
#               You can change all instances of cellphone
#               to suit what ever your country users.
#               Please ensure you make these changes and save them
#               prior to installation and editing of any files ... make
#               sure the changes you make are CASE SENSITIVE inline
#               with this mod.

ALTER TABLE phpbb_users ADD user_givenname VARCHAR(255) AFTER user_email;
ALTER TABLE phpbb_users ADD user_surname VARCHAR(255) AFTER user_givenname;
ALTER TABLE phpbb_users ADD user_street VARCHAR(255) AFTER user_surname;
ALTER TABLE phpbb_users ADD user_city VARCHAR(255) AFTER user_street;
ALTER TABLE phpbb_users ADD user_zip VARCHAR(255) AFTER user_city;
ALTER TABLE phpbb_users ADD user_telephone VARCHAR(255) AFTER user_zip;
ALTER TABLE phpbb_users ADD user_cellphone VARCHAR(255) AFTER user_telephone;
ALTER TABLE phpbb_users ADD user_voip VARCHAR(255) AFTER user_cellphone;

#
#-----[ OPEN ]------------------------------------------
#
admin/admin_users.php


#
#-----[ FIND ]------------------------------------------
#
      $password_confirm = ( !empty($HTTP_POST_VARS['password_confirm']) ) ? trim(strip_tags(htmlspecialchars( $HTTP_POST_VARS['password_confirm'] ) )) : '';

#
#-----[ AFTER, ADD ]------------------------------------------
#
      $givenname = ( !empty($HTTP_POST_VARS['givenname']) ) ? trim(strip_tags( $HTTP_POST_VARS['givenname'] ) ) : '';
        $surname = ( !empty($HTTP_POST_VARS['surname']) ) ? trim(strip_tags( $HTTP_POST_VARS['surname'] ) ) : '';
        $street = ( !empty($HTTP_POST_VARS['street']) ) ? trim(strip_tags( $HTTP_POST_VARS['street'] ) ) : '';
        $city = ( !empty($HTTP_POST_VARS['city']) ) ? trim(strip_tags( $HTTP_POST_VARS['city'] ) ) : '';
        $zip = ( !empty($HTTP_POST_VARS['zip']) ) ? trim(strip_tags( $HTTP_POST_VARS['zip'] ) ) : '';
        $telephone = ( !empty($HTTP_POST_VARS['telephone']) ) ? trim(strip_tags( $HTTP_POST_VARS['telephone'] ) ) : '';
        $cellphone = ( !empty($HTTP_POST_VARS['cellphone']) ) ? trim(strip_tags( $HTTP_POST_VARS['cellphone'] ) ) : '';
        $voip = ( !empty($HTTP_POST_VARS['voip']) ) ? trim(strip_tags( $HTTP_POST_VARS['voip'] ) ) : '';


#
#-----[ FIND ]--------------------------------------------
#
               $password_confirm = '';


#
#-----[ AFTER, ADD ]------------------------------------------
#
         $givenname = htmlspecialchars(stripslashes($givenname));
         $surname = htmlspecialchars(stripslashes($surname));
         $street = htmlspecialchars(stripslashes($street));
         $city = htmlspecialchars(stripslashes($city));
         $zip = htmlspecialchars(stripslashes($zip));
         $telephone = htmlspecialchars(stripslashes($telephone));
         $cellphone = htmlspecialchars(stripslashes($cellphone));
         $voip = htmlspecialchars(stripslashes($voip));

#
#-----[ FIND ]------------------------------------------
#
         $sql = "UPDATE " . USERS_TABLE . "
            SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) . "'


#
#-----[ IN-LINE FIND ]------------------------------------------
#
"user_email = '" . str_replace("\'", "''", $email) . "'


#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, user_givenname = '" . str_replace("\'", "''", $givenname) . "', user_surname = '" . str_replace("\'", "''", $surname) . "', user_street = '" . str_replace("\'", "''", $street) . "', user_city = '" . str_replace("\'", "''", $city) . "', user_zip = '" . str_replace("\'", "''", $zip) . "', user_telephone = '" . str_replace("\'", "''", $telephone) . "',user_cellphone = '" . str_replace("\'", "''", $cellphone) . "', user_voip = '" . str_replace("\'", "''", $voip) . "'

# NOTE: Ensure you copy the complete code above including the "' on the last line:
#
#-----[ FIND (1st Instance) About Line 748]------------------------------------------
#
         $password_confirm = '';


#
#-----[ AFTER, ADD ]------------------------------------------
#
         $givenname = htmlspecialchars(stripslashes($givenname));
         $surname = htmlspecialchars(stripslashes($surname));
         $street = htmlspecialchars(stripslashes($street));
         $city = htmlspecialchars(stripslashes($city));
         $zip = htmlspecialchars(stripslashes($zip));
         $telephone = htmlspecialchars(stripslashes($telephone));
         $cellphone = htmlspecialchars(stripslashes($cellphone));
         $voip = htmlspecialchars(stripslashes($voip));


#
#-----[ FIND (2nd Instance) About Line 800]------------------------------------------
#
      $password_confirm = '';


#
#-----[ AFTER, ADD ]------------------------------------------
#
      $givenname = htmlspecialchars($this_userdata['user_givenname']);
      $surname = htmlspecialchars($this_userdata['user_surname']);
      $street = htmlspecialchars($this_userdata['user_street']);
      $city = htmlspecialchars($this_userdata['user_city']);
      $zip = htmlspecialchars($this_userdata['user_zip']);
      $telephone = htmlspecialchars($this_userdata['user_telephone']);
      $cellphone = htmlspecialchars($this_userdata['user_cellphone']);
      $voip = htmlspecialchars($this_userdata['user_voip']);


#
#-----[ FIND ]------------------------------------------
#
         $s_hidden_fields .= '<input type="hidden" name="email" value="' . str_replace("\"", "&quot;", $email) . '" />';


#
#-----[ AFTER, ADD ]------------------------------------------
#
         $s_hidden_fields .= '<input type="hidden" name="givenname" value="' . str_replace("\"", "&quot;", $givenname) . '" />';
         $s_hidden_fields .= '<input type="hidden" name="surname" value="' . str_replace("\"", "&quot;", $surname) . '" />';
         $s_hidden_fields .= '<input type="hidden" name="street" value="' . str_replace("\"", "&quot;", $street) . '" />';
         $s_hidden_fields .= '<input type="hidden" name="city" value="' . str_replace("\"", "&quot;", $city) . '" />';
         $s_hidden_fields .= '<input type="hidden" name="zip" value="' . str_replace("\"", "&quot;", $zip) . '" />';
         $s_hidden_fields .= '<input type="hidden" name="telephone" value="' . str_replace("\"", "&quot;", $telephone) . '" />';
         $s_hidden_fields .= '<input type="hidden" name="cellphone" value="' . str_replace("\"", "&quot;", $cellphone) . '" />';
         $s_hidden_fields .= '<input type="hidden" name="voip" value="' . str_replace("\"", "&quot;", $voip) . '" />';


#
#-----[ FIND ]------------------------------------------
#
               'EMAIL' => $email,


#
#-----[ AFTER, ADD ]------------------------------------------
#
         'GIVENNAME' => $givenname,
         'SURNAME' => $surname,
         'STREET' => $street,
         'CITY' => $city,
         'ZIP' => $zip,
         'TELEPHONE' => $telephone,
         'CELLPHONE' => $cellphone,
         'VOIP' => $voip,


#
#-----[ FIND ]------------------------------------------
#
         'L_PASSWORD_CONFIRM_IF_CHANGED' => $lang['password_confirm_if_changed'],


#
#-----[ AFTER, ADD ]------------------------------------------
#
         
         'L_GIVENNAME' => $lang['Givenname'],
         'L_SURNAME' => $lang['Surname'],
         'L_STREET' => $lang['Street'],
         'L_CITY' => $lang['City'],
         'L_ZIP' => $lang['Zip'],
         'L_TELEPHONE' => $lang['Telephone'],
         'L_CELLPHONE' => $lang['Cellphone'],
         'L_VOIP' => $lang['Voip'],


#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_avatar.php


#
#-----[ FIND ]------------------------------------------
#
function display_avatar_gallery($mode, &$category


#
#-----[ IN-LINE FIND ]------------------------------------------
#
, &$password_confirm


#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, &$givenname, &$surname, &$street, &$city, &$zip, &$telephone, &$cellphone, &$voip


#
#-----[ FIND ]------------------------------------------
#
$params = array('coppa', 'user_id'


#
#-----[ IN-LINE FIND ]------------------------------------------
#
, 'password_confirm'


#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, 'givenname', 'surname', 'street', 'city', 'zip', 'telephone', 'cellphone', 'voip'


#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_register.php

#-----[ FIND ]------------------------------------------
#
   $strip_var_list = array('email' => 'email'


#
#-----[ IN-LINE FIND ]------------------------------------------
#
'email' => 'email'


#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, 'givenname' => 'givenname', 'surname' => 'surname', 'street' => 'street', 'city' => 'city', 'zip' => 'zip', 'telephone' => 'telephone', 'cellphone' => 'cellphone', 'voip' => 'voip'


#
#-----[ FIND (1st instance!!) About Line 215]------------------------------------------
#
      $password_confirm = htmlspecialchars(stripslashes($password_confirm));


#
#-----[ AFTER, ADD ]------------------------------------------
#
      $givenname = stripslashes($givenname);
      $surname = stripslashes($surname);
      $street = stripslashes($street);
      $city = stripslashes($city);
      $zip = stripslashes($zip);
      $telephone = stripslashes($telephone);
      $cellphone = stripslashes($cellphone);
      $voip = stripslashes($voip);
       
#-----[ FIND ]---------------------------------------------------
#
{
            $username_sql = "username = '" . str_replace("\'", "''", $username) . "', ";
         }
      }
   }

#
#-----[ BELOW ADD (only add this part if you want the information mandatory) ]--------
#

   if( $mode == 'editprofile' || $mode == 'register' )
   {
      if( empty($givenname) || empty($surname) || empty($street) || empty($city) || empty($zip) )
      {
         $error = TRUE;
         $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) .

$lang['Fields_empty_givenname'] . $lang['Fields_empty_surname'] . $lang['Fields_empty_street'] . $lang['Fields_empty_city'] . $lang['Fields_empty_zip'];
      }
   }

#
#
#-----[ FIND ]------------------------------------------
#
         $sql = "UPDATE " . USERS_TABLE . "
            SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) ."'


#
#-----[ IN-LINE FIND ]------------------------------------------
#
. str_replace("\'", "''", $email) ."'


#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, user_givenname = '" . str_replace("\'", "''", $givenname) . "', user_surname = '" . str_replace("\'", "''", $surname) . "', user_street = '" . str_replace("\'", "''", $street) . "', user_city = '" . str_replace("\'", "''", $city) . "', user_zip = '" . str_replace("\'", "''", $zip) . "', user_telephone = '" . str_replace("\'", "''", $telephone) . "', user_cellphone = '" . str_replace("\'", "''", $cellphone) . "', user_voip = '" . str_replace("\'", "''", $voip) . "'


#
#-----[ FIND ]---------------------------------------------------
#
         $sql = "INSERT INTO " . USERS_TABLE . "   (user_id, username, user_regdate, user_password, user_email

#
#-----[ IN-LINE FIND ]------------------------------------------
#
user_email


#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, user_givenname, user_surname, user_street, user_city, user_zip, user_telephone, user_cellphone, user_voip


#
#-----[ FIND (partial line)]------------------------------------------
#
VALUES ($user_id, '" . str_replace("\'", "''", $username) . "', " . time() . ", '" . str_replace("\'", "''", $new_password) . "', '" . str_replace("\'", "''", $email) . "'


#
#-----[ IN-LINE FIND ]------------------------------------------
#
, '" . str_replace("\'", "''", $email) . "'


#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, '" . str_replace("\'", "''", $givenname) . "', '" . str_replace("\'", "''", $surname) . "', '" . str_replace("\'", "''", $street) . "', '" . str_replace("\'", "''", $city) . "', '" . str_replace("\'", "''", $zip) . "', '" . str_replace("\'", "''", $telephone) . "', '" . str_replace("\'", "''", $cellphone) . "', '" . str_replace("\'", "''", $voip) . "'



#
#-----[ FIND (1st instance!!) About Line 794]------------------------------------------
#
   $password_confirm = '';


#
#-----[ AFTER, ADD ]------------------------------------------
#
   $givenname = stripslashes($givenname);
   $surname = stripslashes($surname);
   $street = stripslashes($street);
   $city = stripslashes($city);
   $zip = stripslashes($zip);
   $telephone = stripslashes($telephone);
   $cellphone = stripslashes($cellphone);
   $voip = stripslashes($voip);
       

#
#-----[ FIND (2nd instance!!) Around Line 827]------------------------------------------
#
   $password_confirm = '';


#
#-----[ AFTER, ADD ]------------------------------------------
#
      $givenname = $userdata['user_givenname'];
   $surname = $userdata['user_surname'];
   $street = $userdata['user_street'];
   $city = $userdata['user_city'];
   $zip = $userdata['user_zip'];
   $telephone = $userdata['user_telephone'];
   $cellphone = $userdata['user_cellphone'];
   $voip = $userdata['user_voip'];
       

#
#-----[ FIND ]------------------------------------------
#
display_avatar_gallery($mode, $avatar_category, $user_id, $email, $current_email


#
#-----[ IN-LINE FIND ]------------------------------------------
#
$password_confirm


#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, $givenname, $surname, $street, $city, $zip, $telephone, $cellphone, $voip


#
#-----[ FIND ]------------------------------------------
#
      'EMAIL' => isset($email) ? $email : '',


#
#-----[ AFTER, ADD ]------------------------------------------
#
      'GIVENNAME' => $givenname,
      'SURNAME' => $surname,
      'STREET' => $street,
      'CITY' => $city,
      'ZIP' => $zip,
      'TELEPHONE' => $telephone,
      'CELLPHONE' => $cellphone,
      'VOIP' => $voip,             
       

#
#-----[ FIND ]------------------------------------------
#
      'L_PASSWORD_CONFIRM_IF_CHANGED' => ( $mode == 'editprofile' ) ? $lang['password_confirm_if_changed'] : '',


#
#-----[ AFTER, ADD ]------------------------------------------
#
      'L_GIVENNAME' => $lang['Givenname'],
      'L_SURNAME' => $lang['Surname'],
      'L_STREET' => $lang['Street'],
      'L_CITY' => $lang['City'],
      'L_ZIP' => $lang['Zip'],
      'L_TELEPHONE' => $lang['Telephone'],
      'L_CELLPHONE' => $lang['Cellphone'],
      'L_VOIP' => $lang['Voip'],
       
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php


#
#-----[ FIND ]------------------------------------------
#
$lang['Email_address'] = 'E-mail address';


#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['Givenname'] = 'Given Name';
$lang['Surname'] = 'Surname';
$lang['Street'] = 'Nr/Street';
$lang['City'] = 'City';
$lang['Zip'] = 'Zip';
$lang['Telephone'] = 'Telephone';
$lang['Cellphone'] = 'Cellphone';
$lang['Voip'] = 'Voip';

#
#-----[ FIND ]------------------------------------------
#
//
// That's all, Folks!
//

#
#-----[ BEFORE, ADD ]--------
#
// Add Name and Address Member Profile
$lang['Required_field'] = '<b>Required Fields</b>: ';
$lang['Fields_empty_givenname'] = 'Your Given Name is Required';
$lang['Fields_empty_surname'] = 'Your Surname is Required';
$lang['Fields_empty_street'] = 'Your Nr/Street is Required';
$lang['Fields_empty_city'] = 'Your City is Required';
$lang['Fields_empty_zip'] = 'Your Zip Code is Required';
$lang['Fields_empty_telephone'] = 'Your Telephone Nr is Required';
$lang['Fields_empty_cellphone'] = 'Your Cellphone Nr is Required';
$lang['Fields_empty_voip'] = 'Your Voip is Required';

#
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/user_edit_body.tpl


#
#-----[ FIND ]------------------------------------------
#
   <tr>
     <th class="thSides" colspan="2">{L_PROFILE_INFO}</th>
   </tr>



#
#-----[ AFTER, ADD ]------------------------------------------
#
   <tr>
     <td class="row1"><span class="gen">{L_GIVENNAME} * </span></td>
     <td class="row2"> <input class="post" type="text" name="givenname" size="35"  maxlength="100" value="{GIVENNAME}" /> </td>
   </tr>
      <tr>
        <td class="row1"><span class="gen">{L_SURNAME} * </span></td>
        <td class="row2"> <input class="post" type="text" name="surname" size="35"  maxlength="100" value="{SURNAME}" /> </td>
      </tr>
      <tr>
        <td class="row1"><span class="gen">{L_STREET} * </span></td>
        <td class="row2"> <input class="post" type="text" name="street" size="35"  maxlength="100" value="{STREET}" /> </td>
      </tr>
      <tr>
        <td class="row1"><span class="gen">{L_CITY} * </span></td>
        <td class="row2"> <input class="post" type="text" name="city" size="35" maxlength="100"  value="{CITY}" /> </td>
      </tr>
      <tr>
        <td class="row1"><span class="gen">{L_ZIP} * </span></td>
        <td class="row2"> <input class="post" type="text" name="zip" size="35"  maxlength="100" value="{ZIP}" /> </td>
      </tr>
      <tr>
        <td class="row1"><span class="gen">{L_TELEPHONE}</span></td>
        <td class="row2"> <input class="post" type="text" name="telephone" size="35"  maxlength="100" value="{TELEPHONE}" /> </td>
      </tr>
      <tr>
        <td class="row1"><span class="gen">{L_CELLPHONE}</span></td>
        <td class="row2"> <input class="post" type="text" name="cellphone" size="35"  maxlength="100" value="{CELLPHONE}" /> </td>
      </tr>
      <tr>
        <td class="row1"><span class="gen">{L_VOIP}</span></td>
        <td class="row2"> <input class="post" type="text" name="voip" size="35" maxlength="100"  value="{VOIP}" /> </td>
      </tr>

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/profile_add_body.tpl


#
#-----[ FIND ]------------------------------------------
#
   <tr>
     <td class="row2" colspan="2"><span class="gensmall">{L_PROFILE_INFO_NOTICE}</span></td>
   </tr>

#
#-----[ AFTER, ADD ]------------------------------------------
#
      <tr>
     <td class="row1"><span class="gen">{L_GIVENNAME}: * </span></td>
        <td class="row2"> <input type="text" class="post"style="width: 200px"  name="givenname"  size="35" maxlength="250" value="{GIVENNAME}" /> </td>
      </tr>
      <tr>
        <td class="row1"><span class="gen">{L_SURNAME}: * </span></td>
        <td class="row2"> <input type="text" class="post"style="width: 200px"  name="surname"  size="35" maxlength="250" value="{SURNAME}" /> </td>
      </tr>
      <tr>
        <td class="row1"><span class="gen">{L_STREET}: * </span></td>
        <td class="row2"> <input type="text" class="post"style="width: 200px"  name="street"  size="35" maxlength="250" value="{STREET}" /> </td>
      </tr>
      <tr>
        <td class="row1"><span class="gen">{L_CITY}: * </span></td>
        <td class="row2"> <input type="text" class="post"style="width: 200px"  name="city" size="35"  maxlength="250" value="{CITY}" /> </td>
      </tr>
      <tr>
        <td class="row1"><span class="gen">{L_ZIP}: * </span></td>
        <td class="row2"> <input type="text" class="post"style="width: 200px"  name="zip"  size="35" maxlength="250" value="{ZIP}" /> </td>
      </tr>
      <tr>
        <td class="row1"><span class="gen">{L_TELEPHONE}:</span></td>
        <td class="row2"> <input type="text" class="post"style="width: 200px"  name="telephone"  size="35" maxlength="250" value="{TELEPHONE}" /> </td>
      </tr>
      <tr>
        <td class="row1"><span class="gen">{L_CELLPHONE}:</span></td>
        <td class="row2"> <input type="text" class="post"style="width: 200px"  name="cellphone"  size="35" maxlength="250" value="{CELLPHONE}" /> </td>
      </tr>
      <tr>
        <td class="row1"><span class="gen">{L_VOIP}:</span></td>
        <td class="row2"> <input type="text" class="post"style="width: 200px"  name="voip" size="35"  maxlength="250" value="{VOIP}" /> </td>
      </tr>


#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
evryl
Pokročilý
Pokročilý
 
Príspevky: 105
Registrovaný: Pon Sep 24, 2007 3:00 pm

Poslaťod drndos » Ned Okt 14, 2007 7:30 pm

Kód: Vybrať všetko
##############################################################
## MOD Title: Add Name and Address to Profile (Not viewable by the Public)
## MOD Version:   1.0.0 (U.S.A. Version)
## TESTED and installed on phpBB 2.0.20 (May 2006)
## MOD Author: ~HG~ < admin@galahscorner.com > (Rod Angell) http://www.galahscorner.com
## Assistant Author: RMcGirr83 <rmcgirr83@myeastern.com> http://betraythis.com 
##
##
## MOD Description: Adds the following fields
##                  - Given Name
##                  - Surname
##                  - Street and Number
##                  - City
##                  - Zip
##                 
##
##         This mod when installed will help prevent bots and spammers from registering as
##         they will be required to enter personal information in their profile.
##         Current members will have to add the information if they wish to change anything 
##         in their own profile.
##
##
## Installation Level: Intermediate
## Installation Time: 20 Minutes
## Files To Edit: 7
##                admin/admin_users.php
##                includes/usercp_avatar.php
##                includes/usercp_register.php
##             language/lang_english/lang_admin.php
##                language/lang_english/lang_main.php
##                templates/subSilver/admin/user_edit_body.tpl
##                templates/subSilver/profile_add_body.tpl
##               
##
############################################################## 
## MOD History:
##
##   2006-05-31  -  Version 1.0.0
##      - First Release 
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ SQL ]------------------------------------------
#
# Nezabudnite zmeniť prefix phpbb na vami používaný
#
# Authors NOTE: You can change all instances of zip to
#               suit what ever your country uses.
#               You can change all instances of cellphone
#               to suit what ever your country users.
#               Please ensure you make these changes and save them
#               prior to installation and editing of any files ... make
#               sure the changes you make are CASE SENSITIVE inline
#               with this mod.

ALTER TABLE phpbb_users ADD user_givenname VARCHAR(255) AFTER user_email;
ALTER TABLE phpbb_users ADD user_surname VARCHAR(255) AFTER user_givenname;
ALTER TABLE phpbb_users ADD user_street VARCHAR(255) AFTER user_surname;
ALTER TABLE phpbb_users ADD user_city VARCHAR(255) AFTER user_street;
ALTER TABLE phpbb_users ADD user_zip VARCHAR(255) AFTER user_city;

#
#-----[ OPEN ]------------------------------------------
#
admin/admin_users.php


#
#-----[ FIND ]------------------------------------------
#
      $password_confirm = ( !empty($HTTP_POST_VARS['password_confirm']) ) ? trim(strip_tags(htmlspecialchars( $HTTP_POST_VARS['password_confirm'] ) )) : '';

#
#-----[ AFTER, ADD ]------------------------------------------
#
      $givenname = ( !empty($HTTP_POST_VARS['givenname']) ) ? trim(strip_tags( $HTTP_POST_VARS['givenname'] ) ) : '';
        $surname = ( !empty($HTTP_POST_VARS['surname']) ) ? trim(strip_tags( $HTTP_POST_VARS['surname'] ) ) : '';
        $street = ( !empty($HTTP_POST_VARS['street']) ) ? trim(strip_tags( $HTTP_POST_VARS['street'] ) ) : '';
        $city = ( !empty($HTTP_POST_VARS['city']) ) ? trim(strip_tags( $HTTP_POST_VARS['city'] ) ) : '';
        $zip = ( !empty($HTTP_POST_VARS['zip']) ) ? trim(strip_tags( $HTTP_POST_VARS['zip'] ) ) : '';

#
#-----[ FIND ]--------------------------------------------
#
               $password_confirm = '';


#
#-----[ AFTER, ADD ]------------------------------------------
#
         $givenname = htmlspecialchars(stripslashes($givenname));
         $surname = htmlspecialchars(stripslashes($surname));
         $street = htmlspecialchars(stripslashes($street));
         $city = htmlspecialchars(stripslashes($city));
         $zip = htmlspecialchars(stripslashes($zip));

#
#-----[ FIND ]------------------------------------------
#
         $sql = "UPDATE " . USERS_TABLE . "
            SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) . "'


#
#-----[ IN-LINE FIND ]------------------------------------------
#
"user_email = '" . str_replace("\'", "''", $email) . "'


#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, user_givenname = '" . str_replace("\'", "''", $givenname) . "', user_surname = '" . str_replace("\'", "''", $surname) . "', user_street = '" . str_replace("\'", "''", $street) . "', user_city = '" . str_replace("\'", "''", $city) . "', user_zip = '" . str_replace("\'", "''", $zip) . "'

# NOTE: Ensure you copy the complete code above including the "' on the last line:
#
#-----[ FIND (1st Instance) About Line 748]------------------------------------------
#
         $password_confirm = '';


#
#-----[ AFTER, ADD ]------------------------------------------
#
         $givenname = htmlspecialchars(stripslashes($givenname));
         $surname = htmlspecialchars(stripslashes($surname));
         $street = htmlspecialchars(stripslashes($street));
         $city = htmlspecialchars(stripslashes($city));
         $zip = htmlspecialchars(stripslashes($zip));


#
#-----[ FIND (2nd Instance) About Line 800]------------------------------------------
#
      $password_confirm = '';


#
#-----[ AFTER, ADD ]------------------------------------------
#
      $givenname = htmlspecialchars($this_userdata['user_givenname']);
      $surname = htmlspecialchars($this_userdata['user_surname']);
      $street = htmlspecialchars($this_userdata['user_street']);
      $city = htmlspecialchars($this_userdata['user_city']);
      $zip = htmlspecialchars($this_userdata['user_zip']);


#
#-----[ FIND ]------------------------------------------
#
         $s_hidden_fields .= '<input type="hidden" name="email" value="' . str_replace("\"", "&quot;", $email) . '" />';


#
#-----[ AFTER, ADD ]------------------------------------------
#
         $s_hidden_fields .= '<input type="hidden" name="givenname" value="' . str_replace("\"", "&quot;", $givenname) . '" />';
         $s_hidden_fields .= '<input type="hidden" name="surname" value="' . str_replace("\"", "&quot;", $surname) . '" />';
         $s_hidden_fields .= '<input type="hidden" name="street" value="' . str_replace("\"", "&quot;", $street) . '" />';
         $s_hidden_fields .= '<input type="hidden" name="city" value="' . str_replace("\"", "&quot;", $city) . '" />';
         $s_hidden_fields .= '<input type="hidden" name="zip" value="' . str_replace("\"", "&quot;", $zip) . '" />';


#
#-----[ FIND ]------------------------------------------
#
               'EMAIL' => $email,


#
#-----[ AFTER, ADD ]------------------------------------------
#
         'GIVENNAME' => $givenname,
         'SURNAME' => $surname,
         'STREET' => $street,
         'CITY' => $city,
         'ZIP' => $zip,


#
#-----[ FIND ]------------------------------------------
#
         'L_PASSWORD_CONFIRM_IF_CHANGED' => $lang['password_confirm_if_changed'],


#
#-----[ AFTER, ADD ]------------------------------------------
#
         
         'L_GIVENNAME' => $lang['Givenname'],
         'L_SURNAME' => $lang['Surname'],
         'L_STREET' => $lang['Street'],
         'L_CITY' => $lang['City'],
         'L_ZIP' => $lang['Zip'],


#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_avatar.php


#
#-----[ FIND ]------------------------------------------
#
function display_avatar_gallery($mode, &$category


#
#-----[ IN-LINE FIND ]------------------------------------------
#
, &$password_confirm


#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, &$givenname, &$surname, &$street, &$city, &$zip


#
#-----[ FIND ]------------------------------------------
#
$params = array('coppa', 'user_id'


#
#-----[ IN-LINE FIND ]------------------------------------------
#
, 'password_confirm'


#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, 'givenname', 'surname', 'street', 'city', 'zip'


#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_register.php

#-----[ FIND ]------------------------------------------
#
   $strip_var_list = array('email' => 'email'


#
#-----[ IN-LINE FIND ]------------------------------------------
#
'email' => 'email'


#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, 'givenname' => 'givenname', 'surname' => 'surname', 'street' => 'street', 'city' => 'city', 'zip' => 'zip'


#
#-----[ FIND (1st instance!!) About Line 215]------------------------------------------
#
      $password_confirm = htmlspecialchars(stripslashes($password_confirm));


#
#-----[ AFTER, ADD ]------------------------------------------
#
      $givenname = stripslashes($givenname);
      $surname = stripslashes($surname);
      $street = stripslashes($street);
      $city = stripslashes($city);
      $zip = stripslashes($zip);
       
#-----[ FIND ]---------------------------------------------------
#
{
            $username_sql = "username = '" . str_replace("\'", "''", $username) . "', ";
         }
      }
   }

#
#-----[ BELOW ADD (only add this part if you want the information mandatory) ]--------
#

   if( $mode == 'editprofile' || $mode == 'register' )
   {
      if( empty($givenname) || empty($surname) || empty($street) || empty($city) || empty($zip) )
      {
         $error = TRUE;
         $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) .

$lang['Fields_empty_givenname'] . $lang['Fields_empty_surname'] . $lang['Fields_empty_street'] . $lang['Fields_empty_city'] . $lang['Fields_empty_zip'];
      }
   }

#
#
#-----[ FIND ]------------------------------------------
#
         $sql = "UPDATE " . USERS_TABLE . "
            SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) ."'


#
#-----[ IN-LINE FIND ]------------------------------------------
#
. str_replace("\'", "''", $email) ."'


#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, user_givenname = '" . str_replace("\'", "''", $givenname) . "', user_surname = '" . str_replace("\'", "''", $surname) . "', user_street = '" . str_replace("\'", "''", $street) . "', user_city = '" . str_replace("\'", "''", $city) . "', user_zip = '" . str_replace("\'", "''", $zip) . "'


#
#-----[ FIND ]---------------------------------------------------
#
         $sql = "INSERT INTO " . USERS_TABLE . "   (user_id, username, user_regdate, user_password, user_email

#
#-----[ IN-LINE FIND ]------------------------------------------
#
user_email


#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, user_givenname, user_surname, user_street, user_city, user_zip


#
#-----[ FIND (partial line)]------------------------------------------
#
VALUES ($user_id, '" . str_replace("\'", "''", $username) . "', " . time() . ", '" . str_replace("\'", "''", $new_password) . "', '" . str_replace("\'", "''", $email) . "'


#
#-----[ IN-LINE FIND ]------------------------------------------
#
, '" . str_replace("\'", "''", $email) . "'


#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, '" . str_replace("\'", "''", $givenname) . "', '" . str_replace("\'", "''", $surname) . "', '" . str_replace("\'", "''", $street) . "', '" . str_replace("\'", "''", $city) . "', '" . str_replace("\'", "''", $zip) . "'



#
#-----[ FIND (1st instance!!) About Line 794]------------------------------------------
#
   $password_confirm = '';


#
#-----[ AFTER, ADD ]------------------------------------------
#
   $givenname = stripslashes($givenname);
   $surname = stripslashes($surname);
   $street = stripslashes($street);
   $city = stripslashes($city);
   $zip = stripslashes($zip);
       

#
#-----[ FIND (2nd instance!!) Around Line 827]------------------------------------------
#
   $password_confirm = '';


#
#-----[ AFTER, ADD ]------------------------------------------
#
      $givenname = $userdata['user_givenname'];
   $surname = $userdata['user_surname'];
   $street = $userdata['user_street'];
   $city = $userdata['user_city'];
   $zip = $userdata['user_zip'];
       

#
#-----[ FIND ]------------------------------------------
#
display_avatar_gallery($mode, $avatar_category, $user_id, $email, $current_email


#
#-----[ IN-LINE FIND ]------------------------------------------
#
$password_confirm


#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, $givenname, $surname, $street, $city, $zip


#
#-----[ FIND ]------------------------------------------
#
      'EMAIL' => isset($email) ? $email : '',


#
#-----[ AFTER, ADD ]------------------------------------------
#
      'GIVENNAME' => $givenname,
      'SURNAME' => $surname,
      'STREET' => $street,
      'CITY' => $city,
      'ZIP' => $zip,         
       

#
#-----[ FIND ]------------------------------------------
#
      'L_PASSWORD_CONFIRM_IF_CHANGED' => ( $mode == 'editprofile' ) ? $lang['password_confirm_if_changed'] : '',


#
#-----[ AFTER, ADD ]------------------------------------------
#
      'L_GIVENNAME' => $lang['Givenname'],
      'L_SURNAME' => $lang['Surname'],
      'L_STREET' => $lang['Street'],
      'L_CITY' => $lang['City'],
      'L_ZIP' => $lang['Zip'],
       
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php


#
#-----[ FIND ]------------------------------------------
#
$lang['Email_address'] = 'E-mail address';


#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['Givenname'] = 'Meno';
$lang['Surname'] = 'Priezvisko';
$lang['Street'] = 'Ulica';
$lang['City'] = 'Mesto';
$lang['Zip'] = 'PSČ';

#
#-----[ FIND ]------------------------------------------
#
//
// That's all, Folks!
//

#
#-----[ BEFORE, ADD ]--------
#
// Add Name and Address Member Profile
$lang['Required_field'] = '<b>Požadované informácie</b>: ';
$lang['Fields_empty_givenname'] = 'Musíte zadať vaše meno';
$lang['Fields_empty_surname'] = 'Musíte zadať vaše priezvisko';
$lang['Fields_empty_street'] = 'Musíte zadať ulicu, na ktorej bývate';
$lang['Fields_empty_city'] = 'Musíte zadať mesto, v ktorom bývate';
$lang['Fields_empty_zip'] = 'Musíte zadať PSČ mesta kde bývate';

#
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/user_edit_body.tpl


#
#-----[ FIND ]------------------------------------------
#
   <tr>
     <th class="thSides" colspan="2">{L_PROFILE_INFO}</th>
   </tr>



#
#-----[ AFTER, ADD ]------------------------------------------
#
   <tr>
     <td class="row1"><span class="gen">{L_GIVENNAME} * </span></td>
     <td class="row2"> <input class="post" type="text" name="givenname" size="35"  maxlength="100" value="{GIVENNAME}" /> </td>
   </tr>
      <tr>
        <td class="row1"><span class="gen">{L_SURNAME} * </span></td>
        <td class="row2"> <input class="post" type="text" name="surname" size="35"  maxlength="100" value="{SURNAME}" /> </td>
      </tr>
      <tr>
        <td class="row1"><span class="gen">{L_STREET} * </span></td>
        <td class="row2"> <input class="post" type="text" name="street" size="35"  maxlength="100" value="{STREET}" /> </td>
      </tr>
      <tr>
        <td class="row1"><span class="gen">{L_CITY} * </span></td>
        <td class="row2"> <input class="post" type="text" name="city" size="35" maxlength="100"  value="{CITY}" /> </td>
      </tr>
      <tr>
        <td class="row1"><span class="gen">{L_ZIP} * </span></td>
        <td class="row2"> <input class="post" type="text" name="zip" size="35"  maxlength="100" value="{ZIP}" /> </td>
      </tr>
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/profile_add_body.tpl


#
#-----[ FIND ]------------------------------------------
#
   <tr>
     <td class="row2" colspan="2"><span class="gensmall">{L_PROFILE_INFO_NOTICE}</span></td>
   </tr>

#
#-----[ AFTER, ADD ]------------------------------------------
#
      <tr>
     <td class="row1"><span class="gen">{L_GIVENNAME}: * </span></td>
        <td class="row2"> <input type="text" class="post"style="width: 200px"  name="givenname"  size="35" maxlength="250" value="{GIVENNAME}" /> </td>
      </tr>
      <tr>
        <td class="row1"><span class="gen">{L_SURNAME}: * </span></td>
        <td class="row2"> <input type="text" class="post"style="width: 200px"  name="surname"  size="35" maxlength="250" value="{SURNAME}" /> </td>
      </tr>
      <tr>
        <td class="row1"><span class="gen">{L_STREET}: * </span></td>
        <td class="row2"> <input type="text" class="post"style="width: 200px"  name="street"  size="35" maxlength="250" value="{STREET}" /> </td>
      </tr>
      <tr>
        <td class="row1"><span class="gen">{L_CITY}: * </span></td>
        <td class="row2"> <input type="text" class="post"style="width: 200px"  name="city" size="35"  maxlength="250" value="{CITY}" /> </td>
      </tr>
      <tr>
        <td class="row1"><span class="gen">{L_ZIP}: * </span></td>
        <td class="row2"> <input type="text" class="post"style="width: 200px"  name="zip"  size="35" maxlength="250" value="{ZIP}" /> </td>
      </tr>

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
drndos
Moderátor
Moderátor
 
Príspevky: 2555
Registrovaný: Ned Máj 06, 2007 4:32 pm

Poslaťod evryl » Pon Okt 15, 2007 4:33 pm

wow super dík to bolo rýchle to som ani nečakal fakt dakujem len neviem čo mam zmenit v tom sql nevietw poradit alebo dajte link kde si prečítam ako na to
evryl
Pokročilý
Pokročilý
 
Príspevky: 105
Registrovaný: Pon Sep 24, 2007 3:00 pm

Poslaťod Mephisto » Pon Okt 15, 2007 7:44 pm

v tom sql mas prikazy:

ALTER TABLE phpbb_users ADD user_givenname VARCHAR(255) AFTER user_email;

a to hrube vyznacene je prefix...to si zmen na take ako mas...

ale vacsinou to biva phpbb_ a ak mas lixed tak to biva phpbb_lixed_
Obrázok užívateľa
Mephisto
Expert
Expert
 
Príspevky: 837
Registrovaný: Ned Aug 05, 2007 10:43 am
Bydlisko: ZVOLEN

Poslaťod evryl » Pon Okt 15, 2007 10:27 pm

Mephisto píše:v tom sql mas prikazy:

ALTER TABLE phpbb_users ADD user_givenname VARCHAR(255) AFTER user_email;

a to hrube vyznacene je prefix...to si zmen na take ako mas...

ale vacsinou to biva phpbb_ a ak mas lixed tak to biva phpbb_lixed_

nerozumiem čo mám spravit hrube tam nemám nič tak čo mam urobyt ist do phpadmin a tam to niekde pridat kde a ako pls podrobní návod
evryl
Pokročilý
Pokročilý
 
Príspevky: 105
Registrovaný: Pon Sep 24, 2007 3:00 pm

Poslaťod drndos » Uto Okt 16, 2007 8:21 am

A čo takto hľadať učiť sa a skúšať????
drndos
Moderátor
Moderátor
 
Príspevky: 2555
Registrovaný: Ned Máj 06, 2007 4:32 pm

Poslaťod evryl » Uto Okt 16, 2007 2:14 pm

drndos píše:A čo takto hľadať učiť sa a skúšať????

hmm tak keby to robyl každí tak toto forum by pomali zaniklo alebo snat služi na niečo iné ???
Dakujem za odpoved na predchádzajucu otázku
evryl
Pokročilý
Pokročilý
 
Príspevky: 105
Registrovaný: Pon Sep 24, 2007 3:00 pm

Poslaťod evryl » Uto Okt 16, 2007 3:31 pm

prosím vás nainstaloval som to a ked kliknem na registraciu astane mi len biela stena neviete čo stím pls..
evryl
Pokročilý
Pokročilý
 
Príspevky: 105
Registrovaný: Pon Sep 24, 2007 3:00 pm

Poslaťod drndos » Uto Okt 16, 2007 4:56 pm

nie nezaniklo! ľudia by sem chodili aj tak keď by si niečo chceli pozrieť ale keď máš na to takýto názor tak nemá zmysel ti pomáhať, kedže sa sám nesnažíš
drndos
Moderátor
Moderátor
 
Príspevky: 2555
Registrovaný: Ned Máj 06, 2007 4:32 pm

Poslaťod Mephisto » Uto Okt 16, 2007 5:11 pm

ak sa neviznas ani do zakladov tak nemas preco robit forum lebo tam budes mat chyby a nebudes tomu ani chapat ze co to znamena....a chod do phpmy admina a otvor sql okno takym tlacitkom sql a tam nakopiruj toto

ALTER TABLE phpbb_users ADD user_givenname VARCHAR(255) AFTER user_email;
ALTER TABLE phpbb_users ADD user_surname VARCHAR(255) AFTER user_givenname;
ALTER TABLE phpbb_users ADD user_street VARCHAR(255) AFTER user_surname;
ALTER TABLE phpbb_users ADD user_city VARCHAR(255) AFTER user_street;
ALTER TABLE phpbb_users ADD user_zip VARCHAR(255) AFTER user_city;


ak ti to nepojde tak to bude tym ze si nam nepovedal aky mas prefix bo ak mas ini ako phpbb_ tak to nepojde...
Obrázok užívateľa
Mephisto
Expert
Expert
 
Príspevky: 837
Registrovaný: Ned Aug 05, 2007 10:43 am
Bydlisko: ZVOLEN

Poslaťod evryl » Ned Okt 21, 2007 12:29 am

UZ MI TO IDE SUPER DIIK MOC ZA VSETKO
evryl
Pokročilý
Pokročilý
 
Príspevky: 105
Registrovaný: Pon Sep 24, 2007 3:00 pm


Späť na Potrebujem preložiť (phpBB 2)

Kto je on-line

Užívatelia prezerajúci fórum: Žiadny registrovaný užívateľ nie je prítomný a 0 hostia


vladstudio
TOPlist TOPlist
cron

Valid XHTML 1.0 Strict [Valid Atom 1.0]


* Štúrovo ubytovanie *