Hi. New ZP user but big fan. Very impressed with the product and tireless developers. Already have my list of tweaks to do, so I hope to be a more active member.
So easiest question for the first post: Album name spaces translating to "%20" quickly make for a long ugly URL. I searched how to at least shrink this to ONE char. I was intrigued how spaces in filenames turned to "+", but spaces in album names turned to "%20". I tracked it down to the use of "rawurlencode" (in pathurlencode()) vs "urlencode". So I tried changing pathurlencode() to use "urlencode". This seem to cause most of my thumbnail images to show broken links.
So my question is: Is this worthwhile to track down and fix? Do you know why this might break some things? Or does using "+" in URLs instead of "%20" just a bad idea.
Using:
Zenphoto version 1.2.6 [4335] (Official Build)
PHP version: 5.2.10
Graphics support: PHP GD library bundled (2.0.34 compatible)
MySQL version: 5.0.77
Apache 2.2.11_4 (mod_rewrite turned on)
Comments
So if you upload via ftp you should name your files and folders using underscores or "-" instead of spaces first place. Also remember the album folder name/image file name is independed from the title you can set on the backend!
This is actually no issue.
I should have described my use case better:
I run ZP on a server (FreeNAS) in my office. As such, I can create a Windows share of the albums folder. Result: Super easy Windows explorer drag-drop picture sharing & album creation for my wife (and me) without bring up the admin web page.
Stephen: I tried to track down the use of '+' as an alias for 'space' in URLs, and it looks a little too iffy for me. Seems like '+' in place of a 'space' should only be allowed in a query (after the first '?'). But browsers seem to support (by accident?) translating '+' as a 'space' when typed into the address bar or used in a link.
Anyway, I think I found an acceptable solution for my needs:
- Disallow use of space in the directory/album name (they are ignored just like ".dirname")
- When a directory is found, translate all '_' to 'space' for the album title.
Therefore:
- A little extra work changing 'space' to '_' for all directory names
- URLs use one char to separate words
- Album names use words and spaces correctly.