Re: choice of images

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 36448
interpreted = N
texte = Not as it is exactly, but it can serve as a starting point to get what you want. (I believe 90% of the work is done)Have you even tried the code I offered to see what you could have done so far?I think it will be not too much to tweak it as neededlike for starters, change the line(s) that say [showif [URL][FileName][/URL]^_photo] to say [showif [URL][FileName][/URL]^_pho]Another approach altogether could be to simply make fields in the product.db like hasThesePhotos, hasTheseClips, hasTheseMovies... etc. which contain values like - 0001_pho1.jpg,0001_pho2.jpg,0001_pho3.jpg and simply parse them out (if I said that right) using [listwords] with only the comma as a delimeter. But then you have to hassle updating those db fields every time a new file gets into the folder full of the photos and stuff. What a pain! Why not make webcat do all the work on the fly so all you have to do is upload a new photo/clip/whatever and your done!?!you're just going to have to dive in one way or another and try something/many things......attempt to tweak what I started, or start over and attempt it anew and ask Q's as you go.If you choose the latter then my input is- Simply storing the # of photos that live in a folder full of miscellaneous stuff isn't very useful data because you still have to somehow figure it which of them are the photos to display, as opposed to other stuff...If you want others to jump in, then I suggest the best way to solicit help is to wait a day, then repost a *much more condensed* version with a new subject line.:-)-JohnAlan wrote:> Just for review I'll describe what needs to be displayed and where: > > The Goal: > A page displays an image of a product found through a search and, if there are any other images of > that same product then I want to also show a line of text that says View other images 1 2 3. Some > products may only have one image which will already be displayed and therefore no text line about > click view others will be necessary. > > General Information: > WebCatalog v. 3.0.8 for Macintosh > > The targeted page which shows the first photo of a product is named results_1.tpl. Another page can > be the target for click 1 2 3 if necessary, but I would prefer to keep using the same > results_1.tpl if possible. > > The path to the images is ../images/[SKU]/[SKU]. > > Each [SKU] folder also contains other files but only about that one product. ([SKU]_V1.mov, > [SKU]_A1.mov, [SKU]_bodycopy1.html) > > All images we want to use in the click 1 2 3 list are named [SKU]_pho*some number*.jpg (such as: > 001_pho1.jpg, 002_pho2.jpg, etc.) > > There is a field in the database named PhotoPages that tells the exact number of images for each > item. (may not be of uses here) > > The results_1.tpl is part of a frame set but all the results are only in this one frame. The other > frame is a header. > > OK now that we're armed with all that information is the suggestion below going to work? > > Alan Jackson > > John Butler wrote: > > > try this: > > (again I did not have time to set up the appropriate folder and files to test this. > > (So hopefully I don't crash yer server ;-) > > Let me know what happens and we'll go from there. > > > > Assuming the first photo in the folder is the one displayed on results.tpl in the first place > > and that it is always named [sku]_photo1.jpg ... > > =============START portion of results.tpl============= > > > > > >

> > [math show=F]totalPhotoCount=0[/math] > > [math show=F]totalAudioCount=0[/math] > > [text show=F]PhotoList=[/text] > > [text show=F]AudioList=[/text] > > > > View alternate photos:
> > > > [ListFiles path=../images/[sku]/] > > [showif [URL][FileName][/URL]^_photo] > > [math show=F]totalPhotoCount=[totalPhotoCount]+1[/math] > > [text show=F]PhotoList=[PhotoList],[totalPhotoCount][/text] > > [text show=F]PhotoName[totalPhotoCount]=[FileName][/text] > > [text show=F]PhotoIndx[totalPhotoCount]=[totalPhotoCount][/text] > > [/showif] > > [/ListFiles] > > > > [ListWords Words=[PhotoList]&Delimiters=,] > > [hideif [URL][index][/URL]=1][hideif [URL][index][/URL]=2][!] > > [/!]- [/hideif] > [/!]&WhichPhoto=[URL][interpret][PhotoName[index]][/interpret][/URL][!] > > [/!]&PhotoIndx=[URL][word][/URL]>[!] > > [/!][Index]  > > [/hideif] > > [/ListWords] > > > > Hear which audio clip?:
> > > > [ListFiles path=../images/[sku]/] > > [showif [URL][FileName][/URL]^_A] > > [math show=F]totalClipCount=[totalClipCount]+1[/math] > > [text show=F]ClipList=[ClipList],[totalClipCount][/text] > > [text show=F]ClipName[totalClipCount]=[FileName][/text] > > [/showif] > > [/ListFiles] > > > > [ListWords Words=[ClipList]&Delimiters=,] > > [hideif [URL][index][/URL]=1]- [/hideif] > href=HearClip.tpl?sku=[URL][sku][/URL][!] > > [/!]&WhichClip=[URL][interpret][ClipName[index]][/interpret][/URL][!] > > [/!]&ClipIndx=[URL][word][/URL]>[Index]  > > [/ListWords] > > > > =============END portion of results.tpl============= > > > > =============START viewImage.tpl============= > > > > [!]---you get the idea to make your own HearClip.tpl?---[/!] > > > > [math show=F]totalPhotoCount=0[/math] > > [text show=F]PhotoList=[/text] > > > > > > Here is photo # [PhotoIndx], for product # [sku]:
> > > > > >

