View Full Version : Stop Users from Rating Own Links
lostcode
02-02-2009, 06:25 AM
Hello,
I think I saw this, but now I can't find it :confused:
How do we stop users from rating the links they post?
Thanks!
Brian
02-02-2009, 10:55 AM
Admin CP => vBa Links => Usergroup Permissions => Can Rate Links
lostcode
02-02-2009, 11:05 AM
Hi Brian,
Sorry, but you advised "Can Rate Links" ....
This was not my question, my question was "Can Rate Own Links"
There is quite a big difference between permission to rate links and permission to rate own links.
Brian
02-02-2009, 12:30 PM
Sorry I misread that. Currently there is not an option to prevent users from rating their own links.
lostcode
02-02-2009, 12:35 PM
Hi Brian,
No worries.
Please consider adding this option in the next release. Thanks.
We have users submitting links and immediately rating their own contibutions as 5 stars, which is not appropriate for some (our) rating systems. It is best when others rate the link, not the poster.
If it becomes a serious problem, I'll have to disable all ratings or hack the code....
Cheers.
Brian
02-02-2009, 01:02 PM
Now that I think about it, in the mean time you could prevent that with a simple pluign added to the 'vba_links_functions_savelink_rate_link' hook location.
if ($link['userid'] AND $link['userid'] == $vbulletin->userinfo['userid'])
{
$votedmsg = 'We\'re sorry, but you may not vote for your own links';
if ($vbulletin->GPC['ajax'])
{
$xml->add_tag('error', $votedmsg);
$xml->print_xml();
}
eval(standard_error($votedmsg));
}
brad2010
03-04-2009, 02:38 AM
how do i install this plugin ?
Now that I think about it, in the mean time you could prevent that with a simple pluign added to the 'vba_links_functions_savelink_rate_link' hook location.
if ($link['userid'] AND $link['userid'] == $vbulletin->userinfo['userid'])
{
$votedmsg = 'We\'re sorry, but you may not vote for your own links';
if ($vbulletin->GPC['ajax'])
{
$xml->add_tag('error', $votedmsg);
$xml->print_xml();
}
eval(standard_error($votedmsg));
}
Brian
03-04-2009, 12:13 PM
Admin CP => Plugins & Products => Add New Plugin
Product: vBadvanced Links
Hook Location: 'vba_links_functions_savelink_rate_link'
Title: {whatever}
Execution Order: 5
Plugin PHP Code: {the code above}
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.