Re: [WebDNA] [hideif]'s not working in [sendmail]

This WebDNA talk-list message is from

2008


It keeps the original formatting.
numero = 101209
interpreted = N
texte = Suzanne Swift wrote: > Hi Donovan, > > You're right! Just got through a battery of testing and found the > problem seems to be with the [url] tags in the initial [hideif]s. > > this code doesn't hide things: > > [hideif [url][Comments1][/url]=] > ______________________________________________ > Library News > ______________________________________________ > > [hideif ||[url][raw][Comments1][/raw][/url]|^|[url][Comments1][/url]|] > [Comments1][/hideif] > [hideif ||[url][raw][Comments2][/raw][/url]|^|[url][Comments2][/url]|] > [Comments2][/hideif] > [hideif ||[url][raw][Comments3][/raw][/url]|^|[url][Comments3][/url]|] > [Comments3][/hideif] > [/hideif] > > > this code does: > > [hideif [Comments1]=[raw][Comments1][/raw]][hideif [Comments1]=] Well, your second code (though it may work), is not fail proof. Without URL's, the code is subject to harmful characters. For the record, this (template).. *Should* be a good format for all these solutions.: [hideif ||[url][raw][Comments1][/raw][/url]|^|[url][Comments1][/url]|] ______________________________________________ News ______________________________________________ [Comments1] [hideif ||[url][raw][Comments2][/raw][/url]|^|[url][Comments2][/url]|] [Comments2][/hideif] [hideif ||[url][raw][Comments3][/raw][/url]|^|[url][Comments3][/url]|] [Comments3][/hideif] [/hideif] It Adds "URL's" to protects the hideif comparisons from a false result. Note.. the Code above assumes that you want to hide the entire block if the value of [Comments1] equals blank, or if it equals raw [Comments1]. So, you don't need the second hideif statment for Comments1.. but I left the others in there (coments 1 and 2) in case those are passed over.. I don't know if they are needed (because I'm not sure how your system works), but they shouldn't cause any problems. Now, having said all that.. I wonder if 3.x had [url] issues of some kind. I use this kind of format frequently: [hideif ||[url][raw][Comments1][/raw][/url]|^|[url][Comments1][/url]|] However, if the [url]'s are producing extra spaces or any sort of wierd character in version 3.x.. it will not work. I have no idea if that is the case. So, if you think it may be the case, you can make your existing code cleaner by going from: [hideif [Comments1]=[raw][Comments1][/raw]][hideif [Comments1]=] To: [hideif [raw][Comments1][/raw]=[Comments1]][hideif =[Comments1]] by putting the operator before the comparison, it should avoid the operator confusion. We need to convince you to upgrade! ;-) Donovan -- Donovan D. Brooke PH/FAX: 1 (608) 291-2024 ---------------------------------------------- VP WebDNA Software Corporation 16192 Coastal Highway Lewes, DE 19958 Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] [hideif]'s not working in [sendmail] (Donovan Brooke 2008)
  2. Re: [WebDNA] [hideif]'s not working in [sendmail] (Donovan Brooke 2008)
  3. Re: [WebDNA] [hideif]'s not working in [sendmail] (Suzanne Swift 2008)
  4. Re: [WebDNA] [hideif]'s not working in [sendmail] (Donovan Brooke 2008)
  5. Re: [WebDNA] [hideif]'s not working in [sendmail] (Suzanne Swift 2008)
  6. Re: [WebDNA] [hideif]'s not working in [sendmail] (Donovan Brooke 2008)
  7. Re: [WebDNA] [hideif]'s not working in [sendmail] (Suzanne Swift 2008)
  8. Re: [WebDNA] [hideif]'s not working in [sendmail] (Donovan Brooke 2008)
  9. Re: [WebDNA] [hideif]'s not working in [sendmail] (Bob Minor 2008)
  10. Re: [WebDNA] [hideif]'s not working in [sendmail] (Terry Wilson 2008)
  11. [WebDNA] [hideif]'s not working in [sendmail] (Suzanne Swift 2008)
Suzanne Swift wrote: > Hi Donovan, > > You're right! Just got through a battery of testing and found the > problem seems to be with the [url] tags in the initial [hideif]s. > > this code doesn't hide things: > > [hideif [url][Comments1][/url]=] > ______________________________________________ > Library News > ______________________________________________ > > [hideif ||[url][raw][Comments1][/raw][/url]|^|[url][Comments1][/url]|] > [Comments1][/hideif] > [hideif ||[url][raw][Comments2][/raw][/url]|^|[url][Comments2][/url]|] > [Comments2][/hideif] > [hideif ||[url][raw][Comments3][/raw][/url]|^|[url][Comments3][/url]|] > [Comments3][/hideif] > [/hideif] > > > this code does: > > [hideif [Comments1]=[raw][Comments1][/raw]][hideif [Comments1]=] Well, your second code (though it may work), is not fail proof. Without URL's, the code is subject to harmful characters. For the record, this (template).. *Should* be a good format for all these solutions.: [hideif ||[url][raw][Comments1][/raw][/url]|^|[url][Comments1][/url]|] ______________________________________________ News ______________________________________________ [Comments1] [hideif ||[url][raw][Comments2][/raw][/url]|^|[url][Comments2][/url]|] [Comments2][/hideif] [hideif ||[url][raw][Comments3][/raw][/url]|^|[url][Comments3][/url]|] [Comments3][/hideif] [/hideif] It Adds "URL's" to protects the hideif comparisons from a false result. Note.. the Code above assumes that you want to hide the entire block if the value of [Comments1] equals blank, or if it equals raw [Comments1]. So, you don't need the second hideif statment for Comments1.. but I left the others in there (coments 1 and 2) in case those are passed over.. I don't know if they are needed (because I'm not sure how your system works), but they shouldn't cause any problems. Now, having said all that.. I wonder if 3.x had [url] issues of some kind. I use this kind of format frequently: [hideif ||[url][raw][Comments1][/raw][/url]|^|[url][Comments1][/url]|] However, if the [url]'s are producing extra spaces or any sort of wierd character in version 3.x.. it will not work. I have no idea if that is the case. So, if you think it may be the case, you can make your existing code cleaner by going from: [hideif [Comments1]=[raw][Comments1][/raw]][hideif [Comments1]=] To: [hideif [raw][Comments1][/raw]=[Comments1]][hideif =[Comments1]] by putting the operator before the comparison, it should avoid the operator confusion. We need to convince you to upgrade! ;-) Donovan -- Donovan D. Brooke PH/FAX: 1 (608) 291-2024 ---------------------------------------------- VP WebDNA Software Corporation 16192 Coastal Highway Lewes, DE 19958 Donovan Brooke

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:

Separate server for jpg/gif files (1998) 100% cpu load (2006) While I'm on Cookies... :-) (2004) [GROUPS] followup (1997) Can't use old cart file (was One more try) (1997) Location of Browser Info.txt file (1997) Caching pages...again (2001) [WebDNA] MySQL float problems with WebDNA (2010) Major Security Hole IIS NT (1998) Emailer error 571 (1998) Emailer setup (1997) Looking up two prices in Formulas.db (1997) Installing WebDNA on Linux (2007) WebCat2b13MacPlugIn - [showif][search][/showif] (1997) Searching Numbers (2004) [ShowIf] and empty fields (1997) headers (2004) Execute Applescript (1997) Include an include file as raw webDNA (2002) New WebCatalog Version !!! (1997)