Announcement

#1 2016-07-25 15:48:23

Nightly
Member
2010-09-27
9

Is any real way to maintain default view size in picture page?

Hello.

Today I updated from 2.1.x version to 2.8.2

The main issue is default photo view size is very small in my 15.6 screen. I tried to edit Picture Sizes for Medium, Small and all other. But in picture viewer it is doesn't give expected results

My photo (600x800) is still showing in S as (450x600), and have option original 600x800.

My settings for S is 600x600 / M: 800x800 and / L: 900x900. The smaller ones are disabled.

Why Piwigo uses the smallest size for big screen? I found only solution to disable all sizes except L. But then this one may have problems for mobile users. How to make default view Large or Original size?

I tried to add to Local Config through LocalFilesEditor

$conf['derivative_default_size'] = 'large'; (also tried medium), but it didn't give results.

Why it is so hard to put default size? It must be very easy option but not so complicated.

Thank you.


-----------------------------
Piwigo version: 2.8.2
Theme: MODUS
PHP version:
MySQL version:
Piwigo URL: http://

Offline

 

#2 2016-11-24 04:03:51

JimY
Guest

Re: Is any real way to maintain default view size in picture page?

I have the same problem here. Tried include/config_default.inc.php and also googled without success.

I suspect it might be something related to the theme. Currently use MODUS and didn't find setting for picture size. Only see thumbnail size settings in theme.

 

#3 2016-11-24 04:37:26

JimY
Guest

Re: Is any real way to maintain default view size in picture page?

OK Trace back to

vi ./themes/modus/themeconf.inc.php

Looks like they set automatically adjust size according to the screen size and simply ignore the config settings.

I just copied their code added to line 427 and ignore their settings by this:

        if (!$selected_derivative)
        {
                $as_pending = true;
                $selected_derivative = $element_info['derivatives'][ pwg_get_session_var('picture_deriv',$conf['derivative_default_size']) ];
        }

//JimY added this line
        $selected_derivative = $element_info['derivatives'][ pwg_get_session_var('picture_deriv',$conf['derivative_default_size']) ];

I know I should create a sub-theme or whatsoever, but I'm just too lazy.

 

#4 2016-11-24 11:03:16

flop25
Piwigo Team
2006-07-06
7037

Re: Is any real way to maintain default view size in picture page?

JimY wrote:

I know I should create a sub-theme or whatsoever, but I'm just too lazy.

^^ that's a copy/paste of /themeconf.inc.php with just the header changed accordingly with the folder name you set


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

 

#5 2016-11-25 19:54:37

KungFuJosh
Member
2016-08-21
28

Re: Is any real way to maintain default view size in picture page?

Nightly wrote:

I tried to add to Local Config through LocalFilesEditor

$conf['derivative_default_size'] = 'large'; (also tried medium), but it didn't give results.

Instead of editing the default config file with LFE, create a new file called config.inc.php and put it in your piwigo config folder. Something like this:  yoursite.com/piwigo/local/config/config.inc.php

That file will override anything in the default file. The code you have above should do what you want if you put it in the config.inc.php file.

You might need to manually clear the cache folder.

Thanks,
Josh

Last edited by KungFuJosh (2016-11-25 19:55:30)

Offline

 

#6 2016-11-25 22:16:17

flop25
Piwigo Team
2006-07-06
7037

Re: Is any real way to maintain default view size in picture page?

KungFuJosh wrote:

Nightly wrote:

I tried to add to Local Config through LocalFilesEditor

$conf['derivative_default_size'] = 'large'; (also tried medium), but it didn't give results.

Instead of editing the default config file with LFE,

LocalFilesEditor does edit the local config file and not the default one which is only available as read only


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

 

Board footer

Powered by FluxBB

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