[pmwiki-users] converting the VisitorsLogging script

Dominique Faure dominique.faure at gmail.com
Wed Mar 22 02:46:00 CST 2006

On 3/22/06, Neil Herber <nospam at eton.ca> wrote:
> This is close to perfect for me. I just want:
> 1) log lines added at the end of the page instead of the start

Wait for the next version to have it "flag-customizable", or change
the lines 31-40:

    if(substr($page['text'], -1, 1) != "\n") $page['text'] .= "\n";
    WritePage($alpagename, $page);


    if(substr($page['text'], -1, 1) != "\n") $page['text'] .= "\n";
    $page['text'] .= sprintf($ActionLogLineFmt,
                             strftime($ActionLogTimeFmt, $timenow),
                             $action, $pagename);
    WritePage($alpagename, $page);

in this case, the automatic pruning is completely dropped.

> 2) ISO date format 2006-03-21 (not slashes)

in config.php, before including the script:
    $ActionLogTimeFmt = "%Y-%m-%d %H:%M:%S";

> 3) no automatic pruning

This should be the default. You may disable it explicitely by setting:
    $ActionLogLinesMax = 0;


More information about the pmwiki-users mailing list