Habs selber hinbekommen .. die chatspot_front kopieren und unter status.php abspeichern ..
Diesen Code nehmen ,,
Code: Alles auswählen
<?php
/***************************************************************************
* chatspot_front.php
* -------------------
* last updated : July 3rd, 2005
* email : kaniaz =at= ggmail.com (remove extra g),
* techboy =at= ffsmail.net (remove extra f).
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
/* **[DESCRIPTION]*********************************************************************************************************
- called by the forum's index.php file
- simply polls all the current chatters from phpBBChatSpot's session list; invisible and dead sessions will not be
returned
- deletion of ghosts is now performed by phpBBChatSpot upon joining rooms
************************************************************************************************************************ */
define('IN_PHPBB', true);
$phpbb_root_path = './';
$phpEx = "php";
error_reporting(E_ERROR | E_WARNING | E_PARSE);
set_magic_quotes_runtime(0);
include_once( $phpbb_root_path . 'config.' . $phpEx );
include_once( $phpbb_root_path . 'chatspot/chatspot_config.' . $phpEx );
$table_chatspot_sessions_name = $table_prefix . 'chatspot_sessions';
$expire_time = time() - $chatspot_config[ 'hide_in_list_time' ];
$sql = "SELECT DISTINCT user_id, username FROM " . $table_chatspot_sessions_name . "
WHERE last_active >= '" . $expire_time . "' AND
mode = " . NORMAL . "
ORDER BY username ASC";
if( $result = $db->sql_query( $sql ) )
{
$num_users_in_chat = $db->sql_numrows( $result ); // return this
$users_in_chat_clean = '';
$users_in_chat = '';
while( $row = $db->sql_fetchrow( $result ) )
{
// if( strstr( $online_userlist, $row[ 'username' ] ) ) // invisible users will not be shown, nor will dead sessions
// {
// $users_in_chat .= $row[ 'username' ] . ", ";
$chatper = $row['user_id'];
$chat_arr = get_userdata($chatper);
if($chat_arr['user_level'] == ADMIN){
$chatclass = "style=\"color:#FFA34F\"";
} elseif($chat_arr['user_level'] == MOD){
$chatclass = "style=\"color:#006600\"";
}else{
$chatclass = '';
}
$users_in_chat_clean .= $row['username'] . ", ";
$chatprolink = append_sid('/testing/phpBB2/profile.php?mode=viewprofile&u=' . $row['user_id']);
$chatusername = "<A HREF=\"$chatprolink\" $chatclass>".$row['username']."</A>";
$users_in_chat .= $chatusername . ", ";
// }
// else // but if a dead session is passed, make sure the user count gets one taken off.
// {
// $num_users_in_chat--;
// }
}
$users_in_chat = rtrim( $users_in_chat, ", " ); // return this
$users_in_chat_clean = rtrim( $users_in_chat_clean, ", " );
$db->sql_freeresult( $result );
echo' '.$num_users_in_chat.' User im Chat';
}
?>
Und dann per include in test2.php gepackt
Anschließend in unsere
www.homaer.com/board/status1.php .. läuft super