1 | <?php |
---|
2 | /* |
---|
3 | * Plugin Name: CoolIris-Piclens |
---|
4 | * Version: 0.4.4 |
---|
5 | * Description: Cooliris/Piclens activation |
---|
6 | * Plugin URI: http://piwigo.org/ext/extension_view.php?eid=234 |
---|
7 | * Author: Tiico |
---|
8 | * Author URI: |
---|
9 | * */ |
---|
10 | /********* Fichier main.inc.php *********/ |
---|
11 | |
---|
12 | /* See CHANGELOG for release informations */ |
---|
13 | |
---|
14 | |
---|
15 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
16 | |
---|
17 | define('PICLENS_NAME', 'Cooliris/Piclens'); |
---|
18 | define('PICLENS_ROOT', dirname(__FILE__)); |
---|
19 | define('PICLENS_DIR' , basename(dirname(__FILE__))); |
---|
20 | define('PICLENS_CFG_FILE' , PICLENS_ROOT.'/'.PICLENS_DIR.'.dat'); |
---|
21 | define('PICLENS_CFG_FILE_OLD' , PICLENS_ROOT.'/data.dat'); // ancien fichier de config (version <= 0.2.5) |
---|
22 | define('PICLENS_CFG_FILE1' , PHPWG_PLUGINS_PATH.PICLENS_DIR.'.dat'); |
---|
23 | define('PICLENS_CFG_DB' , PICLENS_DIR); |
---|
24 | define('PICLENS_PATH' , PHPWG_PLUGINS_PATH . PICLENS_DIR . '/'); |
---|
25 | define('PICLENS_INC_PATH' , PHPWG_PLUGINS_PATH . PICLENS_DIR . '/include/'); |
---|
26 | define('PICLENS_IMG_PATH' , PHPWG_PLUGINS_PATH . PICLENS_DIR . '/img/'); |
---|
27 | define('PICLENS_ADMIN_PATH' , PHPWG_PLUGINS_PATH . PICLENS_DIR . '/admin/'); |
---|
28 | |
---|
29 | load_language('plugin.lang', PICLENS_PATH); |
---|
30 | |
---|
31 | include_once PICLENS_INC_PATH.'Piclens.class.php'; |
---|
32 | |
---|
33 | $obj = new Piclens(); |
---|
34 | $obj->load_config(); |
---|
35 | |
---|
36 | |
---|
37 | add_event_handler('loc_end_page_header', array(&$obj, 'piclens_link' )); |
---|
38 | add_event_handler('loc_end_index', array(&$obj, 'add_piclens_icon')); |
---|
39 | add_event_handler('loc_end_index' , array(&$obj, 'piclenswall')); |
---|
40 | add_event_handler('loc_end_index', array(&$obj, 'piclens_thumbnails')); |
---|
41 | add_event_handler('loc_begin_index', array(&$obj, 'set_make_full_url_piclens')); |
---|
42 | |
---|
43 | |
---|
44 | add_event_handler('get_admin_plugin_menu_links', array(&$obj, 'piclens_admin_menu') ); |
---|
45 | set_plugin_data($plugin['id'], $obj); |
---|
46 | |
---|
47 | |
---|
48 | ?> |
---|