diff --git a/config.php b/config.php index 9d803fc..6073caa 100644 --- a/config.php +++ b/config.php @@ -27,6 +27,7 @@ $sorting_folders = "name"; // Sort folders by: [name][date] $sorting_files = "name"; // Sort files by: [name][date][size] $sortdir_folders = "ASC"; // Sort direction of folders: [ASC][DESC] $sortdir_files = "ASC"; // Sort direction of files: [ASC][DESC] +$lazyload = 1; // 0 = pagination, 1 = display all pictures on one page. //LANGUAGE STRINGS $label_home = "Home"; //Name of home link in breadcrumb navigation diff --git a/index.php b/index.php index 4957b95..4afcded 100644 --- a/index.php +++ b/index.php @@ -298,7 +298,7 @@ if (sizeof($files) > 0) $offset_end = $offset_start + $thumbs_pr_page; 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_end = sizeof($dirs) + sizeof($files); @@ -307,7 +307,7 @@ if (sizeof($files) > 0) //----------------------- // PAGE NAVIGATION //----------------------- -if (sizeof($dirs) + sizeof($files) > $thumbs_pr_page) +if (!$lazyload && sizeof($dirs) + sizeof($files) > $thumbs_pr_page) { $page_navigation .= "$label_page "; for ($i=1; $i <= ceil((sizeof($files) + sizeof($dirs)) / $thumbs_pr_page); $i++)