Gossamer Forum
Home : Products : DBMan : Installation :

How do you display the graphic?

Quote Reply
How do you display the graphic?
I went to http://www.jpdeni.com/dbman/Mods/file-upload.txt to allow users to upload their photos along with their profile. Everything works well (the graphic gets put to the directory, etc), except I don't understand where to put this:

Code:
### Wherever you want your graphic to print out, use the following:

|; # to close off a previous print qq| statement
$ALLOWED_EXT =~ s/\\.//g;
$ALLOWED_EXT =~ s/\$//g;
@extensions = split (/\Q|\E/o,$ALLOWED_EXT);
GRAPHIC: foreach $extension (@extensions) {
if (-e "$SAVE_DIRECTORY/$rec{$db_key}.$extension") {
print qq|<img src= "$SAVE_DIRECTORY_URL/$rec{$db_key}.$extension">|;
last GRAPHIC;
}
}
print qq|

You can run the script at http://www.andrews.edu/...man/db.cgi?db=alumni and you can see my html.pl file at http://www.andrews.edu/AIM/alumni.txt . Where would I add that perl code to the html.pl file for the graphic to appear above the right record? Thanks for your help.

Nelson
Quote Reply
Re: How do you display the graphic? In reply to
Ooops...sorry for putting my question up twice...you can delete the second one if it's not too much trouble.

Nelson
Quote Reply
Re: How do you display the graphic? In reply to
Even moderators can't delete threads. No problem. It happens sometimes.

You will have to build your own display in the html.pl file. You cannot use the autogenerate feature.


------------------
JPD






Quote Reply
Re: How do you display the graphic? In reply to
OK. I don't have time to do that now, but if I'm right, I just get the field with $rec{'fieldname'}? It's actually not bad that I have to do it, because I don't want the ID (same as login, to prevent multiples) to show up. I just never bothered since it 'worked'. =)

Nelson
Quote Reply
Re: How do you display the graphic? In reply to
For printing out the graphic, just use the code you posted first. You don't have to mess with any field names or anything. It's all part of the code.


------------------
JPD






Quote Reply
Re: How do you display the graphic? In reply to
Right, I understand the graphic part. What I meant is for the other fields, since I can't autogenerate the tables, etc.

Nelson
Quote Reply
Re: How do you display the graphic? In reply to
The best way to explain it is to point you to my website. The page at http://www.jpdeni.com/dbman/tutorial6.html is specifically about creating your own forms and displays.

Another thing you might consider is using the Configurator at http://www.jpdeni.com/dbman/config.html . If you enter your fields in the forms in the Configurator, you will end up with a basic sub html_record_form and sub html_record that includes everything you need for your setup.


------------------
JPD






Quote Reply
Re: How do you display the graphic? In reply to
Thanks alot for tutorial6.html. That answers all my questions. I'm making the tables right now, and I shouldn't have to bother you again. =)

Nelson
Quote Reply
Re: How do you display the graphic? In reply to
I just thought I'd let you know that everything went fine after I found out I had an extra print qq| statement. =) The only thing I need to do now is edit the html to my liking. Thanks so very much!

Nelson
Quote Reply
Re: How do you display the graphic? In reply to
ONE more thing (not related to the graphic): DBMan doesn't log the IP(?) (REMOTE_HOST) address. In the log file it just says, "someone logged on at 11:11:11 on 11-Jan-2000 from" and that's it. Any ideas? (This isn't a matter of life or death, but it's nice to know). Thanks.

Nelson
Quote Reply
Re: How do you display the graphic? In reply to
I'm not sure about the IP address. I've not delved into that part of it very much.

Glad you found the tutorial helpful. I figured it was easier to write it once and put it on my site than to write it a whole bunch of times on the forum. Smile

As for the html coding, you need to go to the next page in the tutorial. Smile

http://www.jpdeni.com/dbman/tutorial7.html



------------------
JPD