MyBB Community Forums

Full Version: users online in forum (forumdisplay)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
like on index page
example : 100 user active / online

but, i want in forum
yes, although there is already a user browsing (username, amount of guest). but i need amount of 'user online'

i try to put code : $forum_viewer_text  -> (code for show amount of user browsing in each forum from index page). but not appear

thanks for response & help
Not sure what your asking but this code will display users online
<tr>
<td class="trow1">{$online_name}{$user_ip}</td>
<td align="center" class="trow2">{$online_time}</td>
<td class="trow1" width="50%">{$location}</td>
</tr>
And heres the online page code
<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->users_online}</title>
{$headerinclude}
{$refresh}
</head>
<body>
	{$header}
	{$multipage}
	<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
		<tr>
			<td class="thead" colspan="3"><strong>{$lang->users_online}</strong></td>
		</tr>
		<tr>
			<td class="tcat" align="center"><a href="online.php?sortby=username"><span class="smalltext"><strong>{$lang->on_username}</strong></span></a></td>
			<td class="tcat" align="center"><a href="online.php?sortby=time"><span class="smalltext"><strong>{$lang->time}</strong></span></a></td>
			<td class="tcat" width="50%"><a href="online.php?sortby=location"><span class="smalltext"><strong>{$lang->location}</strong></span></a></td>
		</tr>
		{$online_rows}
		<tr>
			<td class="tfoot" colspan="3" align="right"><span class="smalltext"><strong><a href="online.php?action=today">{$lang->online_today}</a> | <a href="online.php">{$lang->refresh_page}</a></strong></span></td>
		</tr>
	</table>
	<br />
	{$multipage}
	{$footer}
</body>
</html>

I hoped this helped.
(05-23-2017, 01:47 PM)Brian. Wrote: [ -> ]Not sure what your asking but this code will display users online

And heres the online page code

I hoped this helped.

that is list of who's online, i mean user online in each forum. looklike user browsing
[attachment=38887]

but i need amount of 'user online'
example : 19 users online ,  in forumdisplay page (each forum)

btw, thanks for try Wink
Easy.

Admin CP -> Configurations -> Forum Display Options

Then go down to "Users Browsing This Forum" and enable it. 


If you looking for the code go to

Admin CP -> Templates & Styles -> Templates -> 'Your Theme' -> Forum Display Templates -> forumdisplay_usersbrowsing

If you need any other support reply.
(05-23-2017, 01:36 PM)pailul Wrote: [ -> ]like on index page
example : 100 user active / online

but, i want in forum
yes, although there is already a user browsing (username, amount of guest). but i need amount of 'user online'

i try to put code : $forum_viewer_text  -> (code for show amount of user browsing in each forum from index page). but not appear

thanks for response & help

It's taken from the index_whosonline template:

{$lang->online_note}

You will need a plugin for that, it won't work on the forumdisplay pages.
(05-23-2017, 04:23 PM)Ashley1 Wrote: [ -> ]You will need a plugin for that, it won't work on the forumdisplay pages.

yes, may be just change or add some code in forumdisplay.php