mem_online_users
Category: Projects
Posted:
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 [6.62kB]
Category: Textpattern
download: 1736
Textpattern plugins can be downloaded from Bitbucket
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.