Gossamer Forum
Home : Products : DBMan : Customization :

Errors installing Multiple Upload Mod

Quote Reply
Errors installing Multiple Upload Mod
Ok, I've tried the single upload mod and the multiple upload mod and everything works until I get to the html.pl file and try to add in this section:

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

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

### Wherever you want your graphics to print out, use the following:
|;
if (-e "$SAVE_DIRECTORY/$rec{$db_key}") {
opendir (GRAPHIC, "$SAVE_DIRECTORY/$rec{$db_key}") or &cgierr("unable to open directory: $SAVE_DIRECTORY/$rec{$db_key}. Reason: $!");
@files = readdir(GRAPHIC);
closedir (GRAPHIC);
foreach $file (@files) {
next if ($file =~ /^\./); # Skip "." and ".." entries..
next if ($file =~ /^index/); # Skip index.htm type files..
print qq|<img src= "$SAVE_DIRECTORY_URL/$rec{$db_key}/$file">|;
}
}
print qq|


I've discovered if I comment out the following:

... ### Wherever you want your graphics to print out, use the following:
... #|;
... if (-e "$SAVE_DIRECTORY/$rec{$db_key}") {

and

... }
... }
... #print qq|

Script at least runs. Otherwise, both mods give DBMan an internal error without without any debug info. Sorry, I'm a Perl hack at best. What am I missing here?


Thanks in advance.
Famous Last words:
"Dragon? What dragon?"
Quote Reply
Re: [dunsel] Errors installing Multiple Upload Mod In reply to
Post your html.pl file here as an attachment. Someone will need to look at where you are putting the code in relation to the existing code.
Quote Reply
Re: [Watts] Errors installing Multiple Upload Mod In reply to
I added the mod from a stock DBMan download. The only changes I had made when attempting to add the mod was changes to the default.cfg. I do have the autogenerate turned off. I'm in the process of modifying the forms in the html.pl for the customer as we speak so you'll pardon the mess.
Famous Last words:
"Dragon? What dragon?"
Quote Reply
Re: [dunsel] Errors installing Multiple Upload Mod In reply to
DUH! I guess it helps if you think a little bit about where that chunk of code should go. Inside the <TABLE> structure. Sorry guys. Been 25 hours a day on this site and the brain is a little slow. Got it working. Thanks for the help
Famous Last words:
"Dragon? What dragon?"