Gossamer Forum
Home : Products : DBMan : Customization :

Graphi Displaying

Quote Reply
Graphi Displaying
Please help me with graphic displaying. There must have been a lot discussion concerning this. I need some help for graphic displaying, either with uploading function or without.
Thanks a lot.

Quote Reply
Re: Graphi Displaying In reply to
You didn't say what exactly you needed help with?

If you check the FAQ noted below under the section "Images" you will find various thread references which discuss working with graphics.

If you do not find your answer there, please be specific as to what you want to do and what you have tried.



Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
Quote Reply
Re: Graphi Displaying In reply to
Sorry, Lois.
I have all the images saved on the server and each images named according to key field of the data, say 1.gif, 2.gif,...
How could I display the image with the date ---
name|image|title|email|phone|...

By the way, I treid the FAQ, but could not find the specific instruction.
Thank you very much.

Quote Reply
Re: Graphi Displaying In reply to
You should be able to display the field like you would any any static web page. Try using this in your display:

<IMG SRC="http://URL/to/graphicsdirectory/nameofgraphic.gif">

I don't know if all your graphic will be .gif or .jpg or how you are entering the graphic name into your database?
Are you entering the filename and extension in that field?
Or are you entering the full path and the filename and extension for the images?

You could assign a variable within your .cfg file and call it something like:
$graphics_directory = 'http://yourserver.com/graphics';

and then you could use:

<IMG SRC="$graphics_directory/NAMEOFGRAPHIC">

If all your files were .jpg you could use:

<IMG SRC="$graphics_directory/$rec{$db_key}.jpg">

This will really depend on how you are entering the data into your image field.

Hope this helps.

Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
Quote Reply
Re: Graphi Displaying In reply to
In Reply To:
I have all the images saved on the server and each images named according to key field of the data, say 1.gif, 2.gif,...
If you are not entering the name of the images into the database at all, but rather, are just naming them according to the record ID, and if all the records have an image, it will be as simple as entering something in html.pl in the html_record sub like:
<img src="http://www.yourserver.com/imgdir/$rec{'ID'}.jpg">

A better and easy approach is to use one of the image upload mods, for example: http://www.gossamer-threads.com/...ces/jump.cgi?ID=1027

Quote Reply
Re: Graphi Displaying In reply to
Thank you all so much for your kind and prompt help. I will try to follow your advice tonight. Good lucks for me.

Really grateful.