PDA

View Full Version : Prohibit Users from Rating Own Threads.


Michael Morris
12-31-2004, 10:00 PM
This is a tiny modification that requires 1 new phrase and 1 file hack.

Search threadrate.php for this code

if (!($forumperms & CANVIEW) OR !($forumperms & CANTHREADRATE) OR (!($forumperms & CANVIEWOTHERS) AND ($threadinfo['postuserid'] != $bbuserinfo['userid'])))
{
print_no_permission();
}

Below it add

// No voting for your own threads.
if ($threadinfo['postuserid'] == $bbuserinfo['userid'])
{
eval(print_standard_error('error_cantvoteforown')) ;;
}

Create a new phrase in the standard front end error messages group and name it cantvoteforown

The text I used was "Sorry, but you can't rate your own threads."

Note that this doesn't stop folks from voting with alt accounts.

Dio
01-01-2005, 06:42 PM
Nice quick little hack!

Dan
01-01-2005, 06:42 PM
Nice mod :D

ResaleBroker
01-01-2005, 10:05 PM
Nice and Easy! Thank You!

Bad Bunny
01-01-2005, 10:53 PM
Nice and Easy! Thank You!
Hey...that is VERY practical. Thanks.

MauriceReed
01-18-2005, 11:58 PM
excellent mod there m8...installed!!

AlexanderT
01-19-2005, 06:25 AM
nice and clean!

Megareus Rex
01-19-2005, 08:24 PM
Excellent idea! This has happened at my site before (although not much, since thread rating is rarely used there :P)

Usually what happened is the threadmaker would rate it, which would lead others to do so :-/

EscortCossie
01-30-2005, 12:41 PM
Seems like a great mod, but how do you create a new phrase in the standard front end error messages group and name it cantvoteforown?

Sorry, but I'm a total noob at this :rolleyes:

EscortCossie
01-30-2005, 01:35 PM
Doh! I just found the Phrase Manager :o

Sorry

snotek
06-15-2005, 11:33 PM
I installed this on vb 3.06 just now and it's not working... I can still rate my own threads. I've tried this as an admin and a registered user.

RockForums
06-24-2005, 12:34 AM
Awesome mod, thanks :)

snotek
06-24-2005, 12:39 AM
Did it work for you? What version of VB are you on?

GSX-Racing
06-24-2005, 06:50 AM
Worked on 3.0.7 no problem.

hisco
07-19-2006, 08:02 AM
I tested it on 3.5.4 but it doesn't work. :S