Line | |
---|
1 | <?php |
---|
2 | /* |
---|
3 | Plugin Name: Linked Pages |
---|
4 | Version: auto |
---|
5 | Description: Link Additional Pages to albums. |
---|
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 | if (mobile_theme()) |
---|
14 | { |
---|
15 | return; |
---|
16 | } |
---|
17 | |
---|
18 | global $prefixeTable; |
---|
19 | |
---|
20 | define('LINKEDPAGES_ID', basename(dirname(__FILE__))); |
---|
21 | define('LINKEDPAGES_PATH' , PHPWG_PLUGINS_PATH . LINKEDPAGES_ID . '/'); |
---|
22 | define('LINKEDPAGES_TABLE', $prefixeTable . 'linked_pages'); |
---|
23 | define('LINKEDPAGES_ADMIN', get_root_url() . 'admin.php?page=plugin-' . LINKEDPAGES_ID); |
---|
24 | |
---|
25 | |
---|
26 | add_event_handler('init', 'linked_pages_init'); |
---|
27 | |
---|
28 | |
---|
29 | function 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.