Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Thumbnail image?

Quote Reply
Thumbnail image?
Thanks Alex for my previous one...
You guys are always very helpfull.

Looks like I am the only one having dbmansql questions.... Tongue

Anyhow, I managed to get upload working fine, now how would I get the thumbnail to show?
I have ImageMacig on my server, so I quess I need to use that, or do you have anyother suggestions?

How would I get imagemacig to make the thumbnail, and get it to on my database?

Thanks
Quote Reply
Re: [Suomi] Thumbnail image? In reply to
Hi,

You have to modify the search_results.html (or *_results.html) in default template. The command below should show the picture up:

<img src="db.cgi?cn=picture_field_name&do=view_file&db=<%db%>&id=<%primary_key_field%>">

So just replace:
<%loop results%>
<p><%Dbsql::HTML::generate_search_results%>
<%endloop%>

With:
<%loop results%>
Item: <%item%>
Price: <%price%>
Quantity: <%quantity%>
<%if picture%>
Picture: <img src="db.cgi?cn=picture&do=view_file&db=<%db%>&id=<%item%>">
<%endif%>
<%endloop%>

Hope that helps.

Cheers,
TheStone.

B.

Last edited by:

TheStone: Dec 13, 2001, 9:53 AM
Quote Reply
Re: [TheStone] Thumbnail image? In reply to
ohm... sorryBlush
Thanks for your answer, but what I meant to ask was how do I create the thumbnail automatically, and add that to database.

(I dont want to make the thunbs myself)

Thanks
Quote Reply
Re: [Suomi] Thumbnail image? In reply to
There is no way to create thumb image in DBMan SQLFrown. I think that you can use the command in my last posted, and then change the width and height of picture.
<img src="db.cgi?cn=picture_field_name&do=view_file&db=<%db%>&id=<%primary_key_field%>" width='whatever' height='whatever'>

Cheers,
TheStone.





B.

Last edited by:

TheStone: Dec 13, 2001, 11:09 AM