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] - brian On 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:

    
  1. Re: jpg and gif format thumbnails ( "Dennis J. Bonsall, Jr." 2004)
  2. Re: jpg and gif format thumbnails ( Brian Fries 2004)
  3. Re: jpg and gif format thumbnails ( Kenneth Grome 2004)
  4. jpg and gif format thumbnails ( Lester 2004)
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] - brian On 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:

Browser Check for WebDNA compatability (1999) Looking up two prices in Formulas.db (1997) Using Plug-In while running 1.6.1 (1997) Restart of DBserver (1997) Forcing price recalculation in shopping cart (1998) [WebDNA] install issues on Centos 6 (2017) Email (1998) Caching [include] files ... (1997) Convertchars Problem (2004) Talk List Suggestions (1997) WebCat2b13MacPlugin - [math][date][/math] problem (1997) New Cart No. on same page (2003) simple answer? [hideif] (1997) Content search & results (2008) searchable list archive (1997) Checkboxes (1998) no global [username] or [password] displayed ... (1997) Sorting Results (1999) Uploading very large image files (2003) Re2: frames & carts (1997)