WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.9 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • New Snippet: Users Online
  • Print
Pages: 1 [2]   Go Down

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

Offline Ruud

  • Posts: 3671
  • 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.
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

WDStudio

  • Guest
Re: New Snippet: Users Online
« Reply #26 on: March 06, 2010, 08:31:01 PM »
Great joob.

Thanks Ruud  :-)
Logged

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 ?
Logged
BRAMUS Internet Services

Offline Ruud

  • Posts: 3671
  • 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.
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

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 :)
Logged
BRAMUS Internet Services

Argos

  • Guest
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
Logged

Offline Ruud

  • Posts: 3671
  • 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!

Logged
Dev4me - WebsiteBaker modules - WBhelp.org

Argos

  • Guest
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.
Logged

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

  • Print
Pages: 1 [2]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • New Snippet: Users Online
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2