source: extensions/ConcoursPhoto/main.inc.php @ 8804

Last change on this file since 8804 was 4428, checked in by tiico, 14 years ago

[ConcoursPhoto] Correct some bugs. Add audit and user audit page.

File size: 2.3 KB
Line 
1<?php
2/*
3 * Plugin Name: ConcoursPhoto
4 * Version: 1.1.0
5 * Description: Concours de photo paramétrable
6 * Plugin URI: http://piwigo.org/ext/extension_view.php?eid=323
7 * Author: Tiico
8 * Author URI:
9 * */
10/********* Fichier main.inc.php  *********/
11
12/* See CHANGELOG for release informations */
13
14 
15if (!defined('PHPWG_ROOT_PATH'))  die('Hacking attempt!');
16
17global $prefixeTable;
18
19define('CONCOURS_NAME', 'Concours Photo');
20define('CONCOURS_ROOT', dirname(__FILE__));
21define('CONCOURS_DIR' , basename(dirname(__FILE__)));
22define('CONCOURS_CFG_FILE' , CONCOURS_ROOT.'/'.CONCOURS_DIR.'.dat');
23define('CONCOURS_CFG_FILE1' , PHPWG_PLUGINS_PATH.CONCOURS_DIR.'.dat');
24define('CONCOURS_CFG_DB' , CONCOURS_DIR);
25define('CONCOURS_PATH' , PHPWG_PLUGINS_PATH . CONCOURS_DIR . '/');
26define('CONCOURS_INC_PATH' , PHPWG_PLUGINS_PATH . CONCOURS_DIR . '/include/');
27define('CONCOURS_IMG_PATH' , PHPWG_PLUGINS_PATH . CONCOURS_DIR . '/img/');
28define('CONCOURS_ADMIN_PATH' , PHPWG_PLUGINS_PATH . CONCOURS_DIR . '/admin/');
29define('CONCOURS_RESULT_FOLDER' , PHPWG_PLUGINS_PATH . CONCOURS_DIR . '/result/');
30
31
32define('CONCOURS_TABLE' , $prefixeTable . 'concours');
33define('CONCOURS_DETAIL_TABLE' , $prefixeTable . 'concours_detail');
34define('CONCOURS_DATA_TABLE' , $prefixeTable . 'concours_data');
35define('CONCOURS_RESULT_TABLE' , $prefixeTable . 'concours_result');
36
37
38
39load_language('plugin.lang', CONCOURS_PATH);
40
41include_once CONCOURS_INC_PATH.'Concours.class.php';
42global $page, $template;
43
44
45$concours = new Concours();
46
47// Add concours to picture page
48add_event_handler('loc_begin_picture', array(&$concours, 'concours_disable_exifs')); 
49add_event_handler('loc_end_picture', array(&$concours, 'display_concours_to_picture')); 
50// Add admin page
51add_event_handler('get_admin_plugin_menu_links', array(&$concours, 'concours_admin_menu') );
52
53// MenuBar
54add_event_handler('blockmanager_register_blocks', array(&$concours, 'register_blocks') );
55add_event_handler('blockmanager_apply', array(&$concours, 'blockmanager_apply') );
56
57add_event_handler('loc_end_section_init', array(&$concours, 'section_init_concours'));
58
59add_event_handler('loc_end_index', array(&$concours, 'index_concours'));
60
61// Add Global note under thumbnail
62add_event_handler('loc_end_index_thumbnails', array(&$concours, 'thumbnail_note'), 50, 2);
63
64
65set_plugin_data($plugin['id'], $concours)
66
67?>
Note: See TracBrowser for help on using the repository browser.