How to get number of users online?

Note: no support provided in this sub-forum
Forum rules
Note: no support provided in this sub-forum
Post Reply
User avatar
Refugees
Site Admin
France
Posts: 22
Last visit: Wed Nov 20, 2024 2:23 pm

How to get number of users online?

Post by Refugees »

I need to have number of users online for statistics block in my index_body template, only the number not the whole string which is {{ TOTAL_USERS }} How can this be done?
Open ./language/en/common.php and find:

Code: Select all

	// "... :: x registered, y hidden and z guests"
	'ONLINE_USERS_TOTAL_GUESTS'	=> array(
		1	=> 'In total there is <strong>%1$d</strong> user online :: %2$s, %3$s and %4$s',
		2	=> 'In total there are <strong>%1$d</strong> users online :: %2$s, %3$s and %4$s',
	),
	
Replace by:

Code: Select all

	// "... :: x registered, y hidden and z guests"
	'ONLINE_USERS_TOTAL_GUESTS'	=> array(
		1	=> 'User online <strong title="%2$s, %3$s and %4$s">%1$d</strong>',
		2	=> 'Users online <strong title="%2$s, %3$s and %4$s">%1$d</strong>',
	),
After modifications clear cache.

before_mod.png
before_mod.png (19.9 KiB) Viewed 275 times
after_mod.png
after_mod.png (22.86 KiB) Viewed 275 times
Post Reply