Hello,
Can someone tell me the snippit of code I need to just show users online now on a custom page of mine (login page).
Thanks!
is this what ur looking for {$lang->whos_online} ?
Sorry, I meant to show the number of users online.
So when people come across my index page, they know already how many people are online.
You want just number or complete list of online users ?
Yes, all users which includes members, search engine bots and guests all added.
Eg: Google, Knerba, Yaldaram, Yahoo!, Baidu, Guest, Guest
Which it would just says... 7 people online.
the number of people online is already available at the
Board Statistics on
index page
Quote:261 users active in the past 15 minutes (33 members, 5 of whom are invisible, and 224 guests)
do you need a custom page for it !?
I have made a custom index page with login etc and would like to add this snippet to my custom page.
^ well, the required code needs to be taken from the original index.php file ; see below example
<?php
define("IN_MYBB", 1);
require_once ('/global.php');
require_once ('/index.php');
echo $whosonline;
?>
Tried that, doesn't seem to show anything.
^ have you included original index.php with correct path ? it has worked for me ..
require_once ('/index.php');