Greetings:
I've been using the loglog plugin for a few months now, and it's been an amazing tool to follow the wiki acceptance in our company. I developed the original code to show some more stuff, so it now shows basically what the users are doing:
function _log($msg){
global $conf;
$t = time();
$log = " * "."\t".date($conf['dformat'],$t)."\t".$_SERVER['REMOTE_ADDR']."\t\t**".$_SERVER['REMOTE_USER']."**:\t**".$msg."** \n";
$logFilename = 'data/pages/maclaren/company/it/it_internal/loglog.txt';
// read logfile
$fc=file($logFilename);
// Add the new log message to the logfile ...
$f = fopen($logFilename, 'w') or die("can't open file");
fwrite($f, $log);
fclose($f);
// ... and the lines that were already in the log file
$f = fopen($logFilename, 'a') or die("can't open file");
foreach($fc as $line)
{
fwrite($f, $line);
}
fclose($f);
}
/**
* catch log events (originally logged logouts only - RG)
*/
function handle_before(&$event, $param){
$act = $this->_act_clean($event->data);
$this->_log($act);
}
... and this gives:
2008/07/01 13:16 76.71.48.179 ron.grimes: show
2008/07/01 12:54 76.71.48.179 ron.grimes: show
2008/07/01 12:53 76.71.48.179 ron.grimes: show
2008/07/01 12:53 76.71.48.179 : login
2008/07/01 12:53 76.71.48.179 : show
2008/07/01 08:27 99.244.50.14 gary.sinclair: logout
2008/07/01 08:13 99.244.50.14 gary.sinclair: show
I would like to extend this log to show the name of wiki page requested, and also, if possible, the Search string used.
I'm not a PHP coder (but I can hack)... can anyone give me a start (or the code) to be able to retrieve the page name and search string.
Any help much appreicated.
Ron
(Toronto)