source: extensions/GuestBook/main.inc.php @ 28841

Revision 28841, 1.2 KB checked in by mistic100, 5 years ago (diff)

use new maintain class

Line 
1<?php
2/*
3Plugin Name: GuestBook
4Version: auto
5Description: Add a guestbook to the gallery
6Plugin URI: auto
7Author: Mistic
8Author URI: http://www.strangeplanet.fr
9*/
10
11defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
12
13// TODO akismet
14global $prefixeTable;
15
16define('GUESTBOOK_ID',      basename(dirname(__FILE__)));
17define('GUESTBOOK_PATH' ,   PHPWG_PLUGINS_PATH . GUESTBOOK_ID . '/');
18define('GUESTBOOK_TABLE' ,  $prefixeTable . 'guestbook');
19define('GUESTBOOK_ADMIN',   get_root_url().'admin.php?page=plugin-' . GUESTBOOK_ID);
20define('GUESTBOOK_URL',     get_absolute_root_url() . make_index_url(array('section' => 'guestbook')));
21
22include_once(GUESTBOOK_PATH . 'include/events.inc.php');
23
24
25add_event_handler('init', 'guestbook_init');
26
27if (defined('IN_ADMIN'))
28{
29  add_event_handler('get_admin_plugin_menu_links', 'gb_admin_menu');
30}
31
32add_event_handler('blockmanager_apply', 'gb_menubar_apply', EVENT_HANDLER_PRIORITY_NEUTRAL+10);
33
34add_event_handler('loc_end_section_init', 'gb_section_init');
35add_event_handler('loc_end_index', 'gb_index');
36
37
38function guestbook_init()
39{
40  global $conf;
41  $conf['guestbook'] = safe_unserialize($conf['guestbook']);
42 
43  load_language('plugin.lang', GUESTBOOK_PATH);
44}
Note: See TracBrowser for help on using the repository browser.