![]() |
|
Re-organizing Albums - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: Re-organizing Albums (/thread-13240.html) |
Re-organizing Albums - Tobias - 2019-05-09 After a few years of usage we now came to the conclusion that our Zenphoto site would benefit from a re-organization of the existing 350+ albums. Mainly because there are so many of them (~50) on the top-level of the site, but also because there is no predictable and/or coherent naming pattern. While such a re-organization is manageable in Zenphoto we would be facing the immense task of adjusting all the external links pointing to our Zenphoto images and pages. So I was wondering if there was a smarter way to tackle this challenge than to simply rename/move the Zenphoto folders. Some ideas I was playing around with already: Another idea I had was to move the folders and create .htaccess rewrite rules for the old names. Would this be enough for the legacy links created by Zenphoto to still work or are there references hidden in the database that would require an actual folder to exist while answering such a request? Any input is appreciated! Thank you! Re-organizing Albums - acrylian - 2019-05-09 Since Zenphoto's gallery is file system based so any change in structure should reflect this. I think symlinks for all this could get quite complicated to manage and opens issue possibilities. You baseically want to redirect outdated links not existing anymore to the actual current one. Which is naturally a good idea for SEO. htaccess would be the server side way to archive such redirections of outdated links to current one with http status code "301 moved permanently". htaccess happens before Zenphoto is involved itself. You basically catch outdated links right at the beginning. An alternative could be a new filter hook in 1.5.2 you might find interesting. That will allow to redirect pages after a bit ZP setup but before the actual theme page contextes are setup. You would have to write a plugin that features a catalogue of old current urls and their then new destinations. Then you could check the current request and redirect to the actual destinations on matches. This is already in the 1.5.2b support build. The filter hook is named "redirection_handler". It just passes the current url request you can then filter and change to the new location (it does not allow external links). htaccess could be better performance wise if there is a lot to compare I assume since above there is still some setup involved even if the theme page setup is not yet done. Re-organizing Albums - Tobias - 2019-05-09 Oh, that new filter hook sounds promising! Just in time. Re-organizing Albums - acrylian - 2019-05-10 Keep an eye on the support build. I originally wanted to spare this for later but since you are a good candidate for testing ;-) I am seeing to add a simple plugin which can load a json or csv file (so you can maintain your list of redirections via Excel or similar) of redirection pairs. Re-organizing Albums - ctdlg - 2019-05-11 You can also
I did use this on my website ! Re-organizing Albums - acrylian - 2019-05-11 @ctdlg I think you misunderstood the problem. The issue here is really not how to re-organize. ZP has tools to move and rename albums. Re-organizing Albums - ctdlg - 2019-05-13 I understand your comments. I did a comment about links in albums, images descriptions or pages, articles - not about automatic links when clicking on a thumb. If you rename a folder, your own link using this folder name have to be modified too, and my method is fast. Re-organizing Albums - acrylian - 2019-05-13 Ah, sorry, I indeed misread that somehow! As long as you redirect old URL to new URLs this would also be covered. But yes the best is of course to update static links. |