source: extensions/Comments_on_Albums/trunk/main.inc.php @ 28837

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

use new maintain class

File size: 1.3 KB
Line 
1<?php
2/*
3Plugin Name: Comments on Albums
4Version: auto
5Description: Activate comments on albums pages
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('COA_ID',     basename(dirname(__FILE__)));
21define('COA_PATH' ,  PHPWG_PLUGINS_PATH . COA_ID . '/');
22define('COA_TABLE' , $prefixeTable . 'comments_categories');
23define('COA_ADMIN',  get_root_url().'admin.php?page=plugin-' . COA_ID);
24
25
26add_event_handler('init', 'coa_init');
27
28
29function coa_init()
30{
31  global $user, $conf;
32
33  // luciano doesn't use comments
34  // incompatible with dynamic display of Stripped & Collumns
35  if ($user['theme'] == 'luciano' or $user['theme'] == 'stripped_black_bloc') return;
36
37  include_once(COA_PATH . 'include/events.inc.php');
38
39  if (defined('IN_ADMIN'))
40  {
41    add_event_handler('tabsheet_before_select', 'coa_tabsheet_before_select', EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
42    add_event_handler('loc_begin_admin_page', 'coa_admin_intro');
43  }
44  else
45  {
46    add_event_handler('loc_after_page_header', 'coa_albums');
47    add_event_handler('loc_end_comments', 'coa_comments');
48  }
49
50  add_event_handler('get_stuffs_modules', 'coa_register_stuffs_module');
51
52  load_language('plugin.lang', COA_PATH);
53}
Note: See TracBrowser for help on using the repository browser.