1 | <?php |
---|
2 | /* |
---|
3 | Plugin Name: Admin Tools |
---|
4 | Version: auto |
---|
5 | Description: Do some admin task from the public pages |
---|
6 | Plugin URI: auto |
---|
7 | Author: Mistic |
---|
8 | Author URI: http://www.strangeplanet.fr |
---|
9 | */ |
---|
10 | |
---|
11 | defined('PHPWG_ROOT_PATH') or die('Hacking attempt!'); |
---|
12 | |
---|
13 | // +-----------------------------------------------------------------------+ |
---|
14 | // | Plugin constants | |
---|
15 | // +-----------------------------------------------------------------------+ |
---|
16 | defined('ADMINTOOLS_ID') or define('ADMINTOOLS_ID', basename(dirname(__FILE__))); |
---|
17 | define('ADMINTOOLS_PATH' , PHPWG_PLUGINS_PATH . ADMINTOOLS_ID . '/'); |
---|
18 | // define('ADMINTOOLS_ADMIN', get_root_url() . 'admin.php?page=plugin-' . ADMINTOOLS_ID); |
---|
19 | define('ADMINTOOLS_VERSION', 'auto'); |
---|
20 | |
---|
21 | |
---|
22 | // +-----------------------------------------------------------------------+ |
---|
23 | // | Event handlers | |
---|
24 | // +-----------------------------------------------------------------------+ |
---|
25 | include_once(ADMINTOOLS_PATH . 'include/events.inc.php'); |
---|
26 | include_once(ADMINTOOLS_PATH . 'include/MultiView.class.php'); |
---|
27 | |
---|
28 | global $MultiView; |
---|
29 | $MultiView = new MultiView(); |
---|
30 | |
---|
31 | // add_event_handler('init', 'admintools_init'); |
---|
32 | |
---|
33 | if (!defined('IN_ADMIN')) |
---|
34 | { |
---|
35 | add_event_handler('loc_after_page_header', 'admintools_add_public_controller'); |
---|
36 | } |
---|
37 | |
---|
38 | add_event_handler('user_init', array(&$MultiView, 'user_init')); |
---|
39 | add_event_handler('init', array(&$MultiView, 'init')); |
---|
40 | |
---|
41 | |
---|
42 | // +-----------------------------------------------------------------------+ |
---|
43 | // | Plugin initialization | |
---|
44 | // +-----------------------------------------------------------------------+ |
---|
45 | // function admintools_init() |
---|
46 | // { |
---|
47 | // global $conf; |
---|
48 | |
---|
49 | // include_once(ADMINTOOLS_PATH . 'maintain.inc.php'); |
---|
50 | // $maintain = new AdminTools_maintain(ADMINTOOLS_ID); |
---|
51 | // $maintain->autoUpdate(ADMINTOOLS_VERSION, 'install'); |
---|
52 | |
---|
53 | // load_language('plugin.lang', ADMINTOOLS_PATH); |
---|
54 | |
---|
55 | // $conf['AdminTools'] = unserialize($conf['AdminTools']); |
---|
56 | // } |
---|