[pmwiki-users] New Cookbook : CurrentVisitors

Daniel Scheibler scheibi at gmail.com
Mon Aug 1 13:04:59 CDT 2005


Hi Christophe,

the script looks nice.
I have only one hint to you:
use
SDV($MaximumNumberOfSecondsToConsiderAVisitorAsCurrent, 1800);
SDV($CurrentVisitorsDirectory, $WorkDir . '/' . 'CurrentVisitors');

instead of
$MaximumNumberOfSecondsToConsiderAVisitorAsCurrent = 1800;
$CurrentVisitorsDirectory                          = $WorkDir . '/' .
'CurrentVisitors';

so a user could change the values in local/config.php before 
   include_once('cookbook/CurrentVisitors.php');

Greets,

scheiby
-- 
Daniel Scheibler     ========:}       student at
eMail: scheibi at gmail.com              BTU Cottbus/Germany
WWW:   http://www.scheiby.de

2005/8/1, Christophe David <pmwiki at christophedavid.org>:
> 
> http://www.pmwiki.org/wiki/Cookbook/CurrentVisitors
> 
> Question
> 
> Can I know how many visitors are currently surfing on my site ?
> 
> Answer
> 
> Copy CurrentVisitors.php&#916; to the cookbook directory and add
> include_once("local/CurrentVisitors.php"); to config.php.
> 
> Notes and Comments
> 
> In your wiki pages, add the markup (:CurrentVisitors:) to display the
> number of visitors (strictly speaking "different IP addresses") that came
> to your site during the last
> $MaximumNumberOfSecondsToConsiderAVisitorAsCurrent .
> 
> The counter will update only when action=browse.
> 
>     * This recipe was last tested on PmWiki version: 2.0 beta 52
>     * This recipe requires at least PmWiki version: 2.0
> 
> Comments and suggestions welcome.
> 
> Christophe




More information about the pmwiki-users mailing list