Code: Alles auswählen
$online_userlist .= ($online_userlist != '') ? ', ' . $user_online_link : $user_online_link;
Code: Alles auswählen
$online_userlist .= ($online_userlist != '') ? ', ' . $user_online_link : $user_online_link;
Code: Alles auswählen
$online_userlist .= ($online_userlist != '') ? ', ' . $user_online_link : $user_online_link;
Code: Alles auswählen
if(in_array($row['user_id'], getChatOnlineUserIDs()))
{
$user_online_link = '<span title="* = '.strip_tags($row['username']).' is logged into the Chat">'.$user_online_link.'*</span>';
}
Code: Alles auswählen
$online_userlist .= ($online_userlist != '') ? ', ' . $user_online_link : $user_online_link;
Integrierung
*** Als erstes, das AddIn vom Autor :
(habs mal hierher übertragen)
In der Datei includes/functions.php
Füge das...
vor dem einCode: Alles auswählen
function getChatInterface() { static $ajaxChat; if(!$ajaxChat) { // URL to the chat directory: if(!defined('AJAX_CHAT_URL')) { define('AJAX_CHAT_URL', './chat/'); } // Path to the chat directory: if(!defined('AJAX_CHAT_PATH')) { define('AJAX_CHAT_PATH', realpath(dirname($_SERVER['SCRIPT_FILENAME']).'/chat').'/'); } // Validate the path to the chat: if(@is_file(AJAX_CHAT_PATH.'lib/classes.php')) { // Include Class libraries: require_once(AJAX_CHAT_PATH.'lib/classes.php'); // Initialize the chat interface: $ajaxChat = new CustomAJAXChatInterface(); } } return $ajaxChat; } function getChatOnlineUsers() { return ($chatInterface = getChatInterface()) ? $chatInterface->getOnlineUsers() : array(); } function getChatOnlineUserIDs() { return ($chatInterface = getChatInterface()) ? $chatInterface->getOnlineUserIDs() : array(); }
Code: Alles auswählen
?>
Füge das...
vor dem einCode: Alles auswählen
if(in_array($row['user_id'], getChatOnlineUserIDs())) { $user_online_link = '<span title="* = '.strip_tags($row['username']).' is logged into the Chat">'.$user_online_link.'*</span>'; }
Code: Alles auswählen
$online_userlist .= ($online_userlist != '') ? ', ' . $user_online_link : $user_online_link;
Füge das...
Anm: Bei Problemen, an fettmarkierter Stelle anpassen.'CHAT_LINK' => 'chat/',
'CHAT_LABEL' => 'Chat ['.count(getChatOnlineUserIDs()).']',
'CHAT_TITLE' => 'Online: '.htmlentities(implode(', ', getChatOnlineUsers()), ENT_QUOTES, 'UTF-8'),
Siehe dazu auch hier:
http://www.phpbb.de/viewtopic.php?p=958092#958092
nach dem ein
------------------Code: Alles auswählen
// The following assigns all _common_ variables that may be used at any point in a template. $template->assign_vars(array(
Dann (My Version)
Öffne
styles/xxxxx/template/index_body.html
für prosilver
für subsilver2<br />{LOGGED_IN_USER_LIST}<br />User im {CHAT_LABEL} - {CHAT_TITLE}
<!-- IF LEGEND --><br /><em>{L_LEGEND}: {LEGEND}</em><!-- ENDIF --></p>
Jeweils Fettmarkiertes einbauen. Dann erscheint es so, wie im Demo-Board unten: Gäste in (Klammern), Board-Member normal.<br />{LOGGED_IN_USER_LIST}<br />User im {CHAT_LABEL} - {CHAT_TITLE}</span></td>
</tr>
<!-- IF LEGEND -->
<tr>
<td class="row1"><b class="gensmall">{L_LEGEND} : {LEGEND}</b>
-----------------------------
Als Mouseover in der styles/xxxxx/template/overall_header.html (Standard) folgendermaßen.
für prosilver
für subsilver2<ul class="linklist rightside">
<li class="icon-chat"><a href="{CHAT_LINK}" title="{CHAT_TITLE}">{CHAT_LABEL}</a></li>
<li class="icon-faq"><a href="{U_FAQ}" title="{L_FAQ_EXPLAIN}">{L_FAQ}</a></li>
Wieder jeweils Fettmarkiertes einbauen. Dann erscheint es so, wie hier im Demo-Board oben.<td class="genmed" align="{S_CONTENT_FLOW_END}">
<a href="{CHAT_LINK}" title="{CHAT_TITLE}">{CHAT_LABEL}</a>
<a href="{U_FAQ}"><img src="{T_THEME_PATH}/images/icon_mini_faq.gif" width="12" height="13" alt="*" /> {L_FAQ}</a>
Code: Alles auswählen
// User is logged in and therefore not a guest
if ($row['user_id'] != ANONYMOUS)
{
if (isset($online_users['hidden_users'][$row['user_id']]))
{
$row['username'] = '<em>' . $row['username'] . '</em>';
}
if (!isset($online_users['hidden_users'][$row['user_id']]) || $auth->acl_get('u_viewonline'))
{
$user_online_link = get_username_string(($row['user_type'] <> USER_IGNORE) ? 'full' : 'no_profile', $row['user_id'], $row['username'], $row['user_colour']);
if(in_array($row['user_id'], getChatOnlineUserIDs()))
{
$user_online_link = '<span title="* = '.strip_tags($row['username']).' is logged into the Chat">'.$user_online_link.'*</span>';
}
$online_userlist .= ($online_userlist != '') ? ', ' . $user_online_link : $user_online_link;
}
}
}
$db->sql_freeresult($result);
}
Code: Alles auswählen
// The following assigns all _common_ variables that may be used at any point in a template.
$template->assign_vars(array(
'CHAT_LINK' => '../../chat/',
'CHAT_LABEL' => 'Chat ['.count(getChatOnlineUserIDs()).']',
'CHAT_TITLE' => 'Online: '.htmlentities(implode(', ', getChatOnlineUsers()), ENT_QUOTES, 'UTF-8'),
'SITENAME' => $config['sitename'],
'SITE_DESCRIPTION' => $config['site_desc'],
'PAGE_TITLE' => $page_title,
'SCRIPT_NAME' => str_replace('.' . $phpEx, '', $user->page['page_name']),
'LAST_VISIT_DATE' => sprintf($user->lang['YOU_LAST_VISIT'], $s_last_visit),
'LAST_VISIT_YOU' => $s_last_visit,
'CURRENT_TIME' => sprintf($user->lang['CURRENT_TIME'], $user->format_date(time(), false, true)),
'TOTAL_USERS_ONLINE' => $l_online_users,
'LOGGED_IN_USER_LIST' => $online_userlist,
'RECORD_USERS' => $l_online_record,
'PRIVATE_MESSAGE_INFO' => $l_privmsgs_text,
'PRIVATE_MESSAGE_INFO_UNREAD' => $l_privmsgs_text_unread,
Code: Alles auswählen
function getChatInterface() {
static $ajaxChat;
if(!$ajaxChat) {
// URL to the chat directory:
if(!defined('AJAX_CHAT_URL')) {
define('AJAX_CHAT_URL', './chat/');
}
// Path to the chat directory:
if(!defined('AJAX_CHAT_PATH')) {
define('AJAX_CHAT_PATH', realpath(dirname($_SERVER['SCRIPT_FILENAME']).'/chat').'/');
}
// Validate the path to the chat:
if(@is_file(AJAX_CHAT_PATH.'lib/classes.php')) {
// Include Class libraries:
require_once(AJAX_CHAT_PATH.'lib/classes.php');
// Initialize the chat interface:
$ajaxChat = new CustomAJAXChatInterface();
}
}
return $ajaxChat;
}
function getChatOnlineUsers() {
return ($chatInterface = getChatInterface()) ? $chatInterface->getOnlineUsers() : array();
}
function getChatOnlineUserIDs() {
return ($chatInterface = getChatInterface()) ? $chatInterface->getOnlineUserIDs() : array();
}
?>
Code: Alles auswählen
<!-- IF S_DISPLAY_ONLINE_LIST -->
<!-- IF U_VIEWONLINE --><h3><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></h3><!-- ELSE --><h3>{L_WHO_IS_ONLINE}</h3><!-- ENDIF -->
<p>{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br />{RECORD_USERS}<br />
<br />{LOGGED_IN_USER_LIST}<br />User im {CHAT_LABEL} - {CHAT_TITLE}
<!-- IF LEGEND --><br /><em>{L_LEGEND}: {LEGEND}</em><!-- ENDIF --></p>
Code: Alles auswählen
if(in_array($row['user_id'], getChatOnlineUserIDs()))
{
$user_online_link = '<span title="* = '.strip_tags($row['username']).' is logged into the Chat">'.$user_online_link.'*</span>';
}
Code: Alles auswählen
if(in_array($row[], getChatOnlineUserIDs()))
{
$user_online_link = .strip_tags($row[]). .$user_online_link.;
Code: Alles auswählen
if(in_array($row['user_id'], getChatOnlineUserIDs()))
{
$user_online_link = '<span title="* = '.strip_tags($row['username']).' is logged into the Chat">'.$user_online_link.'*</span>';
}
Code: Alles auswählen
if(in_array($row['user_id'], getChatOnlineUserIDs()))
{
$user_online_link = '<span title="* = '.strip_tags($row['username']).' is logged into the Chat">'.$user_online_link.'*</span>';
}
Code: Alles auswählen
[code=php]$code;
Code: Alles auswählen
$code;