source: extensions/linked_pages/main.inc.php @ 28845

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

use new maintain class

File size: 1.1 KB
Line 
1<?php 
2/*
3Plugin Name: Linked Pages
4Version: auto
5Description: Link Additional Pages to albums.
6Plugin URI: auto
7Author: Mistic
8Author URI: http://www.strangeplanet.fr
9*/
10
11defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
12
13if (mobile_theme())
14{
15  return;
16}
17
18global $prefixeTable;
19
20define('LINKEDPAGES_ID',    basename(dirname(__FILE__)));
21define('LINKEDPAGES_PATH' , PHPWG_PLUGINS_PATH . LINKEDPAGES_ID . '/');
22define('LINKEDPAGES_TABLE', $prefixeTable . 'linked_pages');
23define('LINKEDPAGES_ADMIN', get_root_url() . 'admin.php?page=plugin-' . LINKEDPAGES_ID);
24
25
26add_event_handler('init', 'linked_pages_init');
27
28
29function linked_pages_init()
30{
31  global $conf, $pwg_loaded_plugins;
32 
33  if (!isset($pwg_loaded_plugins['AdditionalPages']))
34  {
35    return;
36  }
37 
38  // add event handlers
39  if (defined('IN_ADMIN'))
40  {
41    add_event_handler('tabsheet_before_select', 'linked_pages_tabsheet_before_select', EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
42  }
43  else
44  {
45    add_event_handler('loc_end_index', 'linked_pages_loc_end_index', EVENT_HANDLER_PRIORITY_NEUTRAL+20);
46  }
47
48  include_once(LINKEDPAGES_PATH . 'include/functions.inc.php');
49}
Note: See TracBrowser for help on using the repository browser.