Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Number of online users in stats bar  (Read 2116 times)

0 Members and 1 Guest are viewing this topic.

jolly

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Number of online users in stats bar
« 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.
Logged

jolly

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: Number of online users in stats bar
« Reply #1 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 ?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Number of online users in stats bar
« Reply #2 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.
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 20 queries.