1 | <?php |
---|
2 | /* |
---|
3 | * Plugin Name: Piwecard |
---|
4 | * Version: auto |
---|
5 | * Description: envoi de Cartes Virtuelles |
---|
6 | * Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=487 |
---|
7 | * Author: Tiico |
---|
8 | * Author URI: |
---|
9 | * */ |
---|
10 | /********* Fichier main.inc.php *********/ |
---|
11 | |
---|
12 | /* See CHANGELOG for release informations */ |
---|
13 | |
---|
14 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
15 | |
---|
16 | global $prefixeTable; |
---|
17 | |
---|
18 | define('ECARD_VERSION', '1.1.0'); |
---|
19 | |
---|
20 | define('ECARD_NAME', 'Piwecard'); |
---|
21 | define('ECARD_ROOT', dirname(__FILE__)); |
---|
22 | define('ECARD_DIR' , basename(dirname(__FILE__))); |
---|
23 | define('ECARD_CFG_DB' , ECARD_DIR); |
---|
24 | define('ECARD_PATH' , PHPWG_PLUGINS_PATH . ECARD_DIR . '/'); |
---|
25 | define('ECARD_INC_PATH' , PHPWG_PLUGINS_PATH . ECARD_DIR . '/include/'); |
---|
26 | define('ECARD_IMG_PATH' , PHPWG_PLUGINS_PATH . ECARD_DIR . '/img/'); |
---|
27 | define('ECARD_ADMIN_PATH' , PHPWG_PLUGINS_PATH . ECARD_DIR . '/admin/'); |
---|
28 | |
---|
29 | define('ECARD_TABLE' , $prefixeTable . 'ecard'); |
---|
30 | |
---|
31 | load_language('plugin.lang', ECARD_PATH); |
---|
32 | |
---|
33 | include_once ECARD_INC_PATH.'ecard.class.php'; |
---|
34 | include_once( PHPWG_ROOT_PATH.'include/functions_mail.inc.php' ); |
---|
35 | include_once( PHPWG_ROOT_PATH.'include/functions_picture.inc.php' ); |
---|
36 | global $page, $template; |
---|
37 | |
---|
38 | // Load language files |
---|
39 | load_language('plugin.lang', ECARD_PATH); |
---|
40 | |
---|
41 | $ecard = new ecard(); |
---|
42 | |
---|
43 | // Add ecard to picture page |
---|
44 | add_event_handler('loc_end_picture', array(&$ecard, 'display_ecard_to_picture')); |
---|
45 | // Add admin page |
---|
46 | add_event_handler('get_admin_plugin_menu_links', array(&$ecard, 'ecard_admin_menu') ); |
---|
47 | |
---|
48 | add_event_handler('loc_end_section_init', array(&$ecard, 'section_init_ecard')); |
---|
49 | add_event_handler('loc_end_index', array(&$ecard, 'index_ecard')); |
---|
50 | |
---|
51 | |
---|
52 | set_plugin_data($plugin['id'], $ecard) |
---|
53 | |
---|
54 | ?> |
---|