Changeset 23234 for extensions/SmiliesSupport/main.inc.php
- Timestamp:
- Jun 15, 2013, 6:52:37 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/SmiliesSupport/main.inc.php
r23204 r23234 4 4 Version: auto 5 5 Description: Allow add Smilies for comments and descriptions. 6 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=1596 Plugin URI: auto 7 7 Author: Atadilo & P@t & Mistic 8 8 */ … … 10 10 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 11 11 12 define('SMILIES_DIR', basename(dirname(__FILE__))); 13 define('SMILIES_PATH', PHPWG_PLUGINS_PATH . SMILIES_DIR . '/'); 12 define('SMILIES_ID', basename(dirname(__FILE__))); 13 define('SMILIES_PATH', PHPWG_PLUGINS_PATH . SMILIES_ID . '/'); 14 define('SMILIES_DIR', SMILIES_PATH . 'smilies/'); 14 15 15 include_once(SMILIES_PATH.'smiliessupport.inc.php'); 16 include_once(SMILIES_PATH.'include/functions.inc.php'); 17 include_once(SMILIES_PATH.'include/smiliessupport.inc.php'); 16 18 19 add_event_handler('init', 'init_smiliessupport'); 17 20 add_event_handler('render_comment_content', 'SmiliesParse', 60); 18 21 add_event_handler('render_contact_content', 'SmiliesParse'); 19 22 add_event_handler('loc_after_page_header', 'add_smiliessupport'); 23 24 25 function init_smiliessupport() 26 { 27 global $conf; 28 29 $conf['smiliessupport'] = unserialize($conf['smiliessupport']); 30 $conf['smiliessupport']['ext'] = array('gif', 'jpg', 'png', 'GIF', 'JPG', 'PNG'); 31 32 load_language('plugin.lang', SMILIES_PATH); 33 } 20 34 21 35 function add_smiliessupport() … … 59 73 { 60 74 add_event_handler('get_admin_plugin_menu_links', 'smiliessupport_admin_menu'); 75 add_event_handler('init', 'smiliessupport_get_list'); 76 61 77 function smiliessupport_admin_menu($menu) 62 78 { 63 79 array_push($menu, array( 64 80 'NAME' => 'Smilies Support', 65 'URL' => get_root_url().'admin.php?page=plugin-' . SMILIES_ DIR81 'URL' => get_root_url().'admin.php?page=plugin-' . SMILIES_ID 66 82 )); 67 83 return $menu; 68 84 } 69 85 } 86 70 87 ?>
Note: See TracChangeset
for help on using the changeset viewer.