Support

Support is part of Event Gallery Extended.

Please get a subscription if you need support. Feel free to use the ticket system or the contact form for reporting defects or pre-sale questions. Make sure you're logged in in order to be able to create a new ticket.

For general information you can also jump to the manual.

Subscribe now!

#4076 Script to walk image subfolders and auto create categories

Posted in ‘Event Gallery Extended’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by sbluege on Friday, 25 June 2021 04:28 UTC

ridgelift

I understand that image subfolders are not supported, and that front-end "folders" can be created using categories.  Have you or anyone else created a script that can walk an image folder hierarchy, copy each subdirectory image into a designated common folder, and auto create categories to match the hierarchical directory structure that's being scanned?  This would save a tremendous amount of time for people who want to switch to Event Gallery from some other image gallery that uses hierarchical folders (like me).  The polish of Event Gallery looks great, and I'm excited to use it!

sbluege

Hi Carl, 

unfortunately, I'm not aware of such a script. The only automatic thing I can offer is the "Sync Database"-button. You can place all your folders/files in the /images/com_eventgallery-folder and can use this feature to load them into Event Gallery without the need to create each of them in the backend. Then you could use the batch function to assign categories. 

ridgelift

Hi Sven,

Thanks for your response.  I haven't looked more deeply into your code, but I may try to write a script that does this.  Given your knowledge of how Event Gallery is architected, what's your guess as to the difficulty of writing such a script for someone who is familiar with MySQL and PHP?

sbluege

This would take a couple of hours. Here is how I would do it: 

- create a script which can create the necessary flat file hierarchy, transform the files, output the category hierarchy for each folder
- create the categories in Joomla (manually or automatically using something like Codecept or any other browser automation thingy) and store the IDs. You can try to create those categories with PHP code, but that would need to run in a Joomla environment to have all the classes and DB connections available.
- Grab the output of the first and the second script and add the category IDs to the table com_eventgallery_folder via SQL. With the input a script can create the SQL.