Craven de Kere wrote:Try wrapping the tpl code in a user-logged in switch.
I don't remember if nested switches work, but give it a try and see.
I allready tried that, it doesn't work.
I guess I have to include it somehow in the if-phrase, but I don't know how this php-code works.
I tired it like this
Code://begin map MOD
if (($poster_from != '') && ((float)$postrow[$i]['longitude'] != 0)) {
if ( !$userdata['session_logged_in'] )
{
$template->assign_block_vars('postrow.switch_map', array(
'U_MAP' => append_sid("map.$phpEx?highlight=".$postrow[$i]['user_id'])
));
}
}
else {
$template->assign_block_vars('postrow.switch_no_map', array());
}
//end map MOD
and like this
Code://begin map MOD
if ((!$userdata['session_logged_in']) && ($poster_from != '') && ((float)$postrow[$i]['longitude'] != 0)) {
$template->assign_block_vars('postrow.switch_map', array(
'U_MAP' => append_sid("map.$phpEx?highlight=".$postrow[$i]['user_id'])
));
}
else {
$template->assign_block_vars('postrow.switch_no_map', array());
}
//end map MOD
Nothing works.