*/ /** * Render image block for use in external pages. * * @package ImageBlock * @subpackage UserInterface */ class ExternalView extends GalleryView { /** * @see GalleryView::loadTemplate() */ function loadTemplate(&$template, &$form) { GalleryCoreApi::requireOnce(dirname(__FILE__) . '/classes/ImageBlockHelper.class'); global $gallery; $SlideShow = array(); $startId = null; /* Force UrlGenerator to not add session id into urls.. */ $session =& $gallery->getSession(); $session->_isUsingCookies = true; $params = array(); foreach (array('blocks', 'show', 'itemId', 'maxSize', 'linkTarget', 'itemFrame', 'albumFrame') as $key) { $tmp = GalleryUtilities::getRequestVariables($key); if (!empty($tmp)) { $params[$key] = $tmp; } } list ($ret, $tpl) = ImageBlockHelper::loadImageBlocks($template, $params); if ($ret->isError()) { return array($ret->wrap(__FILE__, __LINE__), null); } return array(GalleryStatus::success(), array('html' => $tpl)); } } ?>