zmieniasz tylko warunek tego switcha ktory juz masz. jesli dales reklame po 1. poscie i obecnie masz taki kod w php :
Kod:
if ($i == 0)
{
$template->assign_block_vars('postrow.google',array(
'POST_DATE' => create_date($board_config['default_dateformat'], time(), $board_config['board_timezone']))
);
}
to wykonaj taki 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 ]---
#
viewtopic.php
#
#---[ FIND ]---
#
if ($i == 0)
{
$template->assign_block_vars('postrow.google',array(
'POST_DATE' => create_date($board_config['default_dateformat'], time(), $board_config['board_timezone']))
);
}
#
#---[REPLACE WITH ]---
#
if ($i == 0 && !is_in_group('ID_GRUPY') )
{
$template->assign_block_vars('postrow.google',array(
'POST_DATE' => create_date($board_config['default_dateformat'], time(), $board_config['board_timezone']))
);
}
oczywiscie w miejcse ID_GRUPY wstawiasz ID grupy ktorej ma sie nie wyswietlac. jesli juz dodales funkcje
is_in_group(), to pomin ta czesc kodu i tylko zmien warunek. na jednym switchu
Autor postu otrzymał pochwałę