Changeset 17678
- Timestamp:
- Aug 31, 2012, 3:33:44 PM (12 years ago)
- Location:
- extensions/gvideo
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/gvideo/include/gvideo.inc.php
r17626 r17678 1 1 <?php 2 2 if (!defined('GVIDEO_PATH')) die('Hacking attempt!'); 3 4 /** 5 * some stuff at the begining of picture.php 6 */ 7 function gvideo_prepare_picture($picture) 8 { 9 if ($picture['current']['is_gvideo']) 10 { 11 // remove default parser 12 remove_event_handler('render_element_content', 'default_picture_content', EVENT_HANDLER_PRIORITY_NEUTRAL); 13 14 // remove autosize 15 global $pwg_loaded_plugins, $autosize_controler; 16 17 if ( isset($pwg_loaded_plugins['Autosize']) and isset($autosize_controler) ) 18 { 19 remove_event_handler('render_element_content', array(&$autosize_controler, 'init'), EVENT_HANDLER_PRIORITY_NEUTRAL); 20 remove_event_handler('render_element_content', array(&$autosize_controler, 'autosize_calcContent'), 40); 21 remove_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_script_1'), EVENT_HANDLER_PRIORITY_NEUTRAL); 22 remove_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_script_2'), EVENT_HANDLER_PRIORITY_NEUTRAL); 23 remove_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_script_3'), EVENT_HANDLER_PRIORITY_NEUTRAL); 24 remove_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_affiche'), EVENT_HANDLER_PRIORITY_NEUTRAL+21); 25 } 26 } 27 28 return $picture; 29 } 3 30 4 31 /** … … 16 43 $conf['gvideo'] = unserialize($conf['gvideo']); 17 44 18 remove_event_handler('render_element_content', 'default_picture_content', EVENT_HANDLER_PRIORITY_NEUTRAL);19 45 20 46 $query = ' … … 50 76 $video['config']['dailymotion']['color'] = $colors[ $video['config']['dailymotion']['color'] ]; 51 77 } 78 52 79 $template->assign('GVIDEO', $video); 80 81 global $user; 82 if (strpos('stripped', $user['theme']) !== false) 83 { 84 $template->append('head_elements', '<style type="text/css">.hideTabs{display:none;}</style>'); 85 } 53 86 54 87 $template->set_filename('gvideo_content', dirname(__FILE__).'/../template/video_'.$video['type'].'.tpl'); -
extensions/gvideo/main.inc.php
r17661 r17678 20 20 21 21 add_event_handler('init', 'gvideo_init'); 22 add_event_handler('picture_pictures_data', 'gvideo_prepare_picture'); 22 23 add_event_handler('render_element_content', 'gvideo_element_content', EVENT_HANDLER_PRIORITY_NEUTRAL-10, 2); 23 24
Note: See TracChangeset
for help on using the changeset viewer.