[8770] | 1 | <?php |
---|
| 2 | /* |
---|
| 3 | * Plugin Name: Piwecard |
---|
[9342] | 4 | * Version: 1.0.4 |
---|
[8771] | 5 | * Description: envoi de Cartes Virtuelles |
---|
[8773] | 6 | * Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=487 |
---|
[8770] | 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 | |
---|
[9342] | 18 | define('ECARD_VERSION', '1.0.4'); |
---|
[8770] | 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 | |
---|
| 39 | $ecard = new ecard(); |
---|
| 40 | |
---|
| 41 | // Add ecard to picture page |
---|
| 42 | add_event_handler('loc_end_picture', array(&$ecard, 'display_ecard_to_picture')); |
---|
| 43 | // Add admin page |
---|
| 44 | add_event_handler('get_admin_plugin_menu_links', array(&$ecard, 'ecard_admin_menu') ); |
---|
| 45 | |
---|
| 46 | add_event_handler('loc_end_section_init', array(&$ecard, 'section_init_ecard')); |
---|
| 47 | add_event_handler('loc_end_index', array(&$ecard, 'index_ecard')); |
---|
| 48 | |
---|
| 49 | |
---|
| 50 | set_plugin_data($plugin['id'], $ecard) |
---|
| 51 | |
---|
| 52 | ?> |
---|