Gossamer Forum
Home : Products : DBMan : Customization :

another question on file uploading

Quote Reply
another question on file uploading
JPDeni: on your file uploading mod, you said it named the file as the user's username and that you can add it after the database "starts." How does someone access the image later on? Does it create a link in the person's record when a picture is uploaded and nothing when there is no pic? Do you know of any examples or sites that are using it?
Quote Reply
Re: another question on file uploading In reply to
I do know of some that are using it, but I don't know the URLs off the top of my head. If anyone who is using the file upload would like to let Bubba take a look, please post here.

When you install the mod, it looks for a file named the same as the $db_key value of the record plus an extension. For example, if the key for a record was "JPDeni," and I had set the allowed file extensions to be ".gif" and ".jpg" the script would look in the directory for "JPDeni.gif" and "JPDeni.jpg." If either one is found, it will load the graphic. If not, it won't load anything.

Another part of the mod is in sub html_modify_form_record. If someone didn't upload a file when they added their record, they could upload it when they modify the file.

Gotta go. Thunderstorm coming.


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





Quote Reply
Re: another question on file uploading In reply to
OK, thanks, Eliot.

If anyone knows anything about JPDeni's file uploading script: Is the picture seen along with the record? If yes, then is it possible to make it so that there's a link to the image instead of the photo appearing with the record? And what is shown when the person has no image uploaded?
Quote Reply
Re: another question on file uploading In reply to
I am using JPDeni's file-upload mod and the image appears along with the record. If no image has been uploaded you will just see the record.
Quote Reply
Re: another question on file uploading In reply to
Can I have the URL to your database? Want to take a look at it Smile
Quote Reply
Re: another question on file uploading In reply to
So the picture is seen along with the record? Is it possible to make it so that a link to the picture will come up and if someone clicks on it a pop-up window with the image appears?
Quote Reply
Re: another question on file uploading In reply to
You can use Java Script codes to have a pop-up window. Just place the Java Script codes between print qq| and |;.
There are free codes located at the top Java Script sites, including:

www.gamelan.com

Search this site for keywords, such as "pop-up", "window".

You can create a link called something like "Click here for Photo". Then use the following codes to link to the image:

Code:
<A HREF="$rec{'Image'}">Click here for Photo</a>

Then insert the appropriate Java Script codes in the link anchor. Replace $rec{'Image'} with the appropriate field or file name of the image that you want people to view.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us

[This message has been edited by Eliot (edited August 05, 1999).]