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'); 5require_once(DOKU_PLUGIN.'siteexport/preload.php'); 6 7/** 8 * All DokuWiki plugins to extend the admin function 9 * need to inherit from this class 10 */ 11class admin_plugin_siteexport extends DokuWiki_Admin_Plugin { 12 13 /** 14 * Constructor 15 */ 16 function __construct() { 17 $this->setupLocale(); 18 } 19 20 /** 21 * for backward compatability 22 * @see inc/DokuWiki_Plugin#getInfo() 23 */ 24 function getInfo(){ 25 if ( method_exists(parent, 'getInfo')) { 26 $info = parent::getInfo(); 27 } 28 return is_array($info) ? $info : confToHash(dirname(__FILE__).'/plugin.info.txt'); 29 } 30 31 /** 32 * return sort order for position in admin menu 33 */ 34 function getMenuSort() { 35 return 100; 36 } 37 38 function forAdminOnly(){ 39 return false; 40 } 41 42 /** 43 * handle user request 44 */ 45 function handle() { 46 } 47 48 /** 49 * output appropriate html 50 */ 51 function html() { 52 53 if ( ! $functions=& plugin_load('helper', 'siteexport') ) { 54 msg("Can't initialize"); 55 return false; 56 } 57 58 $functions->__siteexport_addpage(); 59 } 60} 61//Setup VIM: ex: et ts=4 enc=utf-8 : 62