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: 8372
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.
_________________________
StogieSmokers.com

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 Moderator Offline
Enthusiast

Registered: 11/08/03
Posts: 442
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 Administrator Online   shocked
Wizard

Registered: 01/10/00
Posts: 5134
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 Owner

Top


Moderator:  sirdude 
Who's Online
0 registered (), 22 Guests and 11 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Wisdom needed
by Gizmo
Yesterday at 10:54 AM
How to hide sub forums from summary page
by blaaskaak
12/03/08 09:54 AM
Spell Check [beta]
by Bill B
12/01/08 09:16 PM
PhotoPost BB Code Popup
by AllenAyres
12/01/08 09:41 AM
Problems reading a lot of old posts here
by AllenAyres
12/01/08 09:35 AM
Forum 'Trader Ratings'.
by AllenAyres
12/01/08 09:33 AM
Customization needed
by Gizmo
11/12/08 12:28 PM
New Mods
User Authentication Class
by
01/19/07 02:59 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
PhotoPost BB Code Popup
by
11/06/06 05:43 PM
Spell Check [beta]
by
10/17/06 09:24 PM
Newest Members
Truth, David DelMonte, nick1, Begbie, cenk
13364 Registered Users
Top Posters
AllenAyres 25452
JoshPet 11330
Rick 8372
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438

 

 

 
fusionbb message board php hacks