Nochmal Hallole,
es wäre natürlich schön gewesen, wenn ich das schon fertig bekommen hätte

, aber ich hab es mir mal so vor gestellt:
includes/functions.php
Code: Alles auswählen
function getAMChatInterface() {
static $ajaxAMChat;
if(!$ajaxAMChat) {
// URL to the chat directory:
if(!defined('AJAX_AMCHAT_URL')) {
define('AJAX_AMCHAT_URL', './adminChat/');
}
// Path to the chat directory:
if(!defined('AJAX_AMCHAT_PATH')) {
define('AJAX_AMCHAT_PATH', realpath(dirname($_SERVER['SCRIPT_FILENAME']).'/adminChat').'/');
}
// Validate the path to the chat:
if(@is_file(AJAX_AMCHAT_PATH.'lib/classes.php')) {
// Include Class libraries:
require_once(AJAX_AMCHAT_PATH.'lib/classes.php');
// Initialize the chat interface:
$ajaxAMChat = new CustomAJAXAMChatInterface();
}
}
return $ajaxAMChat;
}
function getAMChatOnlineUsers() {
return ($AMchatInterface = AMgetChatInterface()) ? $AMchatInterface->AMgetOnlineUsers() : array();
}
function getAMChatOnlineUserIDs() {
return ($AMchatInterface = getAMChatInterface()) ? $AMchatInterface->AMgetOnlineUserIDs() : array();
}
und
Code: Alles auswählen
if(in_array($row['user_id'], getAMChatOnlineUserIDs()))
{
$AMuser_online_link = '<span title="* = '.strip_tags($row['username']).' is logged into the Chat">'.$user_online_link.'*</span>';
}
und
Code: Alles auswählen
'CHAT_ADM_LINK' => 'adminChat/',
'CHAT_ADM_LABEL' => 'AMChat ['.count(getAMChatOnlineUserIDs()).']',
'CHAT_ADM_TITLE' => 'Online: '.htmlentities(implode(', ', getAMChatOnlineUsers()), ENT_QUOTES, 'UTF-8'),
In template/overall_header.html
Code: Alles auswählen
<li class="icon-chat"><a href="{CHAT_ADM_LINK}" title="{CHAT_ADM_TITLE}">{CHAT_ADM_LABEL}</a></li>
Könnte das so gehn, oder muß ich in dem Chat selbst auch noch was ändern?
Gruß Wollez