Code: Alles auswählen
<?
function who_is_in_chat(){
// MySql Information
$user = "db_user"; // Your MySql username
$dbhost = 'localhost'; // My SQL Host
$pass = "db_password"; // Your MySql password
$db = "db_name"; // Your MySql Database
$prefix = "x7chat_"; // Your table prefix
$expire_time = 240; // The amount of seconds that users can be idle before they are considered offline
// This value is setable in the X7 Chat admin panel, you must also set it here.
// If the values do not match then the scripts may be inaccurate.
// No more editing required
mysql_connect($dbhost,$user,$pass);
mysql_select_db($db);
$exp_time = time()-$expire_time;
$q = mysql_query("DELETE FROM {$prefix}online WHERE time<'$exp_time'");
$q = mysql_query("SELECT name FROM {$prefix}online");
$results = array();
while($row = mysql_fetch_row($q))
$results[] = $row[0];
return $results;
}
function list_totals(){
return count(who_is_in_chat());
}
function list_members($sep=", "){
$online = who_is_in_chat();
return implode($sep,$online);
}
?>
Code: Alles auswählen
<?php
/**
* @ignore
*/
define('IN_PHPBB', true);
$phpbb_root_path = './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin();
$user->setup();
$auth->acl($user->data);
if ($user->data['user_id'] == ANONYMOUS)
{
login_box();
}
page_header($user->lang['CHAT']);
$template->set_filenames(array(
'body' => 'chat.html')
);
page_footer();
?>
Code: Alles auswählen
case 'report':
$location = $user->lang['REPORTING_POST'];
$location_url = append_sid("{$phpbb_root_path}index.$phpEx");
break;
Code: Alles auswählen
case 'chat':
$location = $user->lang['CHATTING'];
$location_url = append_sid("{$phpbb_root_path}chat.$phpEx");
break;
Code: Alles auswählen
// Which timezone?
$tz = ($user->data['user_id'] != ANONYMOUS) ? strval(doubleval($user->data['user_timezone'])) : strval(doubleval($config['board_timezone']));
Code: Alles auswählen
// Who is in chat?
include_once($phpbb_root_path.'whosonline.'.$phpEx);$chat_room_users_online=list_members(", ");$chat_room_online=list_totals();
if(empty($chat_room_users_online)){
$chat_room_users_online = $user->lang['CHAT_NOONE_ONLINE'];
}
Code: Alles auswählen
'U_FAQ' => append_sid("{$phpbb_root_path}faq.$phpEx"),
Code: Alles auswählen
'U_CHAT' => append_sid("{$phpbb_root_path}chat.$phpEx"),
Code: Alles auswählen
'SITE_LOGO_IMG' => $user->img('site_logo')
Code: Alles auswählen
,
'CHAT_ROOM_ONLINE' => $chat_room_online,
'CHAT_ROOM_USERS_ONLINE' => $chat_room_users_online,
'CHAT_ROOM_USERS_LABEL' => $user->lang['CHAT_ONLINE_LABEL']
Code: Alles auswählen
'CHANGING_PROFILE' => 'Ändert sein Profil',
Code: Alles auswählen
// --- X7 Chat -----------------------------
'CHAT' => 'Chat',
'CHAT_EXPLAIN' => 'Chat',
'CHATTING' => 'Ist im Chat',
'CHAT_ONLINE_LABEL' => 'Im Chat online',
'CHAT_NOONE_ONLINE' => 'Zur Zeit befinden sich keine User im Chat.',
// --- End X7 Chat -------------------------
Code: Alles auswählen
'CHANGING_PROFILE' => 'Changing profile settings',
Code: Alles auswählen
// --- X7 Chat -----------------------------
'CHAT' => 'Chat',
'CHAT_EXPLAIN' => 'Chat',
'CHATTING' => 'Is in Chat',
'CHAT_ONLINE_LABEL' => 'In Chat online',
'CHAT_NOONE_ONLINE' => 'Currently there are no users online in Chat.',
// --- End X7 Chat -------------------------
Code: Alles auswählen
<!-- IF LEGEND --><br /><em>{L_LEGEND}: {LEGEND}</em>
Code: Alles auswählen
<br />{CHAT_ROOM_USERS_LABEL}: {CHAT_ROOM_USERS_ONLINE}
Code: Alles auswählen
<ul class="linklist rightside">
Code: Alles auswählen
<!-- IF not S_IS_BOT -->
<!-- IF S_USER_LOGGED_IN -->
<li class="icon-minichat"><a href="{U_CHAT}" target="_blank" title="{L_CHAT_EXPLAIN}">{L_CHAT} ({CHAT_ROOM_ONLINE})</a></li>
<!-- ENDIF -->
<!-- ENDIF -->
Code: Alles auswählen
<!-- INCLUDE overall_header.html -->
<iframe src="./x7chat/index.php" width="100%" height="600" FRAMEBORDER=0></iframe>
<!-- INCLUDE overall_footer.html -->
Code: Alles auswählen
.icon-bookmark, .icon-bump, .icon-subscribe, .icon-unsubscribe, .icon-pages, .icon-search
Code: Alles auswählen
, .icon-minichat
Code: Alles auswählen
.icon-search { background-image: url("{T_THEME_PATH}/images/icon_search.gif"); }
Code: Alles auswählen
.icon-minichat { background-image:
url("{T_THEME_PATH}/images/icon_mini_chat.gif"); }
Code: Alles auswählen
src="{T_THEME_PATH}/images/icon_mini_profile.gif" width="12" height="13" alt="*" /> {L_PROFILE}</a><!-- ENDIF -->
<!-- ENDIF -->
Code: Alles auswählen
<!--Flashchat Link --> <a href="./chat/flashchat.php" target="_blank"><img src="{T_THEME_PATH}/images/chat.gif" width="61" height="15" alt="Chat" /></a>
doch den Quelltext - und da erscheint nichts von dem codestückPolarco hat geschrieben:da sieht man aber ja nichts
Code: Alles auswählen
<div id="menubar">
Code: Alles auswählen
<div id="menubar">
<table width="100%" cellspacing="0">
<tr>
<td class="genmed">
<!-- IF not S_IS_BOT --><a href="{U_LOGIN_LOGOUT}"><img src="{T_THEME_PATH}/images/icon_mini_login.gif" width="12" height="13" alt="*" /> {L_LOGIN_LOGOUT}</a> <!-- ENDIF -->
<!-- IF U_RESTORE_PERMISSIONS --> <a href="{U_RESTORE_PERMISSIONS}"><img src="{T_THEME_PATH}/images/icon_mini_login.gif" width="12" height="13" alt="*" /> {L_RESTORE_PERMISSIONS}</a><!-- ENDIF -->
<!-- IF S_BOARD_DISABLED and S_USER_LOGGED_IN --> <span style="color: red;">{L_BOARD_DISABLED}</span><!-- ENDIF -->
<!-- IF not S_IS_BOT -->
<!-- IF S_USER_LOGGED_IN -->
<!-- IF S_DISPLAY_PM --> <a href="{U_PRIVATEMSGS}"><img src="{T_THEME_PATH}/images/icon_mini_message.gif" width="12" height="13" alt="*" /> {PRIVATE_MESSAGE_INFO}<!-- IF PRIVATE_MESSAGE_INFO_UNREAD -->, {PRIVATE_MESSAGE_INFO_UNREAD}<!-- ENDIF --></a><!-- ENDIF -->
<!-- ELSE --> <a href="{U_REGISTER}"><img src="{T_THEME_PATH}/images/icon_mini_register.gif" width="12" height="13" alt="*" /> {L_REGISTER}</a>
<!-- ENDIF -->
<!-- ENDIF -->
</td>
<td class="genmed" align="{S_CONTENT_FLOW_END}">
<a href="{U_FAQ}"><img src="{T_THEME_PATH}/images/icon_mini_faq.gif" width="12" height="13" alt="*" /> {L_FAQ}</a>
<!-- IF S_DISPLAY_SEARCH --> <a href="{U_SEARCH}"><img src="{T_THEME_PATH}/images/icon_mini_search.gif" width="12" height="13" alt="*" /> {L_SEARCH}</a><!-- ENDIF -->
<!-- IF not S_IS_BOT -->
<!-- IF S_DISPLAY_MEMBERLIST --> <a href="{U_MEMBERLIST}"><img src="{T_THEME_PATH}/images/icon_mini_members.gif" width="12" height="13" alt="*" /> {L_MEMBERLIST}</a><!-- ENDIF -->
<!-- IF S_USER_LOGGED_IN --> <a href="{U_PROFILE}"><img src="{T_THEME_PATH}/images/icon_mini_profile.gif" width="12" height="13" alt="*" /> {L_PROFILE}</a><!-- ENDIF -->
<!-- ENDIF -->
<!--Flashchat Link --> <a href="./chat/flashchat.php" target="_blank"><img src="{T_THEME_PATH}/images/chat.gif" width="61" height="15" alt="Chat" /></a>
</td>
</tr>
</table>
</div>
Code: Alles auswählen
<!-- IF not S_IS_BOT and S_USER_LOGGED_IN -->
<ul class="linklist leftside">
<li class="icon-ucp">
<a href="{U_PROFILE}" title="{L_PROFILE}" accesskey="u">{L_PROFILE}</a>
<!-- IF S_DISPLAY_PM --> (<a href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}</a>)<!-- ENDIF --> •
<a href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a>
<!-- IF U_RESTORE_PERMISSIONS --> •
<a href="{U_RESTORE_PERMISSIONS}">{L_RESTORE_PERMISSIONS}</a>
<!-- ENDIF -->
</li>
</ul>
<!-- ENDIF -->
<ul class="linklist rightside">
<!-- IF S_USER_LOGGED_IN --><li class-"icon=members"><a href="./chat/flashchat.php" target="_blank" img src="" title="FlashChat Login" accesskey="1">Chat</a></li><!-- ENDIF -->
<li class="icon-rules"><a href="{U_RULES}" title="{L_RULES_PAGE}">{L_RULES}</a></li>
<li class="icon-faq"><a href="{U_FAQ}" title="{L_FAQ_EXPLAIN}">{L_FAQ}</a></li>
<!-- IF not S_IS_BOT -->
<!-- IF S_DISPLAY_MEMBERLIST --><li class="icon-members"><a href="{U_MEMBERLIST}" title="{L_MEMBERLIST_EXPLAIN}">{L_MEMBERLIST}</a></li><!-- ENDIF -->
<!-- IF not S_USER_LOGGED_IN --><li class="icon-register"><a href="{U_REGISTER}">{L_REGISTER}</a></li><!-- ENDIF -->
<li class="icon-logout"><a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="l"<!-- IF S_USER_LOGGED_IN --> onclick="return logout_confirmation(); return true;"<!-- ENDIF -->>
{L_LOGIN_LOGOUT}</a></li>
<!-- ENDIF -->
<li><strong>•</strong> <a href="{U_IMPRESSUM}" title="{L_IMPRESSUM}" accesskey="l">{L_IMPRESSUM}</a></li>