1<?php 2if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../../').'/'); 3if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); 4require_once(DOKU_PLUGIN.'admin.php'); 5 6/** 7 * All DokuWiki plugins to extend the admin function 8 * need to inherit from this class 9 */ 10class admin_plugin_searchindex extends DokuWiki_Admin_Plugin { 11 var $cmd; 12 13 /** 14 * Constructor 15 */ 16 function admin_plugin_searchindex(){ 17 $this->setupLocale(); 18 } 19 20 /** 21 * return some info 22 */ 23 function getInfo(){ 24 return array( 25 'author' => 'Andreas Gohr', 26 'email' => 'andi@splitbrain.org', 27 'date' => '2005-09-04', 28 'name' => 'Searchindex Manager', 29 'desc' => 'Allows to rebuild the fulltext search index', 30 'url' => 'http://wiki.splitbrain.org/plugin:searchindex', 31 ); 32 } 33 34 /** 35 * return sort order for position in admin menu 36 */ 37 function getMenuSort() { 38 return 40; 39 } 40 41 /** 42 * handle user request 43 */ 44 function handle() { 45 } 46 47 /** 48 * output appropriate html 49 */ 50 function html() { 51 print $this->plugin_locale_xhtml('intro'); 52 53 print '<fieldset class="pl_si_out">'; 54 55 print '<button class="button" id="pl_si_gobtn" onclick="plugin_searchindex_go()">'; 56 print 'Rebuild Index'; #FIXME localize 57 print '</button>'; 58 print '<span id="pl_si_out"></span>'; 59 print '<img src="'.DOKU_BASE.'lib/images/loading.gif" id="pl_si_throbber" />'; 60 61 print '</fieldset>'; 62 63 } 64 65 66} 67//Setup VIM: ex: et ts=4 enc=utf-8 : 68