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

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

[plugins] Comments on Albums

  • corrections
  • public list available
File size: 1.9 KB
Line 
1<?php
2/*
3Plugin Name: Comment on Albums
4Version: 0.2
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.2');
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_after_page_header', 'COA_comments_page');
30add_event_handler('loc_end_admin', 'COA_admin');
31
32
33// +-----------------------------------------------------------------------+
34//                                      Functions
35// +-----------------------------------------------------------------------+
36
37function COA_index() {
38        global $template, $page, $conf;
39       
40        if ($page['section'] == 'categories' AND isset($page['category'])) {   
41                include(COA_PATH . 'include/coa_albums.php');
42        }
43}
44
45function COA_comments_page() {
46        global $template, $page, $conf;
47       
48        if ($page['body_id'] == 'theCommentsPage') {
49                include(COA_PATH . 'include/coa_comments_page.php');
50        }
51}
52
53function COA_admin() {
54        global $template, $page, $conf;
55       
56        if ($page['page'] == 'comments') {     
57                include(COA_PATH . 'include/coa_admin_comments.php');
58        } else if ($page['page'] == 'intro') { 
59                include(COA_PATH . 'include/coa_admin_intro.php');
60        } 
61}
62
63?>
Note: See TracBrowser for help on using the repository browser.