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 froma [search] context. Since your hyperlink search works, I have notreproduced 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 isyour context-based search that doesn't work properly, and at the end ofthis message is a new one that I believe should work for you. First, thebroken 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'veshown below. Do you see what I've done to change the lower one? My onlychange was to moved one of your [/search] tags so that it appears at theend of the page instead of in the middle of the page. This should make itwork the same as the search you were using from your hyperlink.Remember, when you do a search from a hyperlink, the entire resultstemplate is contained within an *IMPLIED* search context. This means thatthere is an invisible [search] tag at the top of the page, and there is aninvisible [/search] tag at the bottom of the page. But this only appliesin a 'hyperlink search'.When you switch from a' hyperlink search' to a 'hyperlink showpage with acontext-based search', you actually have to place those tags on the resultstemplate yourself - and they must be located in the same places where theyare *implied* by a hyperlink search - with the [search] at the top of thepage 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:
Hi Gary,You gave two examples of searches, one from a hyperlink and the other froma
[search] context. Since your hyperlink search works, I have notreproduced 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 isyour context-based search that doesn't work properly, and at the end ofthis message is a new one that I believe should work for you. First, thebroken 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'veshown below. Do you see what I've done to change the lower one? My onlychange was to moved one of your [/search] tags so that it appears at theend of the page instead of in the middle of the page. This should make itwork the same as the search you were using from your hyperlink.Remember, when you do a search from a hyperlink, the entire resultstemplate is contained within an *IMPLIED* search context. This means thatthere is an invisible
[search] tag at the top of the page, and there is aninvisible [/search] tag at the bottom of the page. But this only appliesin a 'hyperlink search'.When you switch from a' hyperlink search' to a 'hyperlink showpage with acontext-based search', you actually have to place those tags on the resultstemplate yourself - and they must be located in the same places where theyare *implied* by a hyperlink search - with the
[search] at the top of thepage 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)