Problem with pagination 'all' and too many pictures

Phoca Gallery - image gallery extension
simonslee
Phoca Member
Phoca Member
Posts: 11
Joined: 18 Aug 2010, 15:31

Problem with pagination 'all' and too many pictures

Post by simonslee »

I am having a problem where I have categories with large amounts of photos (200+) and I have set the pagination values which is fine, but if someone selects 'all' they get browser error messages as its obviously trying to load a large number of photos in one go.

Is there a way to deactivate 'all' as an option and just set the pagination values so I can limit it to say like 30 - 40 per page which will be ok for loading limits?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49172
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Problem with pagination 'all' and too many pictures

Post by Jan »

Hi, the "all" parameter can be hidden in the code - the pagination class needs to be customized.

Jan
If you find Phoca extensions useful, please support the project
simonslee
Phoca Member
Phoca Member
Posts: 11
Joined: 18 Aug 2010, 15:31

Re: Problem with pagination 'all' and too many pictures

Post by simonslee »

I'm not a programmer, just a high end joomla user.

Is this something I can easily change in the code, I wouldn't know where to start?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49172
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Problem with pagination 'all' and too many pictures

Post by Jan »

Hi, in fact you should comment one line - to hide it, but because of security reasons, you need to limit the database results too in model of phoca gallery:

- commenting the all value:

Code: Select all

$limits[] = JHTML::_('select.option', '0', JText::_('COM_PHOCAGALLERY_ALL'));
in:
administrator\components\com_phocagallery\libraries\phocagallery\pagination\paginationcategory.php
administrator\components\com_phocagallery\libraries\phocagallery\pagination\paginationcategories.php

model:

components/com_phocagallery/models/ ...

Jan
If you find Phoca extensions useful, please support the project
simonslee
Phoca Member
Phoca Member
Posts: 11
Joined: 18 Aug 2010, 15:31

Re: Problem with pagination 'all' and too many pictures

Post by simonslee »

Hi Jan, thanks but as I said, Im not a programmer. I am happy to modify code but I need to be told exactly what to do.

I can find this line of code in the first 2 files, to I just delete the line?

What do i do with files in the /models/folder? You didnt say which files to change, and what exactly to change. Sorry, I just dont know exactly what I have to do.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49172
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Problem with pagination 'all' and too many pictures

Post by Jan »

Hi, just comment it, but if you don't know php it is better you will find some php expert to customize it for you :idea:
If you find Phoca extensions useful, please support the project
Post Reply