w function.php na końcu jeśli nie masz dodaj
Kod:
function is_in_group($group_id)
{
global $db,$userdata;
$sql = "SELECT u.user_id FROM " . USER_GROUP_TABLE . " ug, " . USERS_TABLE . " u, " . GROUPS_TABLE . " g WHERE u.user_id = ".$userdata['user_id']." AND ug.user_id = u.user_id AND g.group_id = ". $group_id ." AND g.group_id = ug.group_id AND g.group_single_user = 0";
$result = $db->sql_query($sql);
if( !$result )
{
message_die(GENERAL_ERROR, "Opis błędu", "", __LINE__, __FILE__, $sql);
}
$test_data = $db->sql_fetchrow($result);
return ($test_data['user_id'])?1:0;
}
w shoutbox_view.php
znajdź
Kod:
init_userprefs($userdata);
potem dodaj
Kod:
if(is_in_group(XX)) $auth_shout = true;
else $auth_shout = false;
gdzie XX wstaw id grupy
CZTERY razy znajdź i zmień
Kod:
if ( $userdata['user_level'] == MOD || $userdata['user_level'] == ADMIN )
na
Kod:
if ( $auth_shout )
Autor postu otrzymał pochwałę
AIFM [1%] - kiedyś powstanie