Piwigo
Piwigo copied to clipboard
Made format subdirectory (i.e. "pwg_format") configurable
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.
Another small change for maintaining tidy file systems: ignoring unix-style hidden files, e.g. the many empty ._ files created by MacOS.
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
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.
@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.
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?
@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?
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.