album.pl Support > Feature Requests

image name check

(1/1)

thecaretaker:
I've had this problem a couple of times now, each time it seems to take me ages to work out whats going on.

Would it be possible to do a check in the folder your uploading to (before the upload) that the name of the image doesn't already exist?

I run a monthly photo competition now, Have set 12 folders within a folder January to December. Only I have permission to upload to this folder. This month, the theme is Twins. I had 2 users send me an image with the same name. twins and Twins. It took me 20 minutes to work out why the software kept renaming one of the existing image titles. It's happened before without me realising it. But it is infrequent, so had a job to remember what it was that caused it before.

A non-case sensitive check of the image name would be really handy. With a pop up warning that a file of the same name already exists.

For a man of your programming abilities, you'd probably find that a pretty easy one to fix ;D

thecaretaker:
oooh. Double wammy. Just had a member log in with a capital Axxxx not a small axxxx which created a new album with a capital Axxxx which renamed the original folder with a capital (well, didn't rename the folder, just changed the name that was displayed for the folder). (you still with me here).

So it's a album wide issue, even with logging in. I assume the server does realise that Axxxx and axxxxx can be different as I do have 2 folders one with a capital and one with lower case. But the code in the album reads it as the same and shows 2 folder names with a capitial Axxxx. It must be the 'title' code routine that displays folders title, image name etc that can't see any difference. Now that might not be so easy to sort out :-X

Mike Bobbitt:
Actually this *should* be a pretty easy fix. In album.pl, find/edit:


--- Code: --- # Found the description we're looking for (not via the search screen)
if ($descline=~/^$desctosearch$/i || $descline=~/^$desctosearch:.*$/i)
--- End code ---

and take out the i (for case insensitive):


--- Code: --- # Found the description we're looking for (not via the search screen)
if ($descline=~/^$desctosearch$/ || $descline=~/^$desctosearch:.*$/)
--- End code ---

It won't work "retroactively" but should work the next time the twins/Twins problem occurs...

Thanks for bringing it up!


Cheers
Mike

thecaretaker:
Your a wonderful man! Thanks for looking at that. I've altered the code and will report back if I find any problems with it. Who would have thought an 'i' could make such a difference ;D

Thanks for your continued support and dedication to this project. You don't get support like this if you buy software that costs 100s, let alone free! You should be knighted! ;)

Navigation

[0] Message Index

Go to full version