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?
Problem with pagination 'all' and too many pictures
-
simonslee
- Phoca Member

- Posts: 11
- Joined: 18 Aug 2010, 15:31
- Jan
- Phoca Hero

- Posts: 49172
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Problem with pagination 'all' and too many pictures
Hi, the "all" parameter can be hidden in the code - the pagination class needs to be customized.
Jan
Jan
If you find Phoca extensions useful, please support the project
-
simonslee
- Phoca Member

- Posts: 11
- Joined: 18 Aug 2010, 15:31
Re: Problem with pagination 'all' and too many pictures
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?
Is this something I can easily change in the code, I wouldn't know where to start?
- Jan
- Phoca Hero

- Posts: 49172
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Problem with pagination 'all' and too many pictures
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:
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
- commenting the all value:
Code: Select all
$limits[] = JHTML::_('select.option', '0', JText::_('COM_PHOCAGALLERY_ALL'));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

- Posts: 11
- Joined: 18 Aug 2010, 15:31
Re: Problem with pagination 'all' and too many pictures
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.
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.
- Jan
- Phoca Hero

- Posts: 49172
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Problem with pagination 'all' and too many pictures
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 
If you find Phoca extensions useful, please support the project