Quote:
Originally Posted by KenDude
If a user uploads a photo titled MyPhoto.JPG into vbgallery, vbg will create a thumbnail called MyPhoto_thumb.jpg by default.
|
Correct. So far I follow you when trying to reproduce this.
Quote:
However, your code in the pop up window is looking for MyPhoto_thumb.JPG (extension in caps like the original file) and so the user will see red x's instead of thumbnails when they look through their images because Linux treats the file extensions in a case sensitive manner.
|
Hm, that's where I'm losing you: the code for the thumbnails is genereted by strtolower-ing the file extension, thus it is always lowercase.
Quote:
Now if you click on that red x inserted thumbnail it WILL take you to the correct full size photo because the full size photo does end in .JPG or whatever the all caps extension happened to be.
|
Actually, the path and filename used to show the thumbnails in the popup window and for the insertion process come from exactly the same variable - they can not be different. Their extensions both have to be lowercase.
By the way: If I'm uploading an image that has a uppercase extension, vBG changes the original uppercase extension to lowercase.
Quote:
This should be as easy as making the _thumb file always end in a lowercase version
|
That's what the script does at the moment, actually...
Quote:
Thanks in advance for the fix, sorry to keep piling these on you, but my members are a picky bunch and usually find any issues with any code with any browser, etc...
|
No problem, really. Since I do not use vBG in a productive environment, I don't have the ability to do such intensive testing. This way, sooner or later we'll get it goin'
So, after some more thinking, I decided to take more information directly from the database. All filenames - thumbs, originals, everything including extensions - are now taken directly from the database and thus should mirror exactly what vBG uses. If it works there, it should also work with this mod. Please test the attached config file and see whether it solves the problem. If not, please check whether vBG indeed saves original files with uppercase extensions (which it does not for me - and I was unable to find an option in the vBG settings, tho I did not look too hard) and provide the content of the debug table field for "Code".