[2.0.6] Custom Title MOD

The cleanup is complete. This forum is now read only.
skxxl311
Registered User
Posts: 1
Joined: Fri Jul 08, 2005 10:17 pm

Post by skxxl311 »

i just installed this mod on my forum with easymod and get the following error when i try to go to a topic

Parse error: parse error, unexpected ',' in /home2/skxxl311/public_html/forum/viewtopic.php on line 387

van_Gogh
Registered User
Posts: 19
Joined: Tue Feb 10, 2004 12:55 am

Post by van_Gogh »

@Philipos:
As far as i can see, the problem is here:

Code: Select all

$sql = "UPDATE " . USERS_TABLE . " 
            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_custom_title = '" . str_replace("\'", "''", $custom_title) . "',  . "',, user_sig = '" . str_replace("\'", "''", $signature) . "',
The . "', appearance twice here seems strange.
But i'm currently on the road... If you could wait till sunday morning, i'm back home and will take a look at my file and can give you a concrete answer.

(PS: My mind says it should be: $custom_title) . "', user_sig
but no guarantee!! As said, i'm back on sunday)

nba1341
Registered User
Posts: 46
Joined: Sun Mar 13, 2005 1:07 pm

Post by nba1341 »

i still dont think i have recieved an answer what code do i use to make the custom ranks colorful

Elite_Insane
Registered User
Posts: 3
Joined: Sat Jul 09, 2005 11:30 am

Problems

Post by Elite_Insane »

Code: Select all

Could not obtain post/user information.

DEBUG MODE

SQL Error : 1054 Unknown column 'u.user_custom_title' in 'field list'

SELECT u.username, u.user_id, u.user_posts, u.user_custom_title, 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 FROM phpbb_posts p, phpbb_users u, phpbb_posts_text pt WHERE p.topic_id = 2 AND pt.post_id = p.post_id AND u.user_id = p.poster_id ORDER BY p.post_time ASC LIMIT 0, 15

Line : 398
File : viewtopic.php

This happens eveytime i try to view a topic, also when i configure the custom avatar seeting from ACP it doesnt stay, just does nothing

rewrecked
Registered User
Posts: 18
Joined: Tue May 24, 2005 2:16 am
Location: NEUK
Contact:

Post by rewrecked »

skxxl311 wrote: i just installed this mod on my forum with easymod and get the following error when i try to go to a topic

Parse error: parse error, unexpected ',' in /home2/skxxl311/public_html/forum/viewtopic.php on line 387


