* */ /** * Class action_plugin_combo_analytics * Update the analytics data */ class action_plugin_combo_analytics extends DokuWiki_Action_Plugin { public function register(Doku_Event_Handler $controller) { /** * Called on every page view * https://www.dokuwiki.org/devel:event:indexer_tasks_run * Called on every page write * https://www.dokuwiki.org/devel:event:io_wikipage_write * On update to an existing page this event is called twice, * once for the transfer of the old version to the attic (rev will have a value) * and once to write the new version of the page into the wiki (rev is false) */ if (false) { $controller->register_hook('INDEXER_TASKS_RUN', 'AFTER', $this, 'handle_update_analytics', array()); } } public function handle_new_page(Doku_Event $event, $param){ global $ID; $page = new Page($ID); $canonical = $page->getCanonical(); $event->data["tpl"] = <<