php forum
php mysql forum
php mysql smarty
 
Topic Options
#314037 - 05/05/07 09:34 PM Allowing members to turn off their ratings
willing Offline
User

Registered: 04/17/07
Posts: 42
I really need some help.
We have recently moved from classic to threads and generally really like it.

1 thing is causing a bit of a problem though..... a small number of our long-time members really really do not like other members being able to rate them, and for those ratings to be public. I am not questioning whether I agree with their dislike, but I do know that we really do want to be able to allow our members to turn their ratings off (ie. for them not to be displayed in public).

Whether other members can rate them is not the big issue here, and while it would be good to turn that off as well, the main thing is for any individual member to be able to set it so that their rating is now shown in public.

Even a simple modification that lets us (admin) specify a user member in the code so that it does not appear for that member would be fine.

Can anyone help?

Thank you

Top
#314039 - 05/07/07 10:06 PM Re: Allowing members to turn off their ratings [Re: willing]
Rick Offline
Guru

Registered: 05/11/99
Posts: 8373
Loc: Olympia, WA
To turn off the ability to rate a member you can edit the showprofile.inc.php script. Line 174 you'll see this:

if ($config['USER_RATINGS'] == "1") {

Just change that to:

if (($config['USER_RATINGS'] == "1") && ($UNumber != '###')) {

Change, ### to the actual userid of the user in question.

To disable the display on the posts, it would probably be easiest to just clear out their current rating in the database.

UPDATE ubbt_USER_PROFILE set USER_RATING='0' where USER_ID='###'

Again, just change ### to the userid in question.
_________________________
UBB.threads Developer

Top
#314040 - 05/08/07 12:01 AM Re: Allowing members to turn off their ratings [Re: Rick]
willing Offline
User

Registered: 04/17/07
Posts: 42
Rick, thank you so much I really appreciate it.

Thank you.
smile

Top
#314041 - 05/08/07 06:50 AM Re: Allowing members to turn off their ratings [Re: willing]
willing Offline
User

Registered: 04/17/07
Posts: 42
Sorry just another question on this. If I wanted to do this for more than 1 member, how would the code be modified to? Appreciate the help.

Top
#314042 - 05/08/07 08:07 AM Re: Allowing members to turn off their ratings [Re: willing]
sirdude Offline
Enthusiast

Registered: 11/08/03
Posts: 490
Loc: SoCal
i'd use one of the custom fields, which then allows the user to turn that on/off by him/herself. then turn on this field in user settings via your admin cpanel and name it 'AllowRated' (or like that).

then just change the if to NOT be by user number, but by the custom field value. ie: 0,1 or null/whatever (prolly)

this would then allow any number of users to essentially allow the in place ratings to be applied as they permit.

the test would be then if (($config['USER_RATINGS'] == "1") && (!$user['custom_fieldx'])) { no rates } else { do rate }; <-- totally pseudo code there, so don't kill me laugh

ps: i'm doing this at WORK (shhhh don't tell anyone), so it's from memory, but if i get home and you don't have a solution, i will at least copy/paste the exact code and/or steps (that i might use) here to accomplish this .

pps: you could even go further as to allow a tri-state condition where users are of 3 minds:

0 - No rates never! (head in the sand)
1 - No one else sees my rating, but me (curious)
2 - Rate me hard baby (let 'er rip)

then to make it idiot proof in the profiles, replace the text field with a 3 state radio button (defaulted to most common) where users choose 0, 1 or 2 (with languages descriptors, of course)

wink

[humor mode on]

ppps: hehe, i just had a thought. the options could be expanded to:

0 - Nobody can see my rating and I don't wanna look (scared)
1 - Peeps can see my rating! But i wanna put a fake 5 in there (vain)
2 - Peeps can see my rating! But i wanna put a fake 0 in there (anti establishment)
3 - Peeps can see my rating! But i wanna put a fake 3 in there (lurker)
4 - Peeps can rate me, but not see! But i wanna peek (curious)
5 - Rate me hard baby! (muhaha)

[/humor] laugh
_________________________

Top
#314049 - 05/08/07 06:00 PM Re: Allowing members to turn off their ratings [Re: Rick]
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
Since I can't test it right now, it should be one of these (I'm kind of out of it, not feeling well again)

Code:
if (($config['USER_RATINGS'] == "1") && (($UNumber != '###') || ($UNumber != '###'))) {


or

Code:
if (($config['USER_RATINGS'] == "1") && ($UNumber != '###' || $UNumber != '###')) {
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top



Moderator:  sirdude 
Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks