Gossamer Forum
Home : Products : DBMan : Customization :

Image Display Not Right

Quote Reply
Image Display Not Right
Hi folks. Well Ive installed and got DBman and the upload mod installed and working. But when i got to adding pic#11 it displays with Pic#1.So I get pic1 & pic11 in field for pic1. Anyone able to give me a clue as to what to look for or change. If needed I'll gladly show you the code or site. Help Please!

Last edited by:

Kilo: Jun 21, 2004, 6:18 AM
Quote Reply
Re: [Kilo] Image Display Not Right In reply to
Not sure what is wrong but I imagine that if you had pic-111 and pic-1111 you'd get those as well.

Try adding pic12 and see if you get 1, 11 & 12 (or just 1 and 11).

It's seeing the numbers as 1* (meaning anything beginning with a 1).

If you were using a format of 001, 002, 003 that would solve the problem for up to 999 pictures.

Not sure how you go about changing the file name format though...

Last edited by:

Watts: Jun 21, 2004, 7:12 AM
Quote Reply
Re: [Watts] Image Display Not Right In reply to
Ok thanks Watts for the quick reply. I've added more and yes they display in the Pic#1 field as well as corectly in their own field. I'll bet when I hit 20, they will display in field Pic#2. So on your lead I added 00 to the first 1-9 records in the database and for now the problem is solved. Mind you i'll go over the whole setup and see if I can figure out what I may have done.

Thanks Again so much for the quick fix.
Quote Reply
Re: [Kilo] Image Display Not Right In reply to
Not sure which version of the mod you are using .. single or multiple upload but there are changing to the mod which will fix the problem.

One solution:

Check to be sure that the following is in sub html_record:

$file_test = $rec{$db_key};
foreach $file (@files) {
if ($file =~ /^$file_test\./) {
print qq|<img src= "$SAVE_DIRECTORY_URL/$file">|;
$graphic_found=1;
}
}

which is the fix for the single file upload version. Check the FAQ noted below under "Images" and see the fixes for multiple version if that is what you are using.

You may want to check the FAQ just so you know you have all the latest changes.

Besides changes from:

## $file_test = $in{$db_key} . ".";

to:

$file_test = $rec{$db_key};

There are also changes from:

# if ($file =~ /^$file_test/) {

to:

if ($file =~ /^$file_test\./) {

within the single file upload mod.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/

Last edited by:

LoisC: Jun 21, 2004, 1:46 PM