Online Users Counter - Joomla! Forum - community, help and support


hi.

i looking way display number of online registered users without extensions.

is possible?

i can in case of registered users statistics module, think not possible show number of online users.

thanks reply.

there module in backend, not in frontend. if want display on frontend without using extension, need modify main template file (templates/template-name/index.php) include following code (you must add code want displayed):

code: select all

$db     = jfactory::getdbo();
$query = $db->getquery(true)
   ->select('count(session_id)')
   ->from('#__session')
   ->where('guest = 0 , client_id = 0');
$db->setquery($query);
$online_num = (int) $db->loadresult();
echo('users online: '.$online_num);


the above code copied administrator/modules/mod_status/mod_status.php





Comments

Popular posts from this blog

Upgrade 3.4.8 to 3.5.1 failed "download package failed" - Joomla! Forum - community, help and support

Joomal 3.6.3 update error - PHP temporary folder is not set - Joomla! Forum - community, help and support

Fatal error during instalation - Joomla! Forum - community, help and support