source: extensions/Comments_on_Albums/main.inc.php @ 9624

Last change on this file since 9624 was 9624, checked in by mistic100, 13 years ago

[plugins] Comments on Albums

File size: 1.6 KB
Line 
1<?php
2/*
3Plugin Name: Comment on Albums
4Version: 0.1.a
5Description: Allows users to comment albums
6Plugin URI: http://piwigo.org/ext/extension_view.php?eid=512
7Author: Mistic
8Author URI: http://www.strangeplanet.fr
9*/
10
11if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
12
13global $prefixeTable;
14
15// +-----------------------------------------------------------------------+
16//                                      Global variables
17// +-----------------------------------------------------------------------+
18define('COA_NAME' , 'Comment on Albums');
19define('COA_VERSION', '0.1.a');
20define('COA_DIR' , basename(dirname(__FILE__)));
21define('COA_PATH' , PHPWG_PLUGINS_PATH . COA_DIR . '/');
22define('COA_TABLE' , $prefixeTable . 'comments_categories');
23
24
25// +-----------------------------------------------------------------------+
26//                                      Triggers
27// +-----------------------------------------------------------------------+
28add_event_handler('loc_end_index', 'COA_index');
29add_event_handler('loc_end_admin', 'COA_admin');
30
31
32// +-----------------------------------------------------------------------+
33//                                      Fonctions
34// +-----------------------------------------------------------------------+
35
36function COA_index() {
37        global $template, $page, $conf;
38       
39        if ($page['section'] == 'categories' AND isset($page['category'])) {   
40                include(COA_PATH . 'include/coa_albums.php');
41        }
42}
43
44function COA_admin() {
45        global $template, $page, $conf;
46       
47        if ($page['page'] == 'comments') {     
48                include(COA_PATH . 'include/coa_admin_comments.php');
49        } else if ($page['page'] == 'intro') { 
50                include(COA_PATH . 'include/coa_admin_intro.php');
51        } 
52}
53
54?>
Note: See TracBrowser for help on using the repository browser.