Seite 1 von 1

( erledigt ) Wer ist in welchem Forum aktiv ( lösung ? )

Verfasst: 21.10.2006 13:29
von Red-Benz
Zu dem seit Jahren ungelösten Problem in dem Mod - Wer ist in welchem Forum aktiv - von Acid

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),
Wenn man nun den Teil ändert ( Rot markiertes )
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 = '';
}
werden auch Gäste alleine angezeigt aber ohne den Vorsatz ( User im Forum aktiv ) es erscheint nur ( 1 Gast )

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

Verfasst: 22.10.2006 20:57
von Red-Benz
SCHIEB

Kann sich der Sache nicht mal Jemand annehmen ??

Dieses Problem wird seit ca 4 Jahren diskutiert, es kann doch nicht sein das wo die Lösung so nahe liegt sich der Sache niemand annimmt !!

Ich habe ja im Prinzip raus was geändet werden muß nur bekomme ich das mit dem PHP Code schreiben nicht gebacken..............

BITTE BITTE mal Hilfe.......... DANKE !!

Gruß

Red Benz

Verfasst: 25.10.2006 22:37
von Red-Benz
Erfolgreich erledigt, funktioniert absolut Fehlerfrei !!!!!!


ICH DANKE MIR :roll:


Gruß

Red Benz