Quote:
Originally Posted by anwar.abdullakh
Code:
if ($vbulletin->userinfo['usergroupid'] !== 8)
why 8??
Btw tried it and not working...i want the admin and supmods to have the permission to view the comments (usergroup id: 5,6)
|
in mas_rateapp.php find:
PHP Code:
if ($vbulletin->userinfo['usergroupid'] == 6)
{
$getratings = $db->query("
SELECT mas_r.appid, mas_r.userid, user.username, mas_r.rating, mas_r.additional_comments, mas_r.timestamp
FROM " . TABLE_PREFIX . "mas_rating mas_r
LEFT JOIN " . TABLE_PREFIX . "user AS user ON (user.userid = mas_r.userid)
WHERE appid = $appid AND timestamp > " . $rateapp['application_time'] . "
");
while ($viewrating = $db->fetch_array($getratings))
{
$rated_ago = ceil((TIMENOW - $viewrating['timestamp']) / 86400);
print_description_row('' .$viewrating['username'] . '\'s Rating Of This Application', 0, 2, 'tcat');
print_label_row('<b> Application Rating: </b>', (stripslashes($viewrating['rating'])));
print_label_row('<b> Additional Comments On The Application:', (stripslashes($viewrating['additional_comments'])));
print_label_row('<b> This Application Was Rated: </b>', '' . $rated_ago . ' days ago');
}
}
and replace with
PHP Code:
if (in_array($vbulletin->userinfo['usergroupid'], array(5,6)))
{
$getratings = $db->query("
SELECT mas_r.appid, mas_r.userid, user.username, mas_r.rating, mas_r.additional_comments, mas_r.timestamp
FROM " . TABLE_PREFIX . "mas_rating mas_r
LEFT JOIN " . TABLE_PREFIX . "user AS user ON (user.userid = mas_r.userid)
WHERE appid = $appid AND timestamp > " . $rateapp['application_time'] . "
");
while ($viewrating = $db->fetch_array($getratings))
{
$rated_ago = ceil((TIMENOW - $viewrating['timestamp']) / 86400);
print_description_row('' .$viewrating['username'] . '\'s Rating Of This Application', 0, 2, 'tcat');
print_label_row('<b> Application Rating: </b>', (stripslashes($viewrating['rating'])));
print_label_row('<b> Additional Comments On The Application:', (stripslashes($viewrating['additional_comments'])));
print_label_row('<b> This Application Was Rated: </b>', '' . $rated_ago . ' days ago');
}
}
and you should be good to go.