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

Last change on this file since 3967 was 3905, checked in by tiico, 15 years ago

Initial submit for plugin ConcoursPhoto (Possibility to add a competition on category with selected criterias and generation of the competition's result).
Functionnal version. Admin pages must be checked for informations/errors notifications

File size: 2.1 KB
Line 
1<?php
2/*
3 * Plugin Name: ConcoursPhoto
4 * Version: 0.0.1
5 * Description: Concours de photo : notation sur critères
6 * Plugin URI: http://piwigo.org/ext/extension_view.php?eid=
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_end_picture', array(&$concours, 'display_concours_to_picture')); 
49// Add admin page
50add_event_handler('get_admin_plugin_menu_links', array(&$concours, 'concours_admin_menu') );
51
52// MenuBar
53add_event_handler('blockmanager_register_blocks', array(&$concours, 'register_blocks') );
54add_event_handler('blockmanager_apply', array(&$concours, 'blockmanager_apply') );
55
56add_event_handler('loc_end_section_init', array(&$concours, 'section_init_concours'));
57
58add_event_handler('loc_end_index', array(&$concours, 'index_concours'));
59
60
61set_plugin_data($plugin['id'], $concours)
62
63?>
Note: See TracBrowser for help on using the repository browser.