/** * Gets the select layout page and returns it to the load_theme_script filter * * @param string $path Path of the layout file * @return string * @return string */ function getLayout($path) { global $_zp_gallery, $_zp_gallery_page, $_zp_current_image, $_zp_current_album, $_zp_current_zenpage_page, $_zp_current_zenpage_news, $_zp_current_category, $_zp_current_search; if ($path) { $themepath = THEMEFOLDER . '/' . $_zp_gallery->getCurrentTheme() . '/'; $getlayout = false; switch ($_zp_gallery_page) { case 'album.php': if (getOption('multiple_layouts_albums')) { $getlayout = getSelectedLayout($_zp_current_album, 'multiple_layouts_albums'); } break; case 'image.php': if (getOption('multiple_layouts_images')) { $currentalbumname = $_zp_current_album->name; if (in_context(ZP_SEARCH_LINKED) && !in_context(ZP_ALBUM_LINKED)) { if (!($album = $_zp_current_search->getDynamicAlbum())) { $album = $_zp_current_album; } } else { $getlayout = getSelectedLayout($_zp_current_image, 'multiple_layouts_images'); $album = $_zp_current_album; } if ($album && !$getlayout) { $getlayout = checkLayoutUseForImages($album); } } break; case 'pages.php': if (getOption('multiple_layouts_pages')) { $getlayout = getSelectedLayout($_zp_current_zenpage_page, 'multiple_layouts_pages'); } break; case 'news.php': if (getOption('multiple_layouts_news_categories') && in_context(ZP_ZENPAGE_NEWS_CATEGORY)) { $getlayout = getSelectedLayout($_zp_current_category, 'multiple_layouts_news_categories'); } elseif (getOption('multiple_layouts_news') && in_context(ZP_ZENPAGE_SINGLE)) { $getlayout = getSelectedLayout($_zp_current_zenpage_news, 'multiple_layouts_news'); } break; } if ($getlayout && $getlayout['data'] && file_exists(internalToFilesystem(SERVERPATH . '/' . $themepath . $getlayout['data']))) { return $themepath . $getlayout['data']; } } return $path; }
} resizeFullImageDiv(); window.onresize = function(event) { resizeFullImageDiv(); } </script> <?php } ?> </div> <div id="object-info"> <?php // The following checks and modifications of breadcrumb link backs are necessary when using an album layout without pagination, since default behaviour is to provide a link back to the album page the image is on. $linkbackpaged = true; if (function_exists('getSelectedLayout')) { $albumlayout = getSelectedLayout($_zp_current_album, 'multiple_layouts_albums'); } else { $albumlayout = array('data' => ''); } if ($albumlayout['data'] == 'album-masonry.php' || $albumlayout['data'] == 'album-galleria.php' || getOption('zpbase_defaultalbum') == 'album-galleria' || getOption('zpbase_defaultalbum') == 'album-masonry') { $linkbackpaged = false; if (in_context(ZP_SEARCH_LINKED)) { $_zp_current_search->page = '1'; } } ?> <div id="object-title"> <div id="breadcrumb"> <?php printParentBreadcrumb('', ' / ', ' / '); if ($linkbackpaged) {