At long last, the patch is ready for general testing. The patch now attached to the bug (
http://piwigo.org/bugs/view.php?id=3182, file named upload_plugin_support-20141231.diff) should do everything needed to generalize support for different file types. The patch does the following:
* If a pwg_representative already exists (because you uploaded it manually), then don't generate a new one.
* Allow pwg_representative generation when
** Files are uploaded directly
** Files are synchronized (ftp+synchronization, optional)
** Files are viewed for the first time
* File extensions are now all case insensitive in $conf['picture_ext'] and $conf['file_ext']
* $conf['file_ext'] only needs to have extensions that you want to be able to upload, but that do not have an upload_plugin. It doesn't need to have all extensions.
You should now no longer need to create a representative extension if an upload_plugin is available to support the file extension, and upload_plugins are easy to write (essentially, take in a file name, run a shell command to generate your pwg_representative, return an array with success and the representative extension).
The patch should apply cleanly to the current subversion trunk.
A few notes for the more seasoned Piwigo developers:
* I don't think that the function is_valid_image_extension in admin/include/functions_upload.inc.php is needed anymore. Can you please verify that, and if not, delete it?
* There are a few places where I'm needing to include the new files that may be a bit processing-intensive. If you see a way to simplify that, I'd definitely be interested.
As far as I can tell, everything is done to make raw images work in Piwigo and to enable many more file types to be easily supported.