Pages: 1
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
Admin -> Users -> Manage, check users to select, Action: Number of photos per page.
Offline
I see that thanks. So there is no way to set a default - only affect them after they're registered, is that right?
Offline
It's a database property, table piwigo_user_infos column nb_image_page default 15. Use phpMyAdmin or similar to change the structure.
Offline
Thank you erAck, I'll give that a go.
Offline
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
> 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.
Offline
erAck and KWgagel, I sure wish there was an easy way to do this, such as a configuration choice. I would try to solution that KWgagel found, but I'm a novice at this and understand very little of the process you used. Isn't there a simple step-by-step instruction somewhere for neophytes like me?
cheers / Kozmo
Offline
Pages: 1