source: extensions/AdminTools/main.inc.php @ 25791

Last change on this file since 25791 was 25791, checked in by mistic100, 10 years ago

fix security problem, fix sql fatal error, try to fix display on smartpocket

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