forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: jolly on June 18, 2009, 07:09:37 pm

Title: Number of online users in stats bar
Post by: jolly on June 18, 2009, 07:09:37 pm
I know, it was multi threads about showing users online, but no one was about number users in stats bar certainly.

I have a little code, which showing a currently number of online users:
Code: [Select]
<script type='text/javascript' src='http://liczniki.org/hit.php?l=nidhhog&o=1'></script>
Now, i want to display number generated by this script, just before numbers of total files.
For example:

22 users online, 832 files in 2 category and 8 albums - display 74832 times.

I guess it is easy, but i dont know php at all. Could somen help me ?

Thank you for cooperate.
Title: Re: Number of online users in stats bar
Post by: jolly on June 24, 2009, 02:17:20 pm
No ideas?

IMO,  I should save that java code as a variable and edit the language file and add this variable in this line:
Code: [Select]
'stat1' => '<b>[pictures]</b> files in <b>[albums]</b> albums and <b>[cat]</b> categories with <b>[comments]</b> comments viewed <b>[views]</b> times',
Could anyone help ?
Title: Re: Number of online users in stats bar
Post by: Joachim Müller on June 24, 2009, 02:37:13 pm
1) Java is not JavaScript
2) The code you posted is just wishfull thinking.
3) PHP is executed on the server first, JavaScript is exectued on the client afterwards. The method to accomplish things vice versa is what makes many Ajax-driven applications tick, and what makes coding them far from trivial

So: what you're up to is technically possible, but definitely not with the poor detail level you have posted so far. I strongly doubt that someone will be ready to code this for you for free.