Thu Jun 02, 2005
mem_online_users
This tag will output the number of distinct users who have accessed your site in the past “timeout” seconds. An attribute “path” can be specified to limit the results to users who have accessed the specified sub path. E.g. ”/article” will match all articles ”/article/1”, ”/article/2005/01/02”.
Changes
Version 0.2
- Fixed doTag() related bugs.
Download
file:
mem_online_users.txt [4.16KB]
Category: Textpattern
download: 1300
Documentation
Attributes
| Name | Description | Default Value | Notes |
|---|---|---|---|
| timeout | The number of seconds a user is still deemed online. 600=10 minutes, 1800=30 minutes, 3600=1 hour. | 600 | optional |
| path | The subpath that will be used to limit the results to. Only users who have accessed the site in a url below “path” in the past “timeout” seconds will be counted. If path is ”/article”, then user visits to ”/article”, ”/article/10/A-nifty-article”, and ”/article/2005/12/22” would be counted, but ”/about” would not be counted. | none | optional |
| wraptag | The html tag that will wrap the output value | none | optional |
| class | The CSS class that will be applied to the “wraptag” | mem_online_users | optional |
Examples
<txp:mem_online_users /> will display a count of users who have accessed your site in the past 10 minutes.
<txp:mem_online_users path="/article" timeout="300" /> will display a count of users who have accessed either the section listing or individual article for section “article” in the past 5 minutes.
Comment
I am getting the following error at the moment:
Fatal error: Call to undefined function: dotag() in /www/xxxx/xxxx/xxxx/xxx/xxxx/textpattern/lib/txplib_misc.php(304) : eval()’d code on line 3022
Using a pretty recent version of RC3 though not the very latest.
— John Oxton · 06/02/05 12:32 PM · #
Great plug-in thank you!
— John Oxton · 06/02/05 05:50 PM · #
— Robert Hartl · 10/03/05 10:17 PM · #
Hi,
This would be a great plugin if it was working on my site. Any way you could help me with that?
— Sarah · 04/08/08 11:45 PM · #
Commenting is closed for this article.





