#57333
02/18/2004 9:31 PM
|
Joined: Sep 2000
Posts: 221
Member
|
Member
Joined: Sep 2000
Posts: 221 |
I'm looking for a hack that can add a 2nd custom title field under the members name. Unlike the custom user title, this 2nd field would only be edit-able by the admin in the CP. I want to be able to designate certain members with special text under their name. But at the same time I want regular members to be able to change their custom title. Right now I have custom titles turned off. I have a request thread where people can ask for a custom title and the admin puts it up manually. The users can't change their own title, and this prevents them from putting "Community Supporter," in their custom title field, a designation I manually put in only for users who donate money to the site. So basically, I want the members to be able to edit their custom title field. But I want a SECOND field edit-able only by the admin in the CP so I can list certain members as "community supporters." See what I mean?  Anyone up the challenge of making this happen?
This is the designed behavior.
|
|
|
#57334
02/22/2004 6:35 PM
|
Joined: Sep 2000
Posts: 221
Member
|
Member
Joined: Sep 2000
Posts: 221 |
This is the designed behavior.
|
|
|
#57335
02/22/2004 7:36 PM
|
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
|
Admin Emeritus
Joined: Jan 2000
Posts: 5,073 |
Mmm. This should be pretty easy in 6.7, which is what I assume you're using? 
UBB.classic: Love it or hate it, it was mine.
|
|
|
#57336
02/25/2004 2:53 AM
|
Joined: Sep 2000
Posts: 221
Member
|
Member
Joined: Sep 2000
Posts: 221 |
Of course. 
This is the designed behavior.
|
|
|
#57337
03/10/2004 2:19 AM
|
Joined: May 2001
Posts: 794
Content Queen
|
Content Queen
Joined: May 2001
Posts: 794 |
Originally posted by Charles Capps: Mmm. This should be pretty easy in 6.7, which is what I assume you're using? Has anyone given this further thought? With my 6.5 UBB.classic boards and versions below that, I have used the Custom User Title/Rank hack by Jimbo/Qasic ... and I was kinda resigned to give it up for my upgrade to 6.7 because I just don't know enough about the control panel and the code to figure out how to implement it ... I also thought, I can still do "ranks" and "titles" with the new version--it'll just take some work on my part. But then I realized that the Custom Title field overrides the User Titles that would be based on the # of posts one makes. So my question is this: how difficult would it be to be able to have both? And is there anyone out there who is willing and talented enough to write the mod for it?! You'd have the eternal thanks of my community (and ME!) 
Sue adwoff.com
|
|
|
#57338
03/10/2004 6:13 PM
|
Joined: Sep 2000
Posts: 221
Member
|
Member
Joined: Sep 2000
Posts: 221 |
Eh, this isn't totally related to what I'm suggesting. As I don't care about the functionality of the RANK. I just want two custom user title fields, one that can be defined by the members, one that can be defined by me.
This is the designed behavior.
|
|
|
#57339
03/10/2004 8:20 PM
|
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
|
Admin Emeritus
Joined: Jan 2000
Posts: 5,073 |
The joys of topics that I let slip off the radar... Totally untested code here, so this might not work perfectly the first time... cp2_editprofile.pl. Find: Add UNDER: my $pref_hash = &unflatten_hash($profile[42]); Find: Add ABOVE: { type => "text", title => "Second Title", value => $pref_hash->{"second_title"}, name => "second_title", }, Now in cp2_membermanage.cgi, find: next if $key eq "title"; next if $key eq "user_notes"; Add UNDER: next if $key eq "second_title"; Find: # User notes $profile->[41] = &ConvertReturns($core->{user_notes}); Add UNDER: my $prefs_hash = &unflatten_hash($profile->[42]); $prefs_hash->{"second_title"} = $in{second_title}; $profile->[42] = &flatten_hash($prefs_hash); Now, to make it show up. ubb_lib_posting.cgi, find: $user_status = $user_profile[31]; } # end if Add BELOW: my $prefs_hash = &unflatten_hash($user_profile[42]); if($prefs_hash->{"second_title"}) { $user_status = qq~$prefs_hash->{"second_title"} $user_status~; } # end if If you want the second status below the normal status instead of above the normal status, just switch them in the assignment above. Again, this is totally untested code. Good luck.. Now... having both a custom user title AND a user title based on post count isn't really too hard... just as long as you only really care about it when it's inside a topic... let me know if you really want that, Sue. 
UBB.classic: Love it or hate it, it was mine.
|
|
|
#57340
03/10/2004 11:46 PM
|
Joined: Sep 2000
Posts: 221
Member
|
Member
Joined: Sep 2000
Posts: 221 |
Charles, wow, thank you so much. It works great. I just had to make one change. my $prefs_hash = &unflatten_hash($profile->[42]) $prefs_hash->{"second_title"} = $in{second_title}; $profile->[42] = &flatten_hash($prefs_hash); Add a semicolon after the first line. Oh and there's one slight, slight problem. I can't seem to use HTML in the field, how can I fix this?
This is the designed behavior.
|
|
|
#57341
03/11/2004 12:24 AM
|
Joined: May 2001
Posts: 794
Content Queen
|
Content Queen
Joined: May 2001
Posts: 794 |
Charles, thanks so much for giving this a shot ... I'd really love it if we could have a custom title that is something my community members request AND a user title based on post count ... if this could be doable, I'd be most appreciative. 
Sue adwoff.com
|
|
|
#57342
03/12/2004 1:54 PM
|
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
|
Admin Emeritus
Joined: Jan 2000
Posts: 5,073 |
Ooooh. HTML? No clue. I'll need to actually install this and figure out where things are getting neutralized. Sue... could you post a new topic for that? Don't wanna clutter this one up too much. 
UBB.classic: Love it or hate it, it was mine.
|
|
|
#57343
03/12/2004 3:25 PM
|
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
|
Admin Emeritus
Joined: Jan 2000
Posts: 5,073 |
OKay, the fix. cp2_membermanage.cgi, find: next if $key eq "title"; next if $key eq "user_notes"; Add UNDER: next if $key eq "second_title"; Instructions above altered accordingly.
UBB.classic: Love it or hate it, it was mine.
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 417
Joined: November 2001
|
|
Forums63
Topics37,575
Posts293,930
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|