source: extensions/header_manager/main.inc.php @ 17034

Last change on this file since 17034 was 17012, checked in by mistic100, 12 years ago

-clean up table when a banner or a category is deleted
-force centered text on banner

File size: 1.4 KB
Line 
1<?php 
2/*
3Plugin Name: Header Manager
4Version: auto
5Description: Header Manager allows to simply manage gallery banners. You can upload a picture from your computer or use a picture already in the gallery.
6Plugin URI: http://piwigo.org/ext/extension_view.php?eid=608
7Author: Mistic
8Author URI: http://www.strangeplanet.fr
9*/
10
11if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
12
13global $prefixeTable;
14define('HEADER_MANAGER_PATH', PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');
15define('HEADER_MANAGER_ADMIN', get_root_url() . 'admin.php?page=plugin-' . basename(dirname(__FILE__)));
16define('HEADER_MANAGER_DIR', PWG_LOCAL_DIR . 'banners/');
17define('HEADER_MANAGER_TABLE', $prefixeTable . 'category_banner');
18
19add_event_handler('init', 'header_manager_init');
20
21function header_manager_init()
22{
23  if (defined('PWG_HELP')) return;
24 
25  global $conf;
26  $conf['header_manager'] = unserialize($conf['header_manager']);
27   
28  include(HEADER_MANAGER_PATH . 'include/functions.inc.php');
29  include(HEADER_MANAGER_PATH . 'include/header_manager.inc.php');
30 
31  add_event_handler('render_page_banner', 'header_manager_render');
32
33  if (defined('IN_ADMIN'))
34  {
35    add_event_handler('tabsheet_before_select', 'header_manager_tab', EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
36    add_event_handler('get_admin_plugin_menu_links', 'header_manager_admin_menu');
37    add_event_handler('delete_categories', 'header_manager_delete_categories');
38  }
39}
40
41?>
Note: See TracBrowser for help on using the repository browser.