$derivative) { $url = $derivative->get_url(); if (isset($added[$url])) continue; $added[$url] = 1; $available_derivatives[] = $type; } global $user, $page, $template; $template->set_filenames( array('default_content'=> dirname(__FILE__).'/picture_content.tpl') ); $template->append('current', array( 'all_derivatives' => $all_derivatives, 'selected_derivative' => $selected_derivative, 'available_derivative_types' => $available_derivatives, ), true); $template->assign( array( 'ALT_IMG' => $element_info['file'] )); return $template->parse( 'default_content', true);; } ?>