Changeset 26857 for extensions/Slide/Slide.php
- Timestamp:
- Jan 18, 2014, 2:19:26 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Slide/Slide.php
r21579 r26857 1 1 <?php 2 2 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 3 include_once(PHPWG_ROOT_PATH.'include/functions_plugins.inc.php'); 3 4 4 global $conf, $template,$smarty, $repeat ;5 global $conf, $template,$smarty, $repeat, $user, $page; 5 6 $params = array_merge(unserialize($conf['Slide'])); 6 7 … … 15 16 ',$smarty, $repeat); 16 17 }; 17 18 19 20 18 21 19 20 21 $plug_act = array(); 22 $withlightbox = get_db_plugins('active' , 'lightbox'); 23 if($withlightbox) 24 { 25 include_once(LIGHTBOX_PATH.'functions.inc.php'); 26 $params = unserialize($conf['lightbox']); 27 $template->func_combine_css(array('path'=>'plugins/lightbox/theme/'.$params['theme'].'/colorbox.css')); 28 29 $conf['lightbox_rel'] = isset($conf['lightbox_rel']) ? ++$conf['lightbox_rel'] : 0; 30 31 $lightbox_data = array( 32 "transition" => $params['transition'], 33 "speed" => $params['transition_speed'], 34 "initialWidth" => (!empty($params['initial_width']) ? $params['initial_width'] : $config_default['initial_width']), 35 "initialHeight" => (!empty($params['initial_height']) ? $params['initial_height'] : $config_default['initial_height']), 36 "width" => (!empty($params['fixed_width']) ? '"'.$params['fixed_width'].'"' : 'false'), 37 "height" => (!empty($params['fixed_height']) ? '"'.$params['fixed_height'].'"' : 'false'), 38 "catid" => @$page['category']['id'], 39 "section" => @$page['section'], 40 "tagids" => @implode(',', @$page['tag_ids']) 41 ); 42 43 $lightbox_data = json_encode( $lightbox_data ); 44 $template->assign('lightbox_data', $lightbox_data); 45 46 array_push($plug_act, 'lightbox'); 47 }; 48 49 $withGthumb = get_db_plugins('active' , 'GThumb'); 50 if($withGthumb) 51 { 52 $template->func_combine_css(array('path'=>'plugins/GThumb/template/gthumb.css')); 53 $params = $conf['GThumb']; 54 $GThumb_data = json_encode($params); 55 $template->assign('slideGThumb', $GThumb_data); 56 $template->assign('GThumb_derivative_params', ImageStdParams::get_custom(9999, $conf['GThumb']['height'])); 57 array_push($plug_act, 'GThumb'); 58 }; 59 60 $withEC = get_db_plugins('active' , 'EasyCaptcha'); 61 if($withEC) 62 { 63 //$template->func_combine_css(array('path'=>'plugins/EasyCaptcha/template/drag.css')); 64 //$template->func_combine_css(array('path'=>'plugins/EasyCaptcha/template/tictac.css')); 65 $params = $conf['EasyCaptcha']; 66 $EasyCaptcha_data = json_encode($params); 67 $template->assign('slideEasyCaptcha', $EasyCaptcha_data); 68 array_push($plug_act, 'EasyCaptcha'); 69 }; 70 71 $template->assign('pluginActive' , $plug_act); 72 22 73 ?>
Note: See TracChangeset
for help on using the changeset viewer.