Wenn man den folgenden Code wie vorgegeben einbaut wird am Forum angezeigt wenn ein User in einem Forum aktiv ist oder mindestens ein Aktiver und dann auch Gäste aber nie Gäste alleine......
Was klar ist da sich ja die Abfrage auf eingeloggte bezieht ( if( count($onlinerow[$forum_id]) > '0' ) )
Code: Alles auswählen
if( count($onlinerow[$forum_id]) > '0' )
{
$users_total_guests = count($guests_active[$forum_id]);
$l_guests_total = ( $users_total_guests != '0' ) ? (( $users_total_guests == '1' ) ? $lang['Forum_one_guest_active'] : $lang['Forum_more_guests_active']) : '';
}
else
{
$users_total_guests = ' ';
$l_guests_total = '';
}
if( count($onlinerow[$forum_id]) > '0' )
{
$users_total = count($onlinerow[$forum_id]);
$users_total_hidden = count($logged_hidden_active[$forum_id]);
$users_active = implode(', ', $onlinerow[$forum_id]);
$l_active_total = ( $users_total == '1' ) ? $lang['Forum_one_active'] : $lang['Forum_more_active'];
$l_hidden_total = ( ($users_total_hidden != '0' ) ? ( $userdata['user_level'] == ADMIN ) ? '' : (( $users_total_hidden == '1' ) ? $lang['Forum_one_hidden_active'] : $lang['Forum_more_hidden_active']) : '');
}
else
{
$users_total = ' ';
$users_total_hidden = ' ';
$users_active = ' ';
$l_active_total = $lang['Forum_no_active'];
$l_hidden_total = '';
}
$template->assign_block_vars('catrow.forumrow', array(
'ACTIVE' => $users_active,
'ACTIVE_TOTAL' => sprintf($l_active_total, ($users_total+$users_total_guests)),
'ACTIVE_INFO' => sprintf($l_hidden_total, $users_total_hidden).sprintf($l_guests_total, $users_total_guests),
werden auch Gäste alleine angezeigt aber ohne den Vorsatz ( User im Forum aktiv ) es erscheint nur ( 1 Gast )if( count($guests_active[$forum_id]) > '0' )
{
$users_total_guests = count($guests_active[$forum_id]);
$l_guests_total = ( $users_total_guests != '0' ) ? (( $users_total_guests == '1' ) ? $lang['Forum_guest_active'] : $lang['Forum_guests_active']) : '';
}
else
{
$users_total_guests = ' ';
$l_guests_total = '';
}
Wie bekommt man das als eigenständige Abfrage vor den ersten Code
Beispiel:
Abfrage------- if( count($guests_active[$forum_id]) > '0' ) sonst--- if( count($onlinerow[$forum_id]) > '0' )
Ich hoffe ich habe es verständlich erklärt und jemand weiss abhilfe !!
Meine PHP Kentnisse reichen dafür LEIDER nicht aus...........
Gruß
Red Benz