hey, i had the same error an entry is put in the wrong place
on line 389 the bad code looked like this (i have a few extras here which probably won't be the same as yours)

Code: Select all

// Go ahead and pull all data for this topic
 u.user_custom_title,//
$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_jabber, u.user_viewemail, u.user_rank, u.user_rank2, u.user_rank3, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile, u.user_allow_viewonline, u.user_session_time, p.*,  pt.post_text, pt.post_subject, pt.bbcode_uid
it's that u.user_custom_title,
it wants to be after u.username,

Code: Select all

// Go ahead and pull all data for this topic
//
$sql = "SELECT u.username, u.user_custom_title, u.user_id, u.user_posts, ...

van_Gogh
Registered User
Posts: 19
Joined: Tue Feb 10, 2004 12:55 am

Post by van_Gogh »

@Philipos:
As i thought, the problem was in the following edit (or perhaps your file was damaged from some actions before:

Code: Select all

# 
#-----[ FIND ]------------------------------------------ 
# 
$sql = "UPDATE " . USERS_TABLE 
SET 
# 
#-----[ IN-LINE FIND ]------------------------------------------ 
# 
user_interests = '" . str_replace("\'", "''", $interests) . "', 
# 
#-----[ IN-LINE AFTER, ADD ]------------------------------------------ 
# 
 user_custom_title = '" . str_replace("\'", "''", $custom_title) . "',
The right code for you should be:

Code: Select all

$sql = "UPDATE " . USERS_TABLE . " 
            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_custom_title = '" . str_replace("\'", "''", $custom_title) . "', 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 = $popup_pm, 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 . " 
            WHERE user_id = $user_id";

@Elite_Insane:
You probably forgot to update your db.
Upload the included titel_install.php to the same place where your phpBB's viewtopic.php is. Then, for instance, if your forums are at http://www.yoursite.com/forums/, then you need to go to http://www.yoursite.com/forums/title_install.php with your browser.
You should get some information about the db update. After everything went fine, delete the file title_install.php!


@nba1341:
Your question was answered just one page before! Please look a bit around...
<strong><FONT color=>{CUSTOM_TITLE}</FONT></strong>
<strong><FONT color=>{{postrow.CUSTOM_TITLE}</FONT></strong>

Elite_Insane
Registered User
Posts: 3
Joined: Sat Jul 09, 2005 11:30 am

Post by Elite_Insane »

Thanks man! that worked

txclark
Registered User
Posts: 67
Joined: Wed Oct 13, 2004 11:42 am
Location: Austin
Contact:

Post by txclark »

Everything 'seems' to be working except, when I go to edit profile it does not show the users current 'custom title' It'll always be blank.

What's the fix :)

(although it will show it from the admin control panel)

DaveSmooth
Registered User
Posts: 69
Joined: Mon Jul 11, 2005 11:24 pm
Contact:

Post by DaveSmooth »

Well, I installed it with no errors that I saw, but I don't see it anywhere in my ACP. Should it be in ranks? Nothing. Of course, my ranks don't work anyway and thats why I was hoping to use this. Any thoughts?

This is copied from my EasyMod History:

MOD Title: Custom Title MOD 1.0.2 custom_title.txt
Description: Adds a custom title field to a user's profile, and displays it next to their posts and in their profile. Can be configured to only activate after a certain number of days and/or posts. A custom title can also be manually activated or disabled by an administrator.
Author: Aexoden gerek@softhome.net Jason Lynch http://www.aexoden.com
Installed: Tue Jul 12, 2005 5:16 pm
phpBB ver: 2.0.15
Processed Themes: subSilver; FSClean
Processed Languages: english
Files Edited: 19
Database Alterations: Tables Added: 0 Tables Altered: 0 Rows Added: 0

Since there are no db alterations, I am assuming it didn't work.

I stand corrected. I did find the Custom stuff in my profile and in my users profiles through User Management. So, can I control if this is accessible by my users? And how?

txclark
Registered User
Posts: 67
Joined: Wed Oct 13, 2004 11:42 am
Location: Austin
Contact:

Post by txclark »

check the Configuration section in the ACP.

txclark
Registered User
Posts: 67
Joined: Wed Oct 13, 2004 11:42 am
Location: Austin
Contact:

Post by txclark »

still need some feedback for my issue posted above as well.

I've spent 4 hours looking over all of this thread as well as double & triple checking all my editing. No luck. I see quite a few people posted the same problem though, just didn't see a solution. :(

My settings are- "Replace rank only"
0 registered days & 0 minimum posts.

With this everything seems to work fine EXCEPT when users go to edit their profile the Custom Title box is always blank. It does work fine in the ACP though.

DaveSmooth
Registered User
Posts: 69
Joined: Mon Jul 11, 2005 11:24 pm
Contact:

Post by DaveSmooth »

OK...so I found all the Configuration and seems to work. You can create Custom Titles now. However, when clicking a users name in a post, you get this link:

Code: Select all

javascript:emoticon('[b]username[/b], ')
Yet, if you click the users name on the front page where it show whos online, on in a forum where it shows who is in that forum, no problem, it goes to the users profile.

OK...upon further investigation. When you are viewing a post, the users custom title is not there. When you click on their profile from the front page, the custom title is there, but defintely appears bold...probably having something to do with the above mentioned code. Thought I would add that as I learn more.

txclark
Registered User
Posts: 67
Joined: Wed Oct 13, 2004 11:42 am
Location: Austin
Contact:

Post by txclark »

okie dokie, I finally figured out the issue i was having.

in- includes/usercp_register.php:

Code: Select all

$template->assign_vars(array(
		'USERNAME' => $username,
		'CUR_PASSWORD' => $cur_password,
		'NEW_PASSWORD' => $new_password,
		'PASSWORD_CONFIRM' => $password_confirm,
		'EMAIL' => $email,
		'CONFIRM_IMG' => $confirm_image, 
		'YIM' => $yim,
		'ICQ' => $icq,
		'MSN' => $msn,
		'AIM' => $aim,
		'OCCUPATION' => $occupation,
		'INTERESTS' => $interests,
'CUSTOM_TITLE' => $custom_title,
		'LOCATION' => $location,
		'WEBSITE' => $website,
I added- 'CUSTOM_TITLE' => $custom_title,

Now it shows the users custom title text when they go to edit their profile. I knew it had to be something simple. :wink:

DaveSmooth
Registered User
Posts: 69
Joined: Mon Jul 11, 2005 11:24 pm
Contact:

Post by DaveSmooth »

DaveSmooth wrote: OK...so I found all the Configuration and seems to work. You can create Custom Titles now. However, when clicking a users name in a post, you get this link:

Code: Select all

javascript:emoticon('[b]username[/b], ')
Yet, if you click the users name on the front page where it show whos online, on in a forum where it shows who is in that forum, no problem, it goes to the users profile.

OK...upon further investigation. When you are viewing a post, the users custom title is not there. When you click on their profile from the front page, the custom title is there, but defintely appears bold...probably having something to do with the above mentioned code. Thought I would add that as I learn more.



So nobody has experienced this? Wow. Well, hopefully someone can still try and help me with a solution. Although, I think at this point removing the mod might be the solution. Anybody know what it affected when it installed and what has to be done to remove it??

van_Gogh
Registered User
Posts: 19
Joined: Tue Feb 10, 2004 12:55 am

Post by van_Gogh »

@DaveSmooth:
When you click on their profile from the front page, the custom title is there, but defintely appears bold

that's right. As discussed on this page and some pages before, the bold titel is the default. You can edit profile_view_body.tpl and viewtopic_body.tpl so it looks like you want it to look. (For some further code see my last post).
Now to your code problem: I think you made some mistakes in editing the viewtopic.php. Perhaps also in viewtopic_body.tpl but i think it must be the php-file. Recheck your modifications on this files. If you can't find something wrong, recover your original files with the backups you hopefully made. then i suggest you apply the changes with the newsest easymod. if you don't want to redo all the changes and can't find something wrong, you can post your viewtopic.php here so we can take a look at it. (From Sunday on, i'm in my holidays so don't expect a answer in that time ;) )

Post Reply

Return to “[2.0.x] MOD Database Cleanup”