Changeset 11086 for extensions/imgpreview/main.inc.php
- Timestamp:
- May 28, 2011, 6:37:55 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/imgpreview/main.inc.php
r11079 r11086 4 4 Version: auto 5 5 Description: give an image preview when the mouve is over a thumbnail 6 Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid= 6 Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=551 7 7 Author: Flop25 8 8 Author URI: http://www.planete-flop.fr/ 9 9 */ 10 10 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 11 define('IMGP_DIR' , basename(dirname(__FILE__))); 12 define('IMGP_PATH' , PHPWG_PLUGINS_PATH . IMGP_DIR . '/'); 13 add_event_handler('get_admin_plugin_menu_links', 'imgpreview_lien_menu'); 14 function imgpreview_lien_menu($menu) 15 { 16 17 array_push( 18 $menu, 19 array('NAME' => 'Image Preview', 20 'URL' => get_admin_plugin_menu_link(get_root_url().'plugins/'.IMGP_DIR.'/admin/admin.php') 21 ) 22 ); 23 return $menu; 24 } 11 25 /** thumbnails.tpl **/ 12 26 add_event_handler('loc_end_index_thumbnails', 'imgpreview_thumbnails'); 13 27 function imgpreview_thumbnails($tpl_thumbnails_var) 14 28 { 15 global $template; 29 global $template, $conf ; 30 31 $conf_imgp = explode("#" , $conf['imgpreview']); 32 $imgpreview=array( 'width' => $conf_imgp[0], 'height' => $conf_imgp[1] ); 33 $template->assign(array( 34 'imgpreview' => $imgpreview 35 )); 36 16 37 $template->set_prefilter('index_thumbnails', 'imgpreview_prefilter_thumbnails'); 17 38 $template->set_prefilter('stuffs', 'imgpreview_prefilter_thumbnails'); 18 /*19 $UrlJs = get_root_url().'plugins/imgpreview/js/imgpreview.js';20 $UrlCss = get_root_url().'plugins/imgpreview/css/imgpreview.css';21 $template->append(22 'head_elements',23 '<script type="text/javascript" src="'.$UrlJs.'"></script>'."\n".24 "\t".'<link rel="stylesheet" type="text/css" href="'.$UrlCss.'">'."\n"25 );26 $template->append(27 'footer_elements',28 '<script type="text/javascript" src="'.get_root_url().'plugins/imgpreview/js/init.js"></script>'."\n"29 );30 */31 39 $dir=dirname(__FILE__).'/css_js.tpl'; 32 40 $template->set_filenames(array( 33 41 'imgpreview_css_js' => realpath($dir), 34 42 ) ); 35 //die('_'.realpath($dir).'_');36 //$imgpreview_css_js = $template->parse('imgpreview_css_js', true);37 43 $template->assign_var_from_handle('IMGPREVIEW', 'imgpreview_css_js'); 38 44 39 //define('IMGPREVIEW',$imgpreview_css_js);40 //die(IMGPREVIEW);41 45 return $tpl_thumbnails_var; 42 46 }
Note: See TracChangeset
for help on using the changeset viewer.