[3596] | 1 | <?php |
---|
| 2 | /* |
---|
| 3 | * Plugin Name: AddThis |
---|
[4309] | 4 | * Version: 1.0.0 |
---|
[3596] | 5 | * Description: AddThis activation |
---|
| 6 | * Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=293 |
---|
| 7 | * Author: Tiico |
---|
| 8 | * Author URI: |
---|
| 9 | * */ |
---|
| 10 | /********* Fichier main.inc.php ********* / |
---|
| 11 | /* 0.0.1 --> Initial version */ |
---|
| 12 | /* 0.0.2 --> Correction isset */ |
---|
| 13 | /* 0.0.3 --> Correction style des boutons (merci mistic100) */ |
---|
| 14 | /* Mise à jour nouvelle version AddThis */ |
---|
| 15 | /* Correction affichage miniature uniquement (désactivé sur les images car ne fonctionne pas) */ |
---|
[4309] | 16 | /* 1.0.0 --> Version finale + lang ES, IT, ZH */ |
---|
[3596] | 17 | /********* TODO *********/ |
---|
| 18 | //- |
---|
| 19 | |
---|
| 20 | |
---|
| 21 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
| 22 | |
---|
| 23 | define('ADDTHIS_NAME', 'AddThis'); |
---|
| 24 | define('ADDTHIS_ROOT', dirname(__FILE__)); |
---|
| 25 | define('ADDTHIS_DIR' , basename(dirname(__FILE__))); |
---|
| 26 | define('ADDTHIS_CFG_FILE' , ADDTHIS_ROOT.'/'.ADDTHIS_DIR.'.dat'); |
---|
| 27 | define('ADDTHIS_PATH' , PHPWG_PLUGINS_PATH . ADDTHIS_DIR . '/'); |
---|
| 28 | define('ADDTHIS_INC_PATH' , PHPWG_PLUGINS_PATH . ADDTHIS_DIR . '/include/'); |
---|
| 29 | define('ADDTHIS_JS_PATH' , PHPWG_PLUGINS_PATH . ADDTHIS_DIR . '/js/'); |
---|
| 30 | define('ADDTHIS_IMG_PATH' , PHPWG_PLUGINS_PATH . ADDTHIS_DIR . '/img/'); |
---|
| 31 | define('ADDTHIS_ADMIN_PATH' , PHPWG_PLUGINS_PATH . ADDTHIS_DIR . '/admin/'); |
---|
| 32 | |
---|
| 33 | include_once ADDTHIS_INC_PATH.'constants.inc.php'; |
---|
| 34 | include_once ADDTHIS_INC_PATH.'AddThis.class.php'; |
---|
| 35 | |
---|
| 36 | $obj = new AddThis(); |
---|
| 37 | $obj->load_config(); |
---|
| 38 | |
---|
| 39 | // Affichage du lien Addthis sous les vignettes |
---|
| 40 | add_event_handler('loc_end_page_header', array(&$obj, 'AddThis_link' )); |
---|
| 41 | // Affichage du lien Addthis sous les vignettes |
---|
| 42 | add_event_handler('loc_end_index', array(&$obj, 'add_AddThis_icon')); |
---|
| 43 | |
---|
| 44 | add_event_handler('loc_begin_picture', array(&$obj, 'add_AddThis_icon')); |
---|
| 45 | add_event_handler('get_admin_plugin_menu_links', array(&$obj, 'addthis_admin_menu') ); |
---|
| 46 | set_plugin_data($plugin['id'], $obj) |
---|
| 47 | |
---|
| 48 | |
---|
| 49 | ?> |
---|