Announcement

#1 2019-03-04 07:03:53

Aderalia
Member
2019-03-04
9

Ignore .png files

Hello/Hi/Greetings,

I am trying to get Piwigo to totally ignore .png files, since i can not import IPTC Tags from them.
Each of my png files has a jpg file with the same name (apart from the extension).
Moving the png into a different folder is not a option because i want to keep my File Structure the way it is (which is why my galleries folder points to my picture drive)
A different approach would be to somehow tell piwigo which .png and .jpg files belong together (i am almost certain i have read about his somewhere but i cant find it anymore...)

Just removing png from the $conf['picture_ext'] variable dint help much.


Piwigo version: 2.9.4

Offline

 

#2 2019-03-05 21:55:24

Aderalia
Member
2019-03-04
9

Re: Ignore .png files

I found the option again i was looking for $conf['enable_formats'], however there is very little information about it, so im not realy sure how its supposed to work :)

I enabled it and add png to the $conf['format_ext'], which didnt do anything (at least as far as i can see). I have added png back to $conf['picture_ext'] list, and to me it looks like im back where i started. (A lot of untagged png in my Albums, alongside there tagged .jpg versions).

Again, my goal is to sort of hide the pngs, since i do want to keep them  in the same directory, but not have them show up in my Albums. (Again, im using the ftp import function to copy my whole folder structure onto my server).

Anything i have missed?

Offline

 

#3 2019-03-06 18:47:49

flop25
Piwigo Team
2006-07-06
6965

Re: Ignore .png files

nonono
$conf['format_ext']  is  for "additional versions of a photo (or another file)" which must enabled with the one just before

// enable_formats: should Piwigo search for multiple formats?
$conf['enable_formats'] = false;

$conf['picture_ext'] is used to apply all features specific to picture files such as metadata
$conf['file_ext'] is for the files Piwigo need to take into account


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

 

#4 2019-03-06 19:28:53

Aderalia
Member
2019-03-04
9

Re: Ignore .png files

['file_ext'] is a merged array out of ['picture_ext'] and a list of additional formats ('tiff', 'tif', 'mpg','zip','avi','mp3','ogg','pdf') by default.

So to remove png from the ['file_ext'] i have to remove it from ['picture_ext'] dont I?

If i do that they still show up as Question-marks, both in the Gallery and the admin Menu.

Offline

 

#5 2019-03-06 19:31:08

flop25
Piwigo Team
2006-07-06
6965

Re: Ignore .png files

Yes both. Do you delete the entries between synch?


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

 

#6 2019-03-06 19:37:53

Aderalia
Member
2019-03-04
9

Re: Ignore .png files

So this should work if i dint want pngs in my Galleries:

$conf['picture_ext'] = array('jpg','jpeg','gif');

$conf['file_ext'] = array_merge(
  $conf['picture_ext'],
  array('tiff', 'tif', 'mpg','zip','avi','mp3','ogg','pdf')
  );

After i made the changes i ran i sync. I did enable the sync for already existing entries etc.

And know it is working!

For some reason i had to include "$conf['file_ext']" part aswell, even tho i didnt change anything in there.

Thanks a lot for your help :)

Offline

 

#7 2019-03-06 19:47:46

flop25
Piwigo Team
2006-07-06
6965

Re: Ignore .png files

Nice! Have a good day!


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 facebook google+ newsletter Donate Piwigo.org © 2002-2019 · Contact