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.
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):
the above code copied administrator/modules/mod_status/mod_status.php
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
Post a Comment