Option to display all pictures on one page added

This commit is contained in:
Tom Canac 2014-01-30 10:52:08 +01:00
parent 94e7661b4b
commit 2a069b7dc3
2 changed files with 3 additions and 2 deletions

View file

@ -27,6 +27,7 @@ $sorting_folders = "name"; // Sort folders by: [name][date]
$sorting_files = "name"; // Sort files by: [name][date][size] $sorting_files = "name"; // Sort files by: [name][date][size]
$sortdir_folders = "ASC"; // Sort direction of folders: [ASC][DESC] $sortdir_folders = "ASC"; // Sort direction of folders: [ASC][DESC]
$sortdir_files = "ASC"; // Sort direction of files: [ASC][DESC] $sortdir_files = "ASC"; // Sort direction of files: [ASC][DESC]
$lazyload = 1; // 0 = pagination, 1 = display all pictures on one page.
//LANGUAGE STRINGS //LANGUAGE STRINGS
$label_home = "Home"; //Name of home link in breadcrumb navigation $label_home = "Home"; //Name of home link in breadcrumb navigation

View file

@ -298,7 +298,7 @@ if (sizeof($files) > 0)
$offset_end = $offset_start + $thumbs_pr_page; $offset_end = $offset_start + $thumbs_pr_page;
if ($offset_end > sizeof($dirs) + sizeof($files)) $offset_end = sizeof($dirs) + sizeof($files); if ($offset_end > sizeof($dirs) + sizeof($files)) $offset_end = sizeof($dirs) + sizeof($files);
if ($_GET["page"] == "all") if ($_GET["page"] == "all" || $lazyload)
{ {
$offset_start = 0; $offset_start = 0;
$offset_end = sizeof($dirs) + sizeof($files); $offset_end = sizeof($dirs) + sizeof($files);
@ -307,7 +307,7 @@ if (sizeof($files) > 0)
//----------------------- //-----------------------
// PAGE NAVIGATION // PAGE NAVIGATION
//----------------------- //-----------------------
if (sizeof($dirs) + sizeof($files) > $thumbs_pr_page) if (!$lazyload && sizeof($dirs) + sizeof($files) > $thumbs_pr_page)
{ {
$page_navigation .= "$label_page "; $page_navigation .= "$label_page ";
for ($i=1; $i <= ceil((sizeof($files) + sizeof($dirs)) / $thumbs_pr_page); $i++) for ($i=1; $i <= ceil((sizeof($files) + sizeof($dirs)) / $thumbs_pr_page); $i++)