New Snippet: Users Online

bupaje

Has anyone had any problems with this? It has been working fine when suddenly today the page stops loading at this call

<?php UsersOnline("Currently: " " visitors viewing this page" " visitor viewing this page") ; ?>


Ruud

Quote from: bupaje on September 18, 2008, 04:20:15 AM
Dumb question but is this registered users only, or total online users?

It's total users. (and bots)

Quote from: bupaje on September 18, 2008, 04:20:15 AM
Also if total users can it can be modified to show an image for every x amount of users with the numbers?

I was thinking it might be cool to create something like little characters, possibly with simple gif animations, hanging out in the stat box as a visual representation of how many users are online.

It's open source. Be my guest. 8-)

Ruud
[url=https://dev4me.com/modules-snippets/]Dev4me - WebsiteBaker modules[/url] - [url=https://wbhelp.org/]WBhelp.org[/url]

bupaje

Dumb question but is this registered users only, or total online users? Also if total users can it can be modified to show an image for every x amount of users with the numbers?

I was thinking it might be cool to create something like little characters, possibly with simple gif animations, hanging out in the stat box as a visual representation of how many users are online.

Ruud

No,

The data recorded by the snippet does not include that.
So it is not possible to display.

Maybe in a future version.

Ruud
[url=https://dev4me.com/modules-snippets/]Dev4me - WebsiteBaker modules[/url] - [url=https://wbhelp.org/]WBhelp.org[/url]

pfreud01

is it possible to display the name of registered users online in this snippet? i don´t know to manage it.

best regards, pfreud01

aldus

Hello Ruud

A nice one, and on a first look, clean as fresh fallen snow ;-)

But there are some unnessesary spaces instead of tabs,
seen in the attachment ... hard work for the preprocessor

Regards
Aldus

[gelöscht durch Administrator]

erpe0812

#2
Hi Ruud,

want to invite you to work with us on this project:

http://www.websitebakers.com

We are just a half step behind (or in front of) the start line....

rgds

erpe

Ruud

#1
In the series fun snippets, here is the Users Online snippet.

It displays a simple line that says "Currently: 21 users online".
Hovering over the line a tooltip popup will display a timestamp and the page that is being viewed.
When called with your "admin" IP address it will also display the IP address of the visitors and if it is called by a searchbot. (experimental bot detection).

See the snippet in action on http://www.wbhulp.nl (Dutch website) in the right top of the page.

Installation:

Install the zipfile as a normal module through the WB backend.
Add the php code to your template index.php.


Using the snippet:

<?php UsersOnline(); ?>    

Optional parameters: <?php UsersOnline$use_tooltip$prefix $suffix $single $admin_ip ?>

 $use_tooltip = Adds a small javascript to display a hovering tooltip with details of the current connections. (default := 1, 0 no tooltip)
 $prefix = The text in front of the user counter. ( default := "Currently: " )
 $suffix = The text after the user counter when there is more than one user online. (default = " users online")
 $single = The text after the user counter when there is just one user online. (default = " user online")
 $admin_ip = The IP address that will see more details. Details are IP address and browser name (if detected) (default := "127.0.0.1")

Customised Example: <?php UsersOnline("Online: " " users" " user""192.168.0.1" ) ; ?>


Have fun with it.

Ruud

[gelöscht durch Administrator]
[url=https://dev4me.com/modules-snippets/]Dev4me - WebsiteBaker modules[/url] - [url=https://wbhelp.org/]WBhelp.org[/url]