source: extensions/addThis/main.inc.php @ 14919

Last change on this file since 14919 was 4309, checked in by tiico, 14 years ago

[AddThis] Version 1.0.0

File size: 1.8 KB
Line 
1<?php
2/*
3 * Plugin Name: AddThis
4 * Version: 1.0.0
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) */
16/* 1.0.0 --> Version finale + lang ES, IT, ZH */
17/********* TODO  *********/
18//-
19
20 
21if (!defined('PHPWG_ROOT_PATH'))  die('Hacking attempt!');
22 
23define('ADDTHIS_NAME', 'AddThis');
24define('ADDTHIS_ROOT', dirname(__FILE__));
25define('ADDTHIS_DIR' , basename(dirname(__FILE__)));
26define('ADDTHIS_CFG_FILE' , ADDTHIS_ROOT.'/'.ADDTHIS_DIR.'.dat');
27define('ADDTHIS_PATH' , PHPWG_PLUGINS_PATH . ADDTHIS_DIR . '/');
28define('ADDTHIS_INC_PATH' , PHPWG_PLUGINS_PATH . ADDTHIS_DIR . '/include/');
29define('ADDTHIS_JS_PATH' , PHPWG_PLUGINS_PATH . ADDTHIS_DIR . '/js/');
30define('ADDTHIS_IMG_PATH' , PHPWG_PLUGINS_PATH . ADDTHIS_DIR . '/img/');
31define('ADDTHIS_ADMIN_PATH' , PHPWG_PLUGINS_PATH . ADDTHIS_DIR . '/admin/');
32
33include_once ADDTHIS_INC_PATH.'constants.inc.php';
34include_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
40add_event_handler('loc_end_page_header', array(&$obj, 'AddThis_link' ));
41// Affichage du lien Addthis sous les vignettes
42add_event_handler('loc_end_index', array(&$obj, 'add_AddThis_icon'));
43
44add_event_handler('loc_begin_picture', array(&$obj, 'add_AddThis_icon')); 
45add_event_handler('get_admin_plugin_menu_links', array(&$obj, 'addthis_admin_menu') );
46set_plugin_data($plugin['id'], $obj)
47
48
49?>
Note: See TracBrowser for help on using the repository browser.