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

Last change on this file since 9512 was 9370, checked in by tiico, 13 years ago
  • Add help page for the plugin (on admin page)
  • Some Corrections
File size: 2.3 KB
Line 
1<?php
2/*
3 * Plugin Name: ConcoursPhoto
4 * Version: 2.0.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_VERSION', '2.0.0 [BETA]');       //
20
21
22define('CONCOURS_NAME', 'Concours Photo');
23define('CONCOURS_ROOT', dirname(__FILE__));
24define('CONCOURS_DIR' , basename(dirname(__FILE__)));
25define('CONCOURS_CFG_FILE' , CONCOURS_ROOT.'/'.CONCOURS_DIR.'.dat');
26define('CONCOURS_CFG_FILE1' , PHPWG_PLUGINS_PATH.CONCOURS_DIR.'.dat');
27define('CONCOURS_CFG_DB' , CONCOURS_DIR);
28define('CONCOURS_PATH' , PHPWG_PLUGINS_PATH . CONCOURS_DIR . '/');
29define('CONCOURS_INC_PATH' , PHPWG_PLUGINS_PATH . CONCOURS_DIR . '/include/');
30define('CONCOURS_IMG_PATH' , PHPWG_PLUGINS_PATH . CONCOURS_DIR . '/img/');
31define('CONCOURS_ADMIN_PATH' , PHPWG_PLUGINS_PATH . CONCOURS_DIR . '/admin/');
32define('CONCOURS_RESULT_FOLDER' , PHPWG_PLUGINS_PATH . CONCOURS_DIR . '/result/');
33
34
35define('CONCOURS_TABLE' , $prefixeTable . 'concours');
36define('CONCOURS_DETAIL_TABLE' , $prefixeTable . 'concours_detail');
37define('CONCOURS_DATA_TABLE' , $prefixeTable . 'concours_data');
38define('CONCOURS_RESULT_TABLE' , $prefixeTable . 'concours_result');
39
40
41
42load_language('plugin.lang', CONCOURS_PATH);
43
44include_once CONCOURS_INC_PATH.'Concours.class.php';
45global $page, $template;
46
47
48$concours = new Concours();
49
50// Add concours to picture page
51add_event_handler('loc_end_picture', array(&$concours, 'display_concours_to_picture')); 
52// Add admin page
53add_event_handler('get_admin_plugin_menu_links', array(&$concours, 'concours_admin_menu') );
54
55// MenuBar
56add_event_handler('blockmanager_register_blocks', array(&$concours, 'register_blocks') );
57add_event_handler('blockmanager_apply', array(&$concours, 'blockmanager_apply') );
58
59add_event_handler('loc_end_section_init', array(&$concours, 'section_init_concours'));
60
61add_event_handler('loc_end_index', array(&$concours, 'index_concours'));
62
63// Add Global note under thumbnail
64add_event_handler('loc_end_index_thumbnails', array(&$concours, 'thumbnail_note'), 50, 2);
65
66
67
68set_plugin_data($plugin['id'], $concours)
69
70?>
Note: See TracBrowser for help on using the repository browser.