Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
public function canRateItem(array $item, array $viewingUser = null)
{
$this->standardizeViewingUserReference($viewingUser);
if ($item['user_id'] == $viewingUser['user_id'])
{
return false;
}
if (XenForo_Permission::hasPermission($viewingUser['permissions'], 'nfljsc', 'canRateItem'))
{
$hasRated = $this->hasRated($viewingUser['user_id'], $item['item_id']);
if ($hasRated)
{
return false;
}
return true;
}
return false;
}
public function canRateItem(array $item, array $viewingUser = null)
{
$this->standardizeViewingUserReference($viewingUser);
if (XenForo_Permission::hasPermission($viewingUser['permissions'], 'nfljsc', 'canRateItem'))
{
$hasRated = $this->hasRated($viewingUser['user_id'], $item['item_id']);
if ($hasRated)
{
return false;
}
return true;
}
return false;
}
Thanks, the thought of it from my perspective would be I think the owner should have a say in what he thinks the item should be rated as(in his/her opinion). Thanks for the fix though
I actually made it so that Item Owners are able to rate their own Item but others cant (in case of wanting to do review style rating).
Two permissions now drive the system:
Rate Items
Rate Own Item
If Rate Items is set to no and Rate Own Item is set to Allow, then the Item Owner can rate the item once.
If Rate Items is set to Allow and Rate Own Item is set to no, then members can rate, by the item owner can not.
If both are set to allow, then both the Item Owner and members can Rate the item.
If neither are set, then neither can rate.