You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 61 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Custom Title [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
TheosEleos
Private
Private


Joined: Jul 28, 2003
Posts: 38


PostPosted: Mon Oct 20, 2003 5:48 pm Reply with quoteBack to top

I really want my users to be able to assign their own title like vBulletin. Here is an install I found and for the life of me I can't figure it out. Can someone please help me?

Quote:
##############################################################
## MOD Title: Custom Title
## MOD Author: Fubonis < php@fubonis.com > (JW Frazier) http://www.fubonis.com
## MOD Description: Users can add their own custom title
## MOD Version: Beta 1.1.0
##
## Installation Level: Easy
## Installation Time: 10 Minutes
## Files To Edit: admin/admin_users.php, includes/usercp_register.php, includes/usercp_viewprofile.php, language/lang_english/lang_main.php, templates/subSilver/admin/user_edit_body.tpl, templates/subSilver/profile_add_body.tpl, viewtopic.php
## 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 MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/downloads/
##############################################################
## Author Notes:
## You need to run this SQL command. Add your prefix if neccessary.
## ALTER TABLE users ADD user_custom_title VARCHAR(25) NOT NULL AFTER username;
## And no, this isn't the other custom title/rank mod. I made my own because...uh...away!
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

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

admin/admin_users.php


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

SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) . "', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", $aim) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_sig_bbcode_uid = '$signature_bbcode_uid', user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowavatar = $user_allowavatar, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_allow_pm = $user_allowpm, user_notify_pm = $notifypm, user_popup_pm = $popuppm, user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_active = $user_status, user_rank = $user_rank" . $avatar_sql . "


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

, user_custom_title = '$user_custom_title'


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

$user_allowpm = $this_userdata['user_allow_pm'];


#
#-----[ AFTER, ADD ]------------------------------------------
#
$user_custom_title = $this_userdata['user_custom_title']; // Custom Title Mod


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

'RANK_SELECT_BOX' => $rank_select_box,


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

'CUSTOM_TITLE' => $user_custom_title, // Custom Title Mod


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

'L_SELECT_RANK' => $lang['Rank_title'],


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

'L_CUSTOM_TITLE' => $lang['Custom_Title'], // Custom Title Mod


#
#-----[ 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, ADD ]------------------------------------------
#

, 'user_custom_title' => 'user_custom_title'


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

if ( !isset($HTTP_POST_VARS['cancelavatar']))
{
$user_avatar = $user_avatar_local;
$user_avatar_type = USER_AVATAR_GALLERY;
}
}


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

$user_custom_title = htmlspecialchars($user_custom_title); // Custom Title Mod


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

SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) ."', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_sig_bbcode_uid = '$signature_bbcode_uid', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_notify_pm = $notifypm, user_popup_pm = $popuppm, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_active = $user_active, user_actkey = '" . str_replace("\'", "''", $user_actkey) . "'" . $avatar_sql . "


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

, user_custom_title = '$user_custom_title'


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

$user_dateformat = $userdata['user_dateformat'];


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

$user_custom_title = htmlspecialchars($userdata['user_custom_title']); // Custom Title Mod


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

'SMILIES_STATUS' => $smilies_status,


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

'CUSTOM_TITLE' => $user_custom_title, // Custom Title Mod


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

'L_EMAIL_ADDRESS' => $lang['Email_address'],


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

'L_CUSTOM_TITLE' => $lang['Custom_Title'], // Custom Title Mod


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

includes/usercp_viewprofile.php


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

$poster_rank = $ranksrow[$i]['rank_title'];


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

$poster_rank = ( !empty($profiledata['user_custom_title']) ) ? $profiledata['user_custom_title'] : $ranksrow[$i]['rank_title'];


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

language/lang_english/lang_main.php


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

//
// That's all Folks!
// -------------------------------------------------


#
#-----[ BEFORE, ADD ]------------------------------------------
#

// Custom Title Mod
$lang['Custom_Title'] = 'Custom Title';


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

templates/subSilver/admin/user_edit_body.tpl


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

<td class="row1"><span class="gen">{L_SIGNATURE}</span><br />
<span class="gensmall">{L_SIGNATURE_EXPLAIN}<br />
<br />
{HTML_STATUS}<br />
{BBCODE_STATUS}<br />
{SMILIES_STATUS}</span></td>
<td class="row2">
<textarea name="signature" rows="6" cols="45">{SIGNATURE}</textarea>
</td>
</tr>


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

<tr>
<td class="row1"><span class="gen">{L_CUSTOM_TITLE}</span></td>
<td class="row2"><input type="text" name="user_custom_title" value="{CUSTOM_TITLE}" maxlength="25" /></td>
</tr>


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

templates/subSilver/profile_add_body.tpl


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

<tr>
<td class="row1" width="38%"><span class="gen">{L_USERNAME}: *</span></td>
<td class="row2"><input type="text" class="post" style="width:200px" name="username" size="25" maxlength="40" value="{USERNAME}" /></td>
</tr>


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

<tr>
<td class="row1" width="38%"><span class="gen">{L_CUSTOM_TITLE}:</span></td>
<td class="row2"><input type="text" class="post" style="width:200px" name="user_custom_title" size="25" maxlength="25" value="{CUSTOM_TITLE}" /></td>
</tr>


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

viewtopic.php


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

$sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid


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

, u.user_custom_title


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

else if ( $postrow[$i]['user_rank'] )
{
for($j = 0; $j < count($ranksrow); $j++)
{


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

// Custom Title Mod
if ( !empty($postrow[$i]['user_custom_title']) )
{
$poster_rank = $postrow[$i]['user_custom_title'];
break;
}


#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Find all posts by TheosEleosView user's profileSend private message
TheosEleos
Private
Private


Joined: Jul 28, 2003
Posts: 38


PostPosted: Fri Oct 24, 2003 4:28 pm Reply with quoteBack to top

Please help? Someone?

_________________
www.phenylshouse.com
phpNuke 6.9 Site
Find all posts by TheosEleosView user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.193 Seconds - 190 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::