> > View alternate photos:
> > [ListFiles path=../images/[sku]/] > > [showif [URL][FileName][/URL]^_photo] > > [math show=F]totalPhotoCount=[totalPhotoCount]+1[/math] > > [text show=F]PhotoList=[PhotoList],[totalPhotoCount][/text] > > [text show=F]PhotoName[totalPhotoCount]=[FileName][/text] > > [text show=F]PhotoIndx[totalPhotoCount]=[totalPhotoCount][/text] > > [/showif] > > [/ListFiles] > > > > [ListWords Words=[PhotoList]&Delimiters=,] > > [hideif [URL][index][/URL]=[PhotoIndx]][!] > > [/!] > [/!]&WhichPhoto=[URL][interpret][PhotoName[index]][/interpret][/URL][!] > > [/!]&PhotoIndx=[URL][word][/URL]>[!] > > [/!][Index]  > > [/hideif] > > [/ListWords] > >

> > Back > > to main page for product # [sku] > > > > > > =============END viewImage.tpl============= > > > > Alan wrote: > > > > > All of the files in the folder begin with the SKU for that item only, and then end with something > > > that describes their use (at least they make sense to my customer who named them). They are a > > > mixture of jpeg images, QuickTime Movies and html files. However all of the files I want to use > > > in this case do end with _pho*some number*.jpg. > > > > > > By the way I will do similar select item 1 2 3 displays on other pages for audio clips and > > > video clips which end with _A*some number*.mov and _V*some number*.mov. Maybe that will help > > > in the approach you suggest. > > > > > > As always thanks for the help, > > > > > > Alan Jackson > > > (WebCat 3.0.8, Mac) > > ------------------------------------------------------------- > 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://search.smithmicro.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://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: choice of images (John Butler 2000)
  2. Re: choice of images (Alan 2000)
  3. Re: choice of images (John Butler 2000)
  4. Re: choice of images (John Butler 2000)
  5. Re: choice of images (Alan 2000)
  6. Re: choice of images (John Butler 2000)
  7. Re: choice of images (John Butler 2000)
  8. Re: choice of images (Alan 2000)
  9. Re: choice of images (John Butler 2000)
  10. choice of images (Alan 2000)
Not as it is exactly, but it can serve as a starting point to get what you want. (I believe 90% of the work is done)Have you even tried the code I offered to see what you could have done so far?I think it will be not too much to tweak it as neededlike for starters, change the line(s) that say [showif [url][FileName][/URL]^_photo] to say [showif [url][FileName][/URL]^_pho]Another approach altogether could be to simply make fields in the product.db like hasThesePhotos, hasTheseClips, hasTheseMovies... etc. which contain values like - 0001_pho1.jpg,0001_pho2.jpg,0001_pho3.jpg and simply parse them out (if I said that right) using [listwords] with only the comma as a delimeter. But then you have to hassle updating those db fields every time a new file gets into the folder full of the photos and stuff. What a pain! Why not make webcat do all the work on the fly so all you have to do is upload a new photo/clip/whatever and your done!?!you're just going to have to dive in one way or another and try something/many things......attempt to tweak what I started, or start over and attempt it anew and ask Q's as you go.If you choose the latter then my input is- Simply storing the # of photos that live in a folder full of miscellaneous stuff isn't very useful data because you still have to somehow figure it which of them are the photos to display, as opposed to other stuff...If you want others to jump in, then I suggest the best way to solicit help is to wait a day, then repost a *much more condensed* version with a new subject line.:-)-JohnAlan wrote:> Just for review I'll describe what needs to be displayed and where: > > The Goal: > A page displays an image of a product found through a search and, if there are any other images of > that same product then I want to also show a line of text that says View other images 1 2 3. Some > products may only have one image which will already be displayed and therefore no text line about > click view others will be necessary. > > General Information: > WebCatalog v. 3.0.8 for Macintosh > > The targeted page which shows the first photo of a product is named results_1.tpl. Another page can > be the target for click 1 2 3 if necessary, but I would prefer to keep using the same > results_1.tpl if possible. > > The path to the images is ../images/[SKU]/[SKU]. > > Each [SKU] folder also contains other files but only about that one product. ([SKU]_V1.mov, > [SKU]_A1.mov, [SKU]_bodycopy1.html) > > All images we want to use in the click 1 2 3 list are named [SKU]_pho*some number*.jpg (such as: > 001_pho1.jpg, 002_pho2.jpg, etc.) > > There is a field in the database named PhotoPages that tells the exact number of images for each > item. (may not be of uses here) > > The results_1.tpl is part of a frame set but all the results are only in this one frame. The other > frame is a header. > > OK now that we're armed with all that information is the suggestion below going to work? > > Alan Jackson > > John Butler wrote: > > > try this: > > (again I did not have time to set up the appropriate folder and files to test this. > > (So hopefully I don't crash yer server ;-) > > Let me know what happens and we'll go from there. > > > > Assuming the first photo in the folder is the one displayed on results.tpl in the first place > > and that it is always named [sku]_photo1.jpg ... > > =============START portion of results.tpl============= > > > > > >

