Announcement

#1 2014-05-19 18:07:46

JoeBlow
Member
2014-05-19
3

Photos Per Page Depending On Album?

Hello,

I was wondering if there was a way to change to amount of photos per page on a per album basis?

I know where the global settings are for all the galleries, but I have a couple albums with very small images which would be more suited to having more images per page.

Was hoping there might be some slick config.inc trick to make this happen.

Thanks!

Piwigo version: 2.62

Offline

 

#2 2014-05-19 18:37:06

flop25
Piwigo Team
2006-07-06
7037

Re: Photos Per Page Depending On Album?

Hello

no that doesn't exist,  but that could be made as a plugin using the init trigger to change that number before the query to database


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#3 2014-05-19 19:01:47

ddtddt
Piwigo Team
Quetigny - France
2007-07-27
7207

Re: Photos Per Page Depending On Album?

Hi :-)
You can test to personal plugin

add_event_handler('loc_begin_index', 'modifynbthumbnail');
function modifynbthumbnail()
{
global $page;   
  if (!empty($page['category']['id'])&&$page['category']['id']== 1)   //Change 1 to you id album
  {
    $page['nb_image_page']=5;
  }
}


You love Piwigo so don't hesitate to participate, learn more on the "Contribute to Piwigo" page. If you don't have much time for contribution, you can also help the project with a donation.

Offline

 

#4 2014-05-19 19:08:42

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Photos Per Page Depending On Album?

I wrote this base on ddtddt proposal
http://piwigo.org/doc/doku.php?id=dev:c … oto_number

Offline

 

#5 2014-05-19 19:27:47

JoeBlow
Member
2014-05-19
3

Re: Photos Per Page Depending On Album?

Thank you both!!

This works perfectly!!!

Yay you!!

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact