Piwigo icon indicating copy to clipboard operation
Piwigo copied to clipboard

Made format subdirectory (i.e. "pwg_format") configurable

Open joeroe opened this issue 5 years ago • 7 comments

Currently the multiple formats feature looks for formats in a hard-coded sub-directory, pwg_format, but it's not always desirable to organise files this way.

This change makes the name of the subdirectory a config variable (format_dir), defaulting to pwg_format to maintain backwards compatibility. It can be set to . to maintain a flat file structure.

joeroe avatar Sep 27 '18 14:09 joeroe

Another small change for maintaining tidy file systems: ignoring unix-style hidden files, e.g. the many empty ._ files created by MacOS.

joeroe avatar Sep 27 '18 15:09 joeroe

Hi @joeroe

Your code seems fine, but I would like to better understand why it's fine to have hard-coded pwg_representative and not pwg_format

plegall avatar Oct 01 '18 07:10 plegall

Thank you for the quick response @plegall. The simple answer is that I don't use pwg_representative, only pwg_format, so I only looked at that. I think it would be nice for both to be configurable.

To explain a little: I'm using Piwigo as a friendly interface for a preexisting gallery of scientific images that are linked to other databases. Therefore I'm trying to avoid changing the directory structure or inserting application-specific files, as much as possible.

joeroe avatar Oct 01 '18 08:10 joeroe

@plegall Is it possible to get an update on whether this will be merged into master? If not I would like to investigate making it a plugin, as each update is currently breaking my file structure.

joeroe avatar Sep 17 '19 15:09 joeroe

This looks promising. I'd like my raw images to be kept in the same directory as JPEGs - which is also the choice of many camera manufacturers. Any updates?

Arnie97 avatar Nov 21 '19 17:11 Arnie97

@plegall Sorry to be a bother, but any updates on this? The latest update has once again broken my formats. Would it help if I also made pwg_representative configurable and added it to the pull request?

joeroe avatar Aug 12 '20 08:08 joeroe

Hi @joeroe

@plegall Would it help if I also made pwg_representative configurable and added it to the pull request?

Yes please, do the same for pwg_representative and I'll merge the pull-request.

Warning: with #389 we have added some occurences of pwg_format in core PHP code.

plegall avatar Jul 23 '22 11:07 plegall