====== Firestats Plugin for Dokuwiki ====== It is noted in the code, but I'll repeat it here: //This code is almost entirely copied from the Google Analytics plugin by Terence J. Grant. See [[http://www.dokuwiki.org/plugin:googleanalytics|his plugin page]] for details. // Credit for the work should ostensibly be his- I merely deleted a few lines and changed a configuration name. Concerning this rendering of the code: See [[http://www.firestats.cc|firestats.cc]] for information on what Firestats is and how to use it. Plugin installation consists of: *Unarchiving the plugin .tgz file to your dokuwiki lib/plugins directory *Visiting the site Admin => Configuration page to set the URL for your firestats installation. An example URL looks like: http://yoursite.com/yourfirestats/js/fs.js.php?site_id=2 ====== Download ====== The plugin archive file is {{:dokufirestats.tgz|here.}} ====== Details ====== ===== File/Directory structure: ===== dokufirestats/\\ dokufirestats/action.php\\ dokufirestats/lang/\\ dokufirestats/lang/en/\\ dokufirestats/lang/en/settings.php\\ dokufirestats/conf/\\ dokufirestats/conf/metadata.php\\ ===== Action.php ===== 'Benjamin Hall (base code from Terence J. Grant\'s Google Analytics Plugin)', 'email' => 'ben@benhall.com', 'date' => '2010-05-05', 'name' => 'Firestats Plugin', 'desc' => 'Plugin to call firestats on pageload', 'url' => 'http://benhall.com/doku/doku.php?id=firestats', ); } function register(&$controller) { $controller->register_hook('TPL_METAHEADER_OUTPUT', 'BEFORE', $this, '_addHeaders'); } function _addHeaders (&$event, $param) { global $INFO; if(!$this->getConf('FIRESTATSURL')) return; if($this->getConf('dont_count_admin') && $INFO['isadmin']) return; if($this->getConf('dont_count_users') && $_SERVER['REMOTE_USER']) return; $event->data["script"][] = array ( "type" => "text/javascript", "src" => $this->getConf('FIRESTATSURL'), ); } } ?> ===== Metadata.php ===== ===== Settings.php =====