po kolei.
1. stworz grupe ktorej maja sie nie wyswietlac reklamy
2. zapamietaj jakie ma id
3. kod :
Kod:
#
#---[ OPEN ]---
#
includes/functions.php
#
#---[ FIND ]---
#
?>
#
#---[ BEFORE ADD ]---
#
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;
}
#
#---[ OPEN ]---
#
includes/page_header.php
#
#---[ FIND ]---
#
//
// Login box?
//
#
#---[ BEFORE ADD ]---
#
if ( !is_in_group('ID_GRUPY') )
{
$template->assign_block_vars('premium_acount', array());
}
4. uzywasz switcha tak jak napisales (premium_acount). kazdy kto wejdzie na forum i nie bedzie w grupie bedzie widzial to co jest zawarte w tym switchu
Autor postu otrzymał pochwałę
Daj biedakowi rybę, a zje ją i będzie głodny. Daj biedakowi wędkę, a sam sobie bedzie łowił ryby!