Author Topic: New Snippet: Users Online  (Read 22872 times)

Offline Ruud

  • Posts: 3660
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: New Snippet: Users Online
« Reply #25 on: March 02, 2010, 11:24:22 PM »
The snippet uses the php->date() function to display the timestamp.
The timezone used is whatever is setup in the php configuration, or the webserver itself.

A function like this could be added to the snippet to change the output to a different timezone.

Offline WDStudio

  • Posts: 14
  • Professional Web Design Studio
    • Professional Web Design Studio
Re: New Snippet: Users Online
« Reply #26 on: March 06, 2010, 08:31:01 PM »
Great joob.

Thanks Ruud  :-)

Offline Bramus

  • Posts: 608
  • Gender: Male
    • BRAMUS Internet Services
Re: New Snippet: Users Online
« Reply #27 on: January 01, 2011, 07:55:00 PM »
Is it possible to modify the counter so it can also show the total visitors?

Like adding a field that contains the total visitors and each time a new visitor is on the website (home page) it does +1 ?
BRAMUS Internet Services

Offline Ruud

  • Posts: 3660
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: New Snippet: Users Online
« Reply #28 on: January 01, 2011, 10:58:02 PM »
Isn't that the same a the simple pagecounter?
In that script the counter per page is updated once per session.

Offline Bramus

  • Posts: 608
  • Gender: Male
    • BRAMUS Internet Services
Re: New Snippet: Users Online
« Reply #29 on: January 02, 2011, 02:43:52 AM »
Hmm looks like a usefull script for only the home page as that is what we want to count. I'm gonna look into it and see if we can use it for a new website!

Thanks :)
BRAMUS Internet Services

Offline Argos

  • Posts: 2542
  • Gender: Male
    • Argos Media
Re: New Snippet: Users Online
« Reply #30 on: January 07, 2011, 08:01:45 PM »
Would be nice if this could be a user friendly droplet [[UsersOnline]]  :-D
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
----------------------------------------------------------------
Please don't request personal support, use the forums!

Offline Ruud

  • Posts: 3660
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: New Snippet: Users Online
« Reply #31 on: January 07, 2011, 11:36:55 PM »
since this is typically a function to be used on all pages in your website, I do not see the big difference in adding
<?php UsersOnline(); ?> 
instead of
[[UsersOnline]]

On the other hand, you can always create a droplet that captures the output of the snippet..
Code: (Droplet:UsersOnline (remember to install the snippet first) ) [Select]
<?php
ob_start
();
UsersOnline();
$users ob_get_contents();
ob_end_clean();
return 
$users;
?>
Note: the dropletcode above is not tested!


Offline Argos

  • Posts: 2542
  • Gender: Male
    • Argos Media
Re: New Snippet: Users Online
« Reply #32 on: January 07, 2011, 11:51:22 PM »
Thanks for your answer Ruud. Personally I think just the other way round: this is typically a function for single use on a site, and I suggested a droplet because it's more easy for both me and clients :-) 
But adding a droplet based on first installing a snippet sounds a bit like double work... It's not that important (for me) anyway.
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
----------------------------------------------------------------
Please don't request personal support, use the forums!

Offline Schwarzlicht

  • Posts: 16
Re: New Snippet: Users Online
« Reply #33 on: January 22, 2012, 02:47:04 PM »
hello, I would like each group to display the user behind the name. How can I do that?

 

postern-length