18v.biz Forum Index


Please help us to develop!
The grownups hangout
Log in

Language
Language:    

Navigation
Portal
Forum
Search Forums
Faq
Downloads
Album
Quiz
Free games

Searching

Advanced Search
Google

Affiliates



New Games
This is a member only game, you need to register to playRoulette
Jewel Quest 2
Crumbs
power arrow
snow throw
tijuana drink
This is a member only game, you need to register to playdeathrow
This is a member only game, you need to register to playgems
Yeti Bubbles Classic
zombiegolfv32Th

MOD Title: Website Name In Profile

 
Post new topic   Reply to topic    18v.biz Forum Index -> Web Design -> Phpbb
uffe
Site Admin
Site Admin



 PostPosted: Mon Jan 21, 2008 9:30 pm    Post subject: MOD Title: Website Name In Profile Reply with quote Back to top

Code:
##############################################################
##############################################################
## MOD Title: Website Name In Profile
## MOD Author: volf < volf78@gmail.com > (N/A) http://www.18v.biz/portal.html
## MOD Description: This mod adds a field for website name in edit profile and will display the website name in view profile instead of the url.
## MOD Version: 0.0.2
##
## Installation Level: Intermediate
## Installation Time: 10 Minutes
##
## Files To Edit:      7
##                    language/lang_english/lang_main.php
##                    includes/usercp_viewprofile.php
##                    includes/usercp_register.php
##                    includes/usercp_avatar.php
##                    admin/admin_users.php
##                       templates/xxx/admin/user_edit_body.tpl
##                    templates/xxx/profile_add_body.tpl
##
## Included Files:   n/a
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ 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 MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##      Note that this is a beta version and as such there might be bugs!
##
##############################################################
## MOD History:
##
##   2005-06-13 - Version 0.0.2
##      - Mod ready for beta testing
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ SQL ]------------------------------------------

# change prefix to match the preffix you use

ALTER TABLE phpbb_users ADD user_website_name VARCHAR(255) AFTER user_website;

#
#-----[ OPEN ]------------------------------------------

language/lang_english/lang_main.php

#
#-----[ FIND ]------------------------------------------
#
$lang['Website'] = 'Website';

#
#-----[ AFTER, ADD ]------------------------------------------
#

$lang['website_name'] = 'website_name';

#
#-----[ OPEN ]------------------------------------------

includes/usercp_viewprofile.php

#
#-----[ FIND ]------------------------------------------
#

$www = ( $profiledata['user_website'] ) ? '<a href="' . $profiledata['user_website'] . '" target="_userwww">' . $profiledata['user_website'] . '</a>' : '&nbsp;';

#
#-----[ REPLACE WITH ]------------------------------------------
#

$www = ( $profiledata['user_website'] ) ? '<a href="' . $profiledata['user_website'] . '" target="_userwww">' . $profiledata['user_website_name'] . '</a>' : '&nbsp;';

#
#-----[ OPEN ]------------------------------------------

includes/usercp_register.php

#
#-----[ FIND ]------------------------------------------
#

   $strip_var_list = array('username' => 'username', 'email' => 'email', 'icq' => 'icq', 'aim' => 'aim', 'msn' => 'msn', 'yim' => 'yim', 'website' => 'website'


#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, 'website_name' => 'website_name'

#
#-----[FIND]---------------------------------------------------
#

      $website = stripslashes($website);

#
#-----[ AFTER, ADD ]------------------------------------------
#
      $website_name = stripslashes($website_name);

#
#-----[FIND]---------------------------------------------------
#
         $sql = "UPDATE " . USERS_TABLE . "
            SET " . $username_sql . $passwd_sql . "user_email

#
#-----[ IN-LINE FIND ]------------------------------------------
#
$website) . "'

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, user_website_name = '" . str_replace("\'", "''", $website_name) . "'

#
#-----[ FIND ]------------------------------------------
#

         $sql = "INSERT INTO " . USERS_TABLE . "   (user_id, username, user_regdate, user_password, user_email, user_icq, user_website
 
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, user_website_name

#
#-----[ IN-LINE FIND ]------------------------------------------
#
$website) . "'

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, '" . str_replace("\'", "''", $website_name) . "'

#
#-----[ FIND ]------------------------------------------
#

   $website = stripslashes($website);

#
#-----[ AFTER, ADD ]------------------------------------------
#

   $website_name = stripslashes($website_name);

#
#-----[ FIND ]------------------------------------------
#

   $website = $userdata['user_website'];

#
#-----[ AFTER, ADD ]------------------------------------------
#

   $website_name = $userdata['user_website_name'];

