Gossamer Forum
Home : Products : DBMan : Customization :

please, new upload mod problem

Quote Reply
please, new upload mod problem
Hi!

Hope you people can understand my poor english, sorry...
Please, i have installed the new upload mod, and i'm having this problem:
when I add a new record everything works fine, the image appears when I confirm the add and so on.
But when I list the records the images do not appear anymore.
I have checked the upload directory and the images are there, renamed: 1.jpg, 2.jpg... but in
default.db they still are with their original paths and names.
Could you please tell me what am I doing wrong?
Thank you very much for your precious help!



Quote Reply
Re: please, new upload mod problem In reply to
The original paths and names will be in your .db file, but that has nothing to do with whether the file is displayed. The display of the file is not dependent on that field. In fact, the field is meaningless except to indicate whether a file has been uploaded or not.

Do a little test. See if the images come up when you do a search on any field other than the key field. If they do, you have left out part of the mod.

Code:

######################################################################
# file: html.pl
# sub html_record
#
# after
# my (%rec) = @_;
#
# add
#
######################################################################

$rec{$db_key} =~ s/<.?B>//g;

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: please, new upload mod problem In reply to
Thank you very much for your reply.
You're right! When I do a search on any other field the image appear, but when I use the "list all" link the images don't come up.
But I had already included that line you mentioned: $rec{$db_key} =~ s/<.?B>//g;
In fact, I'm using the user-friendly html.pl with short/long url and some other mods. And I already had a line like that in the html.pl too. There was this one: $rec{$db_key} =~ s/<?.B>//g; (a little bit different, but as I do know nothing about programming, I don't know what difference does it make... :(
Well, I didn't know what to do with that line, so I replaced one for another. Could it be that the problem?




Quote Reply
Re: please, new upload mod problem In reply to
Hi, JPDeni!

I think I could solve the problem by myself with your precious advice.
In html.pl, sub html_record, I had added the following line: $rec{$db_key} =~ s/<.?B>//g;
only in the short display. Now I added it on the sub html_record_long too and it's working fine!!
Thank you very very very much, God bless you!


Quote Reply
Re: please, new upload mod problem In reply to
It's hard sometimes to give generalized instructions that will suit everyone. I'm glad I was able to help you figure this one out.

JPD
http://www.jpdeni.com/dbman/