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

Last change on this file since 32471 was 32471, checked in by tiico, 4 years ago

Correct language files

File size: 3.3 KB
RevLine 
[32457]1<?php
2/*
3 Plugin Name: ConcoursPhoto
[32471]4 Version: 11.0.2
[32457]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 Has Settings: true
10*/
11/********* Fichier main.inc.php  *********/
12
13/* See CHANGELOG for release informations */
14
15 
16if (!defined('PHPWG_ROOT_PATH'))  die('Hacking attempt!');
17
18global $prefixeTable;
19
[32471]20define('CONCOURS_VERSION', '11.0.2');       //
[32457]21
22
23define('CONCOURS_NAME', 'Concours Photo');
24define('CONCOURS_ROOT', dirname(__FILE__));
25define('CONCOURS_DIR' , basename(dirname(__FILE__)));
26define('CONCOURS_CFG_FILE' , CONCOURS_ROOT.'/'.CONCOURS_DIR.'.dat');
27define('CONCOURS_CFG_FILE1' , PHPWG_PLUGINS_PATH.CONCOURS_DIR.'.dat');
28define('CONCOURS_CFG_DB' , CONCOURS_DIR);
29define('CONCOURS_PATH' , PHPWG_PLUGINS_PATH . CONCOURS_DIR . '/');
30define('CONCOURS_INC_PATH' , PHPWG_PLUGINS_PATH . CONCOURS_DIR . '/include/');
31define('CONCOURS_IMG_PATH' , PHPWG_PLUGINS_PATH . CONCOURS_DIR . '/img/');
32define('CONCOURS_ADMIN_PATH' , PHPWG_PLUGINS_PATH . CONCOURS_DIR . '/admin/');
33define('CONCOURS_RESULT_FOLDER' , PHPWG_PLUGINS_PATH . CONCOURS_DIR . '/result/');
34
35
36define('CONCOURS_TABLE' , $prefixeTable . 'concours');
37define('CONCOURS_DETAIL_TABLE' , $prefixeTable . 'concours_detail');
38define('CONCOURS_DATA_TABLE' , $prefixeTable . 'concours_data');
39define('CONCOURS_RESULT_TABLE' , $prefixeTable . 'concours_result');
40
41
42
43load_language('plugin.lang', CONCOURS_PATH);
44
45include_once CONCOURS_INC_PATH.'Concours.class.php';
46global $page, $template;
47
48
49$concours = new Concours();
50
51// disable meta to picture page (if param)
52add_event_handler('loc_begin_picture',array(&$concours, 'disable_meta_to_picture'));
53
54
55// Add concours to picture page
56add_event_handler('loc_end_picture', array(&$concours, 'display_concours_to_picture')); 
57// Add admin page - DEPRECATED
58//add_event_handler('get_admin_plugin_menu_links', array(&$concours, 'concours_admin_menu') );
59
60// MenuBar
61add_event_handler('blockmanager_register_blocks', array(&$concours, 'register_blocks') );
62add_event_handler('blockmanager_apply', array(&$concours, 'blockmanager_apply') );
63
64add_event_handler('loc_end_section_init', array(&$concours, 'section_init_concours'));
65
66// Publish result page
67add_event_handler('loc_end_index', array(&$concours, 'index_concours'));
68
69// Global vote page (with all thumbnails)
70add_event_handler('loc_end_index', array(&$concours, 'index_vote_concours'));
71
72
73// Add Global note under thumbnail
74add_event_handler('loc_end_index_thumbnails', array(&$concours, 'thumbnail_note'), 50, 2);
75
76// Add PWG Stuffs
77add_event_handler('get_stuffs_modules', array(&$concours, 'concours_stuffs_module'));
78
79// Add description with contest informations on category
80add_event_handler ('render_category_description', array(&$concours, 'add_contest_desc'), EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
81
82
83
84/* +-----------------------------------------------------------------------+
85 * | CSS/JS Style                                                          |
86 * +-----------------------------------------------------------------------+ */
87add_event_handler('loc_end_page_header', 'ConcoursPhoto_css_js');
88
89function ConcoursPhoto_css_js() {
90        global $template;
91       
92        $template->append('head_elements', '<link rel="stylesheet" type="text/css" href="'.CONCOURS_PATH . 'template/style.css">');
93}
94
95
96
97
98set_plugin_data($plugin['id'], $concours)
99
100?>
Note: See TracBrowser for help on using the repository browser.