Re: Bug or syntax error on my part?

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 10726
interpreted = N
texte = Hi Gary,You gave two examples of searches, one from a hyperlink and the other from a [search] context. Since your hyperlink search works, I have not reproduced it here ... but I have reproduced your context-based search, because you say it does not work the same as your hyperlink search.I think I can see a minor change you need to make to your syntax. Here is your context-based search that doesn't work properly, and at the end of this message is a new one that I believe should work for you. First, the broken one: >[Search blah blah ] > >[founditems] >[/founditems] > >[/search] > > >[hideif [ipaddress]^207.135.254.] >[Search db=/webcatalog/webcounter.db&eqcounternamedata=mainpage] >[founditems] >[Replace >db=/webcatalog/webcounter.db&counternamedata=[countername]]countertotal=[mat >h][countertotal]+1[/math]&counterdate=[date %m/%d/%y]&countersort=[date >%Y/%m/%d][/replace] >[/founditems] >[/search] >[/hideif] <----This DOES NOT BLOCK or Hide > >[include /macro/mainfooter.tmpl] Take a look at the differences between your template above and the one I've shown below. Do you see what I've done to change the lower one? My only change was to moved one of your [/search] tags so that it appears at the end of the page instead of in the middle of the page. This should make it work the same as the search you were using from your hyperlink.Remember, when you do a search from a hyperlink, the entire results template is contained within an *IMPLIED* search context. This means that there is an invisible [search] tag at the top of the page, and there is an invisible [/search] tag at the bottom of the page. But this only applies in a 'hyperlink search'.When you switch from a' hyperlink search' to a 'hyperlink showpage with a context-based search', you actually have to place those tags on the results template yourself - and they must be located in the same places where they are *implied* by a hyperlink search - with the [search] at the top of the page and the [/search] at the bottom of the page ... :) >[Search blah blah ] > >[founditems] >[/founditems] > > >[hideif [ipaddress]^207.135.254.] >[Search db=/webcatalog/webcounter.db&eqcounternamedata=mainpage] >[founditems] >[Replace >db=/webcatalog/webcounter.db&counternamedata=[countername]]countertotal=[mat >h][countertotal]+1[/math]&counterdate=[date %m/%d/%y]&countersort=[date >%Y/%m/%d][/replace] >[/founditems] >[/search] >[/hideif] <----This DOES NOT BLOCK or Hide > >[include /macro/mainfooter.tmpl] > >[/search] Associated Messages, from the most recent to the oldest:

    
  1. Re: Bug or syntax error on my part? (Kenneth Grome 1997)
  2. Re: Bug or syntax error on my part? (grichter@panavise.com (Gary Richter) 1997)
  3. Re: Bug or syntax error on my part? (Kenneth Grome 1997)
  4. Re: Bug or syntax error on my part? (Kenneth Grome 1997)
  5. Bug or syntax error on my part? (grichter@panavise.com (Gary Richter) 1997)
Hi Gary,You gave two examples of searches, one from a hyperlink and the other from a [search] context. Since your hyperlink search works, I have not reproduced it here ... but I have reproduced your context-based search, because you say it does not work the same as your hyperlink search.I think I can see a minor change you need to make to your syntax. Here is your context-based search that doesn't work properly, and at the end of this message is a new one that I believe should work for you. First, the broken one: >[Search blah blah ] > >[founditems] >[/founditems] > >[/search] > > >[hideif [ipaddress]^207.135.254.] >[Search db=/webcatalog/webcounter.db&eqcounternamedata=mainpage] >[founditems] >[Replace >db=/webcatalog/webcounter.db&counternamedata=[countername]]countertotal=[mat >h][countertotal]+1[/math]&counterdate=[date %m/%d/%y]&countersort=[date >%Y/%m/%d][/replace] >[/founditems] >[/search] >[/hideif] <----This DOES NOT BLOCK or Hide > >[include /macro/mainfooter.tmpl] Take a look at the differences between your template above and the one I've shown below. Do you see what I've done to change the lower one? My only change was to moved one of your [/search] tags so that it appears at the end of the page instead of in the middle of the page. This should make it work the same as the search you were using from your hyperlink.Remember, when you do a search from a hyperlink, the entire results template is contained within an *IMPLIED* search context. This means that there is an invisible [search] tag at the top of the page, and there is an invisible [/search] tag at the bottom of the page. But this only applies in a 'hyperlink search'.When you switch from a' hyperlink search' to a 'hyperlink showpage with a context-based search', you actually have to place those tags on the results template yourself - and they must be located in the same places where they are *implied* by a hyperlink search - with the [search] at the top of the page and the [/search] at the bottom of the page ... :) >[Search blah blah ] > >[founditems] >[/founditems] > > >[hideif [ipaddress]^207.135.254.] >[Search db=/webcatalog/webcounter.db&eqcounternamedata=mainpage] >[founditems] >[Replace >db=/webcatalog/webcounter.db&counternamedata=[countername]]countertotal=[mat >h][countertotal]+1[/math]&counterdate=[date %m/%d/%y]&countersort=[date >%Y/%m/%d][/replace] >[/founditems] >[/search] >[/hideif] <----This DOES NOT BLOCK or Hide > >[include /macro/mainfooter.tmpl] > >[/search] Kenneth Grome

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:

Expiration of Carts (1997) Sku numbers (1997) Email Send Delay (2004) RequiredFields template (1997) Review comparison by PC Magazine: Open for On-lineBusiness (1997) Speaking of... (1999) Shopping Cart Problem (1998) Not really WebCat (1997) [WriteFile] problems (1997) WebCat2b12 CGI Mac -- Problems propagating the cart through frames...still (1997) encryption madness (2003) EXPERT TECH SUPPORT ISSUE: Including a db file *fails* on NT without [flushdatabases] ... (2000) RE: Full text search (1999) WebCat2b13MacPlugIn - more [date] problems (1997) Quitting WebMerchant ? (1997) Share Bulletin Board? (1998) WebDNA for Dummies (2004) Looking for PHP programmer (2007) Using Plug-In while running 1.6.1 (1997) California Tax Rates (1998)