CurrentVisitors-Talk
This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.
Comments
I tried installing this in a specific page config file, but for some reason, the markup was not activated. It does work if I put it in my general site config.php. Caveman
Of course there is the problem of multiple users under the one IP address, so this may not work for internal sites. - Kersti
for http://free.fr change line:
while (($file = readdir($DirectoryHandle)) == true) { if (is_dir($file) == false) { $FileFullPath = $CurrentVisitorsDirectory . '/' . $file; $FileStat = stat($FileFullPath); $FileAge = $TimeNow - $FileStat[9]; if ($FileAge > $MaximumNumberOfSecondsToConsiderAVisitorAsCurrent) { unlink($FileFullPath); } else { $NumberOfCurrentVisitors++; } } } closedir($DirectoryHandle);
to :
while (($file = readdir($DirectoryHandle)) == true) { if ($file != '.' and $file != '..') { if (is_dir($file) == false) { $FileFullPath = $CurrentVisitorsDirectory . '/' . $file; $FileStat = stat($FileFullPath); $FileAge = $TimeNow - $FileStat[9]; if ($FileAge > $MaximumNumberOfSecondsToConsiderAVisitorAsCurrent) { unlink($FileFullPath); } else { $NumberOfCurrentVisitors++; } } } } closedir($DirectoryHandle);
Forceflow: If you want the script to update on edit and foxpost pages too, just change the line that says
if (action='browse')
to
if (action='browse' || action='edit' || action='foxpost')
GNUZoo: This addon caused 'Clean URLs' to not work (and lots of other problems) - I found that placing it after the '$EnablePathInfo
= 1' fixed it. 11/28/2009
Talk page for the CurrentVisitors recipe (users).