Announcement

#1 2021-03-15 19:43:57

kwgagel
Member
2020-12-03
25

[resolved] Is there a way to set the default number of images users see at once?

Hello/Hi/Greetings,

Is there a way to set the default number of images piwigo displays to users see at once? I know the user can set it themselves in their customized settings but I'd like to setup a higher number as the default. I did look at the config_default.inc.php but don't see anything I can use there.

    Piwigo 11.3.0
    Operating system: Linux
    PHP: 7.4.15 (Show info) [2021-03-15 18:40:00]
    MySQL: 5.7.33 [2021-03-15 18:40:00]
    Graphics Library: ImageMagick 6.9.10-68


Piwigo URL: https://www.pgphotoclub.com/piwigo

Offline

 

#2 2021-03-16 03:10:33

erAck
Only trying to help
2015-09-06
1032

Re: [resolved] Is there a way to set the default number of images users see at once?

Admin -> Users -> Manage, check users to select, Action: Number of photos per page.


Running Piwigo at https://erack.net/gallery/

Offline

 

#3 2021-03-16 21:26:29

kwgagel
Member
2020-12-03
25

Re: [resolved] Is there a way to set the default number of images users see at once?

I see that thanks. So there is no way to set a default - only affect them after they're registered, is that right?

Offline

 

#4 2021-03-17 03:30:22

erAck
Only trying to help
2015-09-06
1032

Re: [resolved] Is there a way to set the default number of images users see at once?

It's a database property, table piwigo_user_infos column nb_image_page default 15. Use phpMyAdmin or similar to change the structure.


Running Piwigo at https://erack.net/gallery/

Offline

 

#5 2021-03-20 18:56:52

kwgagel
Member
2020-12-03
25

Re: [resolved] Is there a way to set the default number of images users see at once?

Thank you erAck, I'll give that a go.

Offline

 

#6 2021-03-20 19:29:46

kwgagel
Member
2020-12-03
25

Re: [resolved] Is there a way to set the default number of images users see at once?

No, that changes the current value for existing users. I wanted to change the default value so when new users are created they get that value instead of the default 15.

I did some searching of the coding and found that the column in the table is set to a default value. Some searching for how to update a default value on a column in mysql and I've been able to update it so it should be good going forward. Provided no future piwigo update alters that colum!

I logged into mysql as root, set the database to my piwigo db then ran this:
alter table piwigo_user_infos modify column nb_image_page smallint(3) unsigned not null default '50';

Thanks for your help.

Offline

 

#7 2021-03-20 21:23:28

erAck
Only trying to help
2015-09-06
1032

Re: [resolved] Is there a way to set the default number of images users see at once?

> No, that changes the current value for existing users.

You misunderstood. I did not say to change the records' column's values, but to change the database table structure's default value of the column field, which is the default value for newly inserted records. Which your alter table command did. So all good.


Running Piwigo at https://erack.net/gallery/

Offline

 

Board footer

Powered by FluxBB

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