Welcome, Guest. Please login or register.
Did you miss your activation email?
May 23, 2012, 07:26:09 PM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155439 Posts in 21702 Topics by 7732 Members
Latest Member: Smacki
* Home Help Search Login Register
Pages: 1 [2]   Go Down
Print
Author Topic: New Snippet: Users Online  (Read 8279 times)
Ruud
WebsiteBaker Org e.V.

Offline Offline

Posts: 2294



WWW
« 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.
Logged

Professional WebsiteBaker Solutions
WDStudio

Offline Offline

Posts: 14



WWW
« Reply #26 on: March 06, 2010, 08:31:01 PM »

Great joob.

Thanks Ruud  smiley
Logged
Bramus
Forum Team
*****
Offline Offline

Posts: 601


WWW
« 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 ?
Logged

BRAMUS Internet Services
Ruud
WebsiteBaker Org e.V.

Offline Offline

Posts: 2294



WWW
« 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.
Logged

Professional WebsiteBaker Solutions
Bramus
Forum Team
*****
Offline Offline

Posts: 601


WWW
« 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 Smiley
Logged

BRAMUS Internet Services
Argos
Moderator
**
Offline Offline

Posts: 2156


WWW
« Reply #30 on: January 07, 2011, 08:01:45 PM »

Would be nice if this could be a user friendly droplet [[UsersOnline]]  grin
Logged

Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase: http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
Ruud
WebsiteBaker Org e.V.

Offline Offline

Posts: 2294



WWW
« 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) )
<?php
ob_start
();
UsersOnline();
$users ob_get_contents();
ob_end_clean();
return 
$users;
?>
Note: the dropletcode above is not tested!

Logged

Professional WebsiteBaker Solutions
Argos
Moderator
**
Offline Offline

Posts: 2156


WWW
« 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 smiley 
But adding a droplet based on first installing a snippet sounds a bit like double work... It's not that important (for me) anyway.
Logged

Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase: http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
Schwarzlicht

Offline Offline

Posts: 16


« 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?
Logged
Pages: 1 [2]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!