#
#-----[FIND]---------------------------------------------------
#

   display_avatar_gallery($mode, $avatar_category, $user_id

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

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, $website_name

#
#-----[FIND]--------------------------
#

      'WEBSITE' => $website,

#
#-----[ AFTER, ADD ]------------------------------------------
#

      'WEBSITE_NAME' => $website_name,
      'L_WEBSITE_NAME' => $lang['website_name'],

#
#-----[ OPEN ]------------------------------------------

includes/usercp_avatar.php

#
#-----[FIND]---------------------------------------------------
#

function display_avatar_gallery($mode, &$category, &$user_id, &$email, &$current_email, &$coppa, &$username, &$email, &$new_password, &$cur_password, &$password_confirm, &$icq, &$aim, &$msn, &$yim, &$website

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#

, &$website_name

#
#-----[FIND]---------------------------------------------------
#

   $params = array('coppa', 'user_id', 'username', 'email', 'current_email', 'cur_password', 'new_password', 'password_confirm', 'icq', 'aim', 'msn', 'yim', 'website'

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, 'website_name'

#
#-----[ OPEN ]------------------------------------------

admin/admin_users.php

#
#-----[ FIND ]------------------------------------------
#

      $website = ( !empty($HTTP_POST_VARS['website']) ) ? trim(strip_tags( $HTTP_POST_VARS['website'] ) ) : '';

#
#-----[ AFTER, ADD ]------------------------------------------
#

      $website_name = ( !empty($HTTP_POST_VARS['website_name']) ) ? trim(strip_tags( $HTTP_POST_VARS['website_name'] ) ) : '';

#
#-----[FIND]--------------------------------------------
#

         $website = htmlspecialchars(stripslashes($website));

#
#-----[ AFTER, ADD ]------------------------------------------
#

         $website_name = htmlspecialchars(stripslashes($website_name));

#
#-----[FIND]--------------------------------------------
#

         $sql = "UPDATE " . USERS_TABLE . "
            SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) . "', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "'

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, user_website_name = '" . str_replace("\'", "''", $website_name) . "'

#
#-----[FIND]--------------------------------------------
#

         $website = htmlspecialchars(stripslashes($website));

#
#-----[ AFTER, ADD ]------------------------------------------
#

         $website_name = htmlspecialchars(stripslashes($website_name));

#
#-----[ FIND ]------------------------------------------
#

      $website = htmlspecialchars($this_userdata['user_website']);

#
#-----[ AFTER, ADD ]------------------------------------------
#

      $website_name = htmlspecialchars($this_userdata['user_website_name']);

#
#-----[ FIND ]------------------------------------------
#

         $s_hidden_fields .= '<input type="hidden" name="website" value="' . str_replace("\"", "&quot;", $website) . '" />';

#
#-----[ AFTER, ADD ]------------------------------------------
#

         $s_hidden_fields .= '<input type="hidden" name="website_name" value="' . str_replace("\"", "&quot;", $website_name) . '" />';

#
#-----[ FIND ]------------------------------------------
#

         'WEBSITE' => $website,

#
#-----[ AFTER, ADD ]------------------------------------------
#

         'WEBSITE_NAME' => $website_name,
         'L_WEBSITE_NAME' => $lang['website_name'],

#
#-----[ OPEN ]------------------------------------------

templates/subSilver/profile_add_body.tpl

#
#-----[ FIND ]------------------------------------------
#

   <tr>
     <td class="row1"><span class="gen">{L_WEBSITE}:</span></td>
     <td class="row2">
      <input type="text" class="post"style="width: 200px"  name="website" size="25" maxlength="255" value="{WEBSITE}" />
     </td>
   </tr>

#
#-----[ REPLACE WITH ]------------------------------------------
#

   <tr>
     <td class="row1"><span class="gen">{L_WEBSITE}: (url)</span></td>
     <td class="row2">
      <input type="text" class="post"style="width: 200px"  name="website" size="25" maxlength="255" value="{WEBSITE}" />
     </td>
   </tr>
   <tr>
     <td class="row1"><span class="gen">{L_WEBSITE_NAME}: (url text)</span></td>
     <td class="row2"> <input type="text" class="post"style="width: 200px"  name="website_name" size="35" maxlength="150" value="{WEBSITE_NAME}" /> </td>
   </tr>

#
#-----[ OPEN ]------------------------------------------

templates/subSilver/admin/user_edit_body.tpl

#
#-----[ FIND ]------------------------------------------
#

   <tr>
     <td class="row1"><span class="gen">{L_WEBSITE}</span></td>
     <td class="row2">
      <input class="post" type="text" name="website" size="35" maxlength="255" value="{WEBSITE}" />
     </td>
   </tr>

#
#-----[ REPLACE WITH ]------------------------------------------
#

   <tr>
     <td class="row1"><span class="gen">{L_WEBSITE} - (url)</span></td>
     <td class="row2">
      <input class="post" type="text" name="website" size="35" maxlength="255" value="{WEBSITE}" />
     </td>
   </tr>
   <tr>
     <td class="row1"><span class="gen">{L_WEBSITE_NAME} - (url text)</span></td>
     <td class="row2">
      <input class="post" type="text" name="website_name" size="35" maxlength="255" value="{WEBSITE_NAME}" />
     </td>
   </tr>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
 
Google
Sponsor



 PostPosted: Mon Jan 21, 2008 9:30 pm    Post subject: Advertisement Back to top

 
Display posts from previous:   
Post new topic   Reply to topic    18v.biz Forum Index -> Web Design -> Phpbb All times are GMT + 2 Hours
Page 1 of 1

 
Jump to: