Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Apr 2007
Posts: 42
User
User
Offline
Joined: Apr 2007
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

Sponsored Links
Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
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
Joined: Apr 2007
Posts: 42
User
User
Offline
Joined: Apr 2007
Posts: 42
Rick, thank you so much I really appreciate it.

Thank you.
smile

Joined: Apr 2007
Posts: 42
User
User
Offline
Joined: Apr 2007
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.

Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
Joined: Nov 2003
Posts: 482
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

Sponsored Links
Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
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 - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts

Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
badfrog
badfrog
somewhere on the coast of Maine
Posts: 94
Joined: March 2007
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)