PDA

View Full Version : Photos per page


malum
24th of December 2009 (Thu), 04:41
How do I add the option to view 500 photos per page
Or all photos on one page?

I see the code for all on one page and 500 per page (that were options in 1.5) are still there in languages/global.php but if I add the extra line of code, below, to list.php it adds the option to the drop down menu but selecting it just gives 100 per page

ee_option_plain ("500", $perpage,ee_translate_A($translated["500_per_page"]));

What else do I have to add and where?

Thanks

Overshot
26th of December 2009 (Sat), 06:18
In list.php you need to find and edit the code shown below.
if (strtoupper($perpage) == "ALL") {
$perpage = "100";
}
if ($perpage >= "100") {
$perpage = "100";
}

changing it as below worked for me although, under IE6, it did occasionally break with an "The XML page cannot be displayed" error. (the 'ALL' code is ignored unless you add that option as well)
if (strtoupper($perpage) == "ALL") {
$perpage = "100";
}
if ($perpage >= "500") {
$perpage = "500";
}
There may well be good reason why Pekka limited the per page display to 100. And, 500 or more per page does take quite a lot of resource to render.

Good luck

malum
2nd of February 2010 (Tue), 08:36
Sorry for the delay

many thanks for the info