- You are here:
- Main › Forum › Application Support › cBB Chat
cBB Chat Who is online?
3 posts
• Page 1 of 1
- coralyn
- Posts: 13
- Joined: Wed Mar 21, 2018 12:57 pm
Thu Mar 22, 2018 8:56 am • via Web
Hello!
Thank you so much for this awesome chat. Cheap and great! Many thanks!
phpbb: 3.2.1 / cBB Chat v1.1.3
One question: Who can i show on index, who is online in chat?
viewtopic.php?t=512&lang=en
This is outdated, i think.
Greetings from germany,
coralyn
Thank you so much for this awesome chat. Cheap and great! Many thanks!
phpbb: 3.2.1 / cBB Chat v1.1.3
One question: Who can i show on index, who is online in chat?
viewtopic.php?t=512&lang=en
This is outdated, i think.
Greetings from germany,
coralyn
- coralyn
- Posts: 13
- Joined: Wed Mar 21, 2018 12:57 pm
Thu Mar 22, 2018 2:19 pm • via Web
It works:
open / includes / functions.php
add before 'SITENAME' => $config['sitename'],
add before 'SITENAME' => $config['sitename'],
Add after Who is online (i have got this on top in my styles/myStyle/template/overall_header.html)
Example:
I have make it visible only for registered users.
Greetings
open / includes / functions.php
add before 'SITENAME' => $config['sitename'],
- Code: Select all
//Begin cbb chatters online
$chatters = '';
$sql = 'SELECT u.user_id, u.username, u.user_colour FROM[b][u] [ADD YOUR SUFFIX][/u][/b]_chat_users c, ' . USERS_TABLE . ' u
where c.user_online = 1 AND c.user_id = u.user_id';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
$chatters .= get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']) . ', ';
}
$db->sql_freeresult($result);
if ($chatters == '') {$chatters = 'Keine Mitglieder im Chat';}
else {$chatters = '<b>Im Chat:</b> </a>' . substr($chatters, 0, -2);}
// End cbb chatters online
add before 'SITENAME' => $config['sitename'],
- Code: Select all
'CHATTERS' => $chatters,
Add after Who is online (i have got this on top in my styles/myStyle/template/overall_header.html)
- Code: Select all
{CHATTERS}
Example:
- Code: Select all
<p>{SITE_DESCRIPTION}</p>
<!-- IF S_REGISTERED_USER -->Wer ist online?<br>{LOGGED_IN_USER_LIST} <br><!-- ENDIF --><!-- IF S_REGISTERED_USER -->[b][u]{CHATTERS}[/u][/b]<!-- ENDIF -->
I have make it visible only for registered users.
Greetings
- coralyn
- Posts: 13
- Joined: Wed Mar 21, 2018 12:57 pm
Mon Feb 08, 2021 8:56 am • via Web
Has anyone here found a more elegant solution?
The display is not really helpful, as often users are still displayed who are no longer in the chat (but are still displayed so in the database)...
The display is not really helpful, as often users are still displayed who are no longer in the chat (but are still displayed so in the database)...
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests
- External Links
- phpBB Official
- phpBB Official (Spanish)
- Raul Arroyo Monzo
- PasionReef
- About CaniDev
- Terms of use
- Privacy Policy
- About Us
- Contact
- © 2011-2024 CaniDev