Hi
Is there a way to replace the spaces in the urls with underscores. Where I have albums with more than one word there is a space (%20) in the url which is causing a problem with a place I am connecting to.
For example
http://freepixelz.com/Celebrations/Baby_Shower/bat1-05975.JPG instead of
http://freepixelz.com/Celebrations/Baby Shower/bat1-05975.JPGThanks
Stuart
Comments
The seo_cleanup plugin allows doing this cleaning afterwards but since it uses above plugin underscores are not changed. You would have to create your own plugin version to change that.
If no more message it means it worked....
Many thanks!
That worked fine on my test site but on my main site it failed, maybe due to timeout as I have 35,000 images.
My image names are fine as they don't have spaces so it is only the albums that I need to fix so looks like I have to do it on the database.
I see there is a field called 'folder' in the the 'albums' table which will need changing but is there anything else? how about the htaccess file or zenphoto-rewrite.txt file?
Thanks for your help.
Stuart
If you want to do this only once you could try to temporarily edit the file zp-core/zp-extensions/seo_cleanup.php
Comment(or remove) lines 109-133.
This causes only albums/subalbums to be processed and maybe then the server won't timeout.
Be sure to revert to the original zp-core/zp-extensions/seo_cleanup.php file afterwards.
You may still get a warning on the backend that the file has been changed. If so, run setup again.
We'll take a look to add a plugin option so you can at least choose to clean images and/or albums.
I started making copies of the folders then adding hyphens and just changing the album titles but the hosting went down so I quit for the day...
I have decided to change to cloud hosting and will have to upload everything again so I think I will add hyphens to the folders before uploading which should be easier to sort out.
I will still keep the hosting as a backup so will try running the cleanup file with those lines commented out.
Thanks again for all of your help :-)
If you for example entered titles, descriptions, added tags etc. after uploading those albums all will be gone as a new folder name means new album (same for images). Zenphoto matches the database to the file system not the other way round.
If that is not a problem for you then fine of course.
Thanks
Stuart