'Stereo', 'URL' => get_admin_plugin_menu_link(STEREO_PATH.'/config.php'), )); return $menu; } function Stereo_change_picture($content, $image) { global $conf, $stereo, $template, $page; // $extension = strtolower(get_extension($image['file'])); if ($extension !== $stereo['ext']) { return $content; } if (!isset($image['image_url']) or !empty($content)) { // nothing to do or someone hooked us - so we skip; return $content; } $template->set_filenames(array('stereo_content' => dirname(__FILE__) . '/stereo.tpl') ); // compute display size if ( $stereo['fixedheight'] === '' ) { $stereo['containerheight'] = $image['height'] + $stereo['menuheight']; } else { $stereo['containerheight'] = $stereo['fixedheight'] + $stereo['menuheight']; } if ( $stereo['fixedwidth'] === '' ) { $stereo['containerwidth'] = $image['width']; } else { $stereo['containerwidth'] = $stereo['fixedwidth']; } // is high def available ? if ( !isset($page['slideshow']) and isset($image['high_url']) ) if ( !$page['slideshow'] and isset($image['high_url']) ) { $uuid = uniqid(rand()); $template->assign( 'high', array( 'U_HIGH' => $image['high_url'], 'UUID' => $uuid, ) ); } $template->assign( array( 'PHPWG_ROOT_PATH' => PHPWG_ROOT_PATH, 'STEREO_PATH' => STEREO_PATH, 'SRC_IMG' => $image['element_url'], 'stereo' => $stereo, ) ); load_language('plugin.lang', dirname(__FILE__).'/'); return $template->parse('stereo_content', true); } ?>