Подскажите, как можно запретить вывод Администратора в рейтинге пользователей или к примеру, выводить только определенную группу пользователей?
в файле www\components\users\frontend.php
строка примерно 270
if (!@$_SESSION['usr_online']){ $sql = "SELECT u.id as id, u.login, u.nickname, u.logdate as flogdate, u.is_deleted as is_deleted, u.birthdate, u.rating, u.status as microstatus, p.city, p.karma as karma, p.imageurl, p.gender as gender FROM cms_users u INNER JOIN cms_user_profiles p ON p.user_id = u.id WHERE u.is_locked = 0 AND u.is_deleted = 0 ORDER BY ".$orderby." ".$orderto." LIMIT ".(($page-1)*$perpage).", $perpage"; } else { $sql = "SELECT o.user_id as id, u.login, u.nickname, u.logdate as flogdate, u.is_deleted as is_deleted, u.birthdate, u.rating, u.status as microstatus, p.city, p.karma as karma, p.imageurl, p.gender as gender FROM cms_online o LEFT JOIN cms_users u ON u.id = o.user_id INNER JOIN cms_user_profiles p ON p.user_id = u.id WHERE u.is_locked = 0 AND u.is_deleted = 0 GROUP BY o.user_id ORDER BY ".$orderby." ".$orderto." LIMIT ".(($page-1)*$perpage).", $perpage"; }
if (!@$_SESSION['usr_online']){ if ($orderby == 'rating') { $sql = "SELECT u.id as id, u.login, u.nickname, u.logdate as flogdate, u.is_deleted as is_deleted, u.birthdate, u.rating, u.status as microstatus, p.city, p.karma as karma, p.imageurl, p.gender as gender FROM cms_users u INNER JOIN cms_user_profiles p ON p.user_id = u.id WHERE u.is_locked = 0 AND u.is_deleted = 0 AND u.group_id = 1 ORDER BY ".$orderby." ".$orderto." LIMIT ".(($page-1)*$perpage).", $perpage"; } else { $sql = "SELECT u.id as id, u.login, u.nickname, u.logdate as flogdate, u.is_deleted as is_deleted, u.birthdate, u.rating, u.status as microstatus, p.city, p.karma as karma, p.imageurl, p.gender as gender FROM cms_users u INNER JOIN cms_user_profiles p ON p.user_id = u.id WHERE u.is_locked = 0 AND u.is_deleted = 0 ORDER BY ".$orderby." ".$orderto." LIMIT ".(($page-1)*$perpage).", $perpage"; } } else { $sql = "SELECT o.user_id as id, u.login, u.nickname, u.logdate as flogdate, u.is_deleted as is_deleted, u.birthdate, u.rating, u.status as microstatus, p.city, p.karma as karma, p.imageurl, p.gender as gender FROM cms_online o LEFT JOIN cms_users u ON u.id = o.user_id INNER JOIN cms_user_profiles p ON p.user_id = u.id WHERE u.is_locked = 0 AND u.is_deleted = 0 GROUP BY o.user_id ORDER BY ".$orderby." ".$orderto." LIMIT ".(($page-1)*$perpage).", $perpage"; }
u.group_id = 1 это айди выводимой группы в рейтинге, какую нужно такую и поставте сами, ID группы можно помотреть в мускуле...
П.С. решение грубое но рабочее )
строка примерно 30, добавте u.group_id = 1
должно получится так
$sql = "SELECT u.id, u.login, u.nickname, u.rating as rating, u.is_deleted, p.karma as karma, p.user_id, p.imageurl, u.status FROM cms_users u LEFT JOIN cms_user_profiles p ON p.user_id = u.id WHERE u.is_deleted = 0 AND u.is_locked = 0 AND u.group_id = 1 ORDER BY ".$cfg['view_type']." DESC LIMIT ".$cfg['count'];