UBB.Dev
Posted By: Dr. Zoidberg Question about Jimbo's Titles/Rank hack - 10/23/2001 7:08 AM
I installed the title and rank hack in 6.1 and it's working great, but when you click on the profile pages for the individual members, the custom ranks don't show up...it just shows the rank that is set in the control panel. How do I make it overwrite that?
Any advice?
Did you use his installation or did you do it yourself?

The reason I ask, is because 2 files were missing from the ones that needed to be changed.

I am trying to email the new installation to him to see if he will change the zip file.
Aaaaaaah! Yes, I did do the install myself. So there are files missing?? What is there to do?
Just a sec, I am going to create a .txt which lists what you have to.

I already email the complete installation cgi (with all the previous mods and the new ones) to him.

No matter which way you did it, it would not work. But since you did the mods yourself, I feel comfortable telling you the changes.

I will post them in about 1/2 hour.
OK, do these 2 things;

1) make the same changes to UBB_PROFILE.CGI that you made to UBB_LIB_POSTING.CGI

2) make the same changes to PUBLIC_DISPLAY_PROFILE.PL that you made to PUBLIC_TOPIC_PAGE.PL

That will fix you up. One different is that in UBB_PROFILE there is no Admin section, I have not setup the code for the Admin override stuff.

Hope to have it finished by end of Sunday.

[ 10-27-2001: Message edited by: John A. MacDonald ]
Great, thanks! I'll try it out tomorrow.
Did you get it to work?

If not let me know, I created a .cgi to install what was missing.

Seems to work good.
I'm trying it right now but can't find a place to start...I can't find the same files in ubb_profile.cgi as in ubb_lib_posting.cgi, so don't know what or where to add the new info. frown

What's the new cgi that you have?
Posted By: Muc Re: Question about Jimbo's Titles/Rank hack - 10/29/2001 1:51 PM
John that won't work because there aren't the identical lines to change in those two files.
Please post instructions right here.
Thanks
Here is the code:

ubb_profile.pl

Find
sub get_profile {
local (@user_profile, $user_public_name, $user_status, $count, $chompee, $date_registered, $reg_month, $reg_day, $reg_year, @themonths, @viewer_profile, $is_admin_mod, $u, $rating_line, $overall_rating, $admin_view_rating, %user, $personal_line, $personal_rating, $user_ratings_off, %votes, %totals, %avg, %weighted_avg, $pm_line, %pm_ignore, %pm_buddy, $total_votes, $add_2_list);

Add Below

use vars qw($custom_status); local($custom_status);

Find
# custom status
unless ($user_profile[31] ne '') {
$user_status = &CustomTitle($user_profile[8]);
}
else { $user_status = $user_profile[31]; }

Replace with
# get custom title
&RequireCode("$vars_config{CGIPath}/ubb_custom_status.cgi");
$user_status = &GetCustomRank($user_profile[7], $user_profile[8]);
$custom_status = &GetCustomTitle($this_user_number);
# if moderator- only list as mod if actually a mod in this forum
if (($user_profile[8] eq "Moderator") && $Moderator) {
if ($Moderator =~ /$this_user_number/) {
#$user_status = "$vars_misc{ModeratorTitle}";
} else {
$user_status = &GetStandardRank($user_profile[7], $user_profile[8]);
}
} elsif(($user_profile[8] eq "Moderator") && !$Moderator) {
$user_status = &GetStandardRank($user_profile[7], $user_profile[8]);
} # end mod check

# check to see if custom rank is overriden
$user_status = &GetOverrideRank($user_status, $u, $user_profile[7]);


in public_display_profile.pl

Find

$user_status

Add Below it



$custom_status
Quote
quote:
Thanks! I'll give this a try. But I was wondering...is that part supposed to be like that up there or should it be
?
Unsure, but in my code it is
Posted By: Muc Re: Question about Jimbo's Titles/Rank hack - 10/31/2001 12:46 AM
it's
, because you don't want it to appear within the same line as the custom title.

thanks for sharin John laugh
Posted By: Muc Re: Question about Jimbo's Titles/Rank hack - 10/31/2001 1:17 AM
Quote
quote:
first of all, I don't think you'll ever find a ubb_profile.pl in your directories laugh

it's ubb_profile.cgi, just in case somebody's wondering...

second: I don't get this workin, it won't show up. maybe some code missin ?
© UBB.Developers