Re: jpg and gif format thumbnails
This WebDNA talk-list message is from 2004
It keeps the original formatting.
numero = 57702
interpreted = N
texte = If you don't know whether an image has a .gif or .jpg thumbnail, then you can to use [fileinfo] to determine which thumb file exists then show that one. I'd code it something like this:[text]myThumb=nophoto.jpg[/text][!]default[/!][if "[thumb]"="Y"][then][if "[fileinfo photos/[thumbname].jpg][exists][/fileinfo]"="T"][then][text]myThumb=[thumbname].jpg[/text][/then][else][if "[fileinfo photos/[thumbname].gif][exists][/fileinfo]"="T"][then][text]myThumb=[thumbname].gif[/text][/then][/if][/else][/if][/then][/if]

- brianOn May 5, 2004, at 5:24 PM, Lester wrote:> I have an old site that always had jpg format> thumbnails that now needs to show animated gif> thumbnails as well>> Since they were all "jpg" i never required the> extension to be added when entering the file name in> the items admin page, since I just added it to the> html when viewed>> Now I need .gif as well as .jpg to be shown>>> this is the code used on the page showing the> thumbnails>>

>> is there an easy way to show either?>> Can webdna differentiate if it's a jpg ot a gif?>> I know it can figure out imageheight or imagewidth.>> thanks>-- Brian Fries, BrainScan Software -- http://www.brainscansoftware.com ---------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
.To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
If you don't know whether an image has a .gif or .jpg thumbnail, then you can to use [fileinfo] to determine which thumb file exists then show that one. I'd code it something like this:[text]myThumb=nophoto.jpg[/text][!]default[/!][if "[thumb]"="Y"][then][if "[fileinfo photos/[thumbname].jpg][exists][/fileinfo]"="T"][then][text]myThumb=[thumbname].jpg[/text][/then][else][if "[fileinfo photos/[thumbname].gif][exists][/fileinfo]"="T"][then][text]myThumb=[thumbname].gif[/text][/then][/if][/else][/if][/then][/if]
- brianOn May 5, 2004, at 5:24 PM, Lester wrote:> I have an old site that always had jpg format> thumbnails that now needs to show animated gif> thumbnails as well>> Since they were all "jpg" i never required the> extension to be added when entering the file name in> the items admin page, since I just added it to the> html when viewed>> Now I need .gif as well as .jpg to be shown>>> this is the code used on the page showing the> thumbnails>>
>> is there an easy way to show either?>> Can webdna differentiate if it's a jpg ot a gif?>> I know it can figure out imageheight or imagewidth.>> thanks>-- Brian Fries, BrainScan Software -- http://www.brainscansoftware.com ---------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Brian Fries
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
PCS Frames-Default page is solution! (1997)
searching more then one (1999)
[date] formatting bug inside [orderfile]? (1998)
process SSI (1998)
emailer (1997)
Whats wrong with this???? (2001)
Not reading code (1997)
WebCat with WebTen (1998)
Keep away (1997)
Math Context (2001)
Encrypt/Decrypt (2007)
Performance Issue (2000)
Default admin bug and how tech support reacted to it. (2000)
^ in a path (2001)
appleshare/ip (1997)
Orders to FMPro (2005)
PCS Frames (1997)
'page impression' techniques for banner ads (1999)
Hiding the URL(was Cart ID Duplication) (2001)
Re:2nd WebCatalog2 Feature Request (1996)