Changeset 28850
- Timestamp:
- Jun 29, 2014, 4:26:30 PM (10 years ago)
- Location:
- extensions/SocialButtons
- Files:
-
- 1 added
- 2 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/SocialButtons/admin.php
r26100 r28850 48 48 ); 49 49 50 conf_update_param('SocialButtons', serialize($conf['SocialButtons']));50 conf_update_param('SocialButtons', $conf['SocialButtons']); 51 51 $page['infos'][] = l10n('Information data registered in database'); 52 52 … … 64 64 $template->set_filename('socialbutt_content', realpath(SOCIALBUTT_PATH . 'template/admin.tpl')); 65 65 $template->assign_var_from_handle('ADMIN_CONTENT', 'socialbutt_content'); 66 67 ?> -
extensions/SocialButtons/main.inc.php
r26100 r28850 11 11 defined('PHPWG_ROOT_PATH') or die('Hacking attempt!'); 12 12 13 // +-----------------------------------------------------------------------+ 14 // | Define plugin constants | 15 // +-----------------------------------------------------------------------+ 16 define('SOCIALBUTT_ID', basename(dirname(__FILE__))); 17 define('SOCIALBUTT_PATH' , PHPWG_PLUGINS_PATH . SOCIALBUTT_ID . '/'); 18 define('SOCIALBUTT_ADMIN', get_root_url() . 'admin.php?page=plugin-' . SOCIALBUTT_ID); 19 define('SOCIALBUTT_VERSION', 'auto'); 13 global $conf; 14 15 define('SOCIALBUTT_ID', basename(dirname(__FILE__))); 16 define('SOCIALBUTT_PATH' , PHPWG_PLUGINS_PATH . SOCIALBUTT_ID . '/'); 17 define('SOCIALBUTT_ADMIN', get_root_url() . 'admin.php?page=plugin-' . SOCIALBUTT_ID); 20 18 21 19 22 // +-----------------------------------------------------------------------+ 23 // | Add event handlers | 24 // +-----------------------------------------------------------------------+ 25 // init the plugin 26 add_event_handler('init', 'socialbutt_init'); 20 $conf['SocialButtons'] = safe_unserialize($conf['SocialButtons']); 21 27 22 28 23 if (defined('IN_ADMIN')) … … 43 38 add_event_handler('loc_end_picture', 'socialbutt_add_button'); 44 39 add_event_handler('loc_end_index', 'socialbutt_add_button'); 45 }46 47 48 /**49 * plugin initialization50 */51 function socialbutt_init()52 {53 global $conf, $pwg_loaded_plugins;54 55 include_once(SOCIALBUTT_PATH . 'maintain.inc.php');56 $maintain = new SocialButtons_maintain(SOCIALBUTT_ID);57 $maintain->autoUpdate(SOCIALBUTT_VERSION, 'install');58 59 $conf['SocialButtons'] = unserialize($conf['SocialButtons']);60 40 } 61 41 … … 186 166 return str_replace($search, $search.$add, $content); 187 167 } 188 189 ?>
Note: See TracChangeset
for help on using the changeset viewer.