Changeset 19535 for extensions/Panoramas/AS_Panorama.php
- Timestamp:
- Dec 23, 2012, 2:40:24 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Panoramas/AS_Panorama.php
r19460 r19535 7 7 if ( !function_exists( 'AS_panorama_content' ) ) { 8 8 if ( !defined('IN_ADMIN') or !IN_ADMIN ) { 9 add_event_handler('render_element_content', 'AS_panorama_content', 99, 2 );9 add_event_handler('render_element_content', 'AS_panorama_content', 41, 2 ); 10 10 function AS_panorama_content($content, $image) 11 11 { … … 20 20 if (isset($image['width']) and $image['width'] < $asp['min_viewport_width']) return $content; 21 21 22 $divtag = "<img src=\"";23 $divtag.= str_replace( "./", "", $image['path'])."\" width=\"".$image['width']."\" ";24 $divtag.= "height=\"".$image['height']."\" ";25 $divtag.= "alt=\"".$image['file']."\" id=\"theMainImage\" ";26 27 22 if ($image['height'] > $asp['viewport_height']) { 28 23 $ratio = $image['width'] / $image['height']; … … 31 26 } 32 27 28 $content = "<img src=\"".str_replace( "./", "", $image['path'])."\" width=\"".$image['width']."\" height=\"".$image['height']."\" alt=\"".$image['file']."\" id=\"theMainImage\"></img>"; 29 30 33 31 $asp['image_name'] = $image['name']; 34 32 $asp['width'] = $image['width']; … … 41 39 $asp['name'] = str_replace($asp['in_mode_360'],'', $image['name']); 42 40 } 41 $asp['footer_view'] = 'false'; 43 42 44 43 $template->set_filenames( 45 44 array('AS_panorama_content' => dirname(__FILE__) . '/template/AS_panorama_content.tpl') ); 46 45 $asp['Path'] = embellish_url($template->get_template_vars('ROOT_URL').ASP_PATH); 47 $asp['content'] = $ divtag;46 $asp['content'] = $content; 48 47 $template->assign( array( 'ASP' => $asp, ) ); 49 48 return $template->parse('AS_panorama_content', true);
Note: See TracChangeset
for help on using the changeset viewer.