> > [math show=F]totalPhotoCount=0[/math] > > [math show=F]totalAudioCount=0[/math] > > [text show=F]PhotoList=[/text] > > [text show=F]AudioList=[/text] > > > > View alternate photos:
> > > > [ListFiles path=../images/[sku]/] > > [showif [url][FileName][/URL]^_photo] > > [math show=F]totalPhotoCount=[totalPhotoCount]+1[/math] > > [text show=F]PhotoList=[PhotoList],[totalPhotoCount][/text] > > [text show=F]PhotoName[totalPhotoCount]=[FileName][/text] > > [text show=F]PhotoIndx[totalPhotoCount]=[totalPhotoCount][/text] > > [/showif] > > [/ListFiles] > > > > [ListWords Words=[PhotoList]&Delimiters=,] > > [hideif [url][index][/URL]=1][hideif [url][index][/URL]=2][!] > > [/!]- [/hideif][url][sku][/URL][!] > > [/!]&WhichPhoto=[url][interpret][PhotoName[index]][/interpret][/URL][!] > > [/!]&PhotoIndx=[url][word][/URL]>[!] > > [/!][Index]  > > [/hideif] > > [/ListWords] > > > > Hear which audio clip?:
> > > > [ListFiles path=../images/[sku]/] > > [showif [url][FileName][/URL]^_A] > > [math show=F]totalClipCount=[totalClipCount]+1[/math] > > [text show=F]ClipList=[ClipList],[totalClipCount][/text] > > [text show=F]ClipName[totalClipCount]=[FileName][/text] > > [/showif] > > [/ListFiles] > > > > [ListWords Words=[ClipList]&Delimiters=,] > > [hideif [url][index][/URL]=1]- [/hideif] > href=HearClip.tpl?sku=[url][sku][/URL][!] > > [/!]&WhichClip=[url][interpret][ClipName[index]][/interpret][/URL][!] > > [/!]&ClipIndx=[url][word][/URL]>[Index]  > > [/ListWords] > > > > =============END portion of results.tpl============= > > > > =============START viewImage.tpl============= > > > > [!]---you get the idea to make your own HearClip.tpl?---[/!] > > > > [math show=F]totalPhotoCount=0[/math] > > [text show=F]PhotoList=[/text] > > > > > > Here is photo # [PhotoIndx], for product # [sku]:
> > > > > >

> > View alternate photos:
> > [ListFiles path=../images/[sku]/] > > [showif [url][FileName][/URL]^_photo] > > [math show=F]totalPhotoCount=[totalPhotoCount]+1[/math] > > [text show=F]PhotoList=[PhotoList],[totalPhotoCount][/text] > > [text show=F]PhotoName[totalPhotoCount]=[FileName][/text] > > [text show=F]PhotoIndx[totalPhotoCount]=[totalPhotoCount][/text] > > [/showif] > > [/ListFiles] > > > > [ListWords Words=[PhotoList]&Delimiters=,] > > [hideif [url][index][/URL]=[PhotoIndx]][!] > > [/!][url][sku][/URL][!] > > [/!]&WhichPhoto=[url][interpret][PhotoName[index]][/interpret][/URL][!] > > [/!]&PhotoIndx=[url][word][/URL]>[!] > > [/!][Index]  > > [/hideif] > > [/ListWords] > >

> > [url][sku][/URL]>Back > > to main page for product # [sku] > > > > > > =============END viewImage.tpl============= > > > > Alan wrote: > > > > > All of the files in the folder begin with the SKU for that item only, and then end with something > > > that describes their use (at least they make sense to my customer who named them). They are a > > > mixture of jpeg images, QuickTime Movies and html files. However all of the files I want to use > > > in this case do end with _pho*some number*.jpg. > > > > > > By the way I will do similar select item 1 2 3 displays on other pages for audio clips and > > > video clips which end with _A*some number*.mov and _V*some number*.mov. Maybe that will help > > > in the approach you suggest. > > > > > > As always thanks for the help, > > > > > > Alan Jackson > > > (WebCat 3.0.8, Mac) > > ------------------------------------------------------------- > 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://search.smithmicro.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://search.smithmicro.com/ John Butler

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:

OT-test (1998) WebCat2b13MacPlugIn - [showif][search][/showif] (1997) WebDelivery downloads alias, not original ? (1997) Another new bug found ... (2000) UK credit card info follow-up (1997) Showif with an or (2003) [WebDNA] Calendar script (2009) Assigning carts (1998) best way to store prefs (1998) [shell] oddity (2002) Not Enough Memory for Database? (2003) Moment of Thanks (1997) WebCat2b13MacPlugIn - [include] (1997) Help! WebCat2 bug (1997) Order not created error (1997) details (2003) Forms Search Questions (1997) covertchars db to keep CR's, but not new ones (2002) EMailer - WebSTAR V - OSX - WebDNA (2003) Has ANYONE gotten the [object] context to work with Java(OSX) ??? HELP! (2002)