Re: [WebDNA] I'm stuck... :-(

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 102228
interpreted = N
texte = From the docs... http://dev.webdna.us/ref/pages.html?context=IfContext.html Comparison: contains Example: [If "[browsername]" ^ "Mozilla"] variable [browsername] contains the text Mozilla So you just need [If ("[browsername]" ^ "iPhone")|("[browsername]" ^ "Blackberry")] Paul On 25 Mar 2009, at 18:53, Rob wrote: > Ok... I have some code that works good, but not the way I want it > to. ....Very high maintenance. > > I'm doing a redirect for wireless devices from the home page, and > need to know if there is a way to reduce the comparison string. I'd > like to reduce it down to iphone, or Blackberry, etc. > > Here is a piece of the code: > > [if]("[BROWSERNAME]"="Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_2_1 > like Mac OS X; en-us) AppleWebKit/525.18.1 (KHTML, like Gecko) > Version/3.1.1 Mobile/5H11 Safari/525.20") | > ("[BROWSERNAME]"="BlackBerry8330/4.3.0 Profile/MIDP-2.0 > Configuration/CLDC-1.1 VendorID/126 UP.Browser/5.0.3.3")] > [Then][REDIRECT url=mobile/index.html][/Then] > [Else][/Else] > [/if] > > So is there a better way to reduce: > "Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_2_1 like Mac OS X; en-us) > AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.1.1 Mobile/5H11 > Safari/525.20" > > Down to: > Iphone? > > Can't think of any way to do it with the [BROWSERNAME] tag. > > The WAP system in the storebuilder doesn't seem to work, or is > outdated. > > Rob > > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > old archives: http://dev.webdna.us/TalkListArchive/ Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] I'm stuck... :-( (Brian Fries 2009)
  2. Re: [WebDNA] I'm stuck... :-( ("Psi Prime, Matthew A Perosi " 2009)
  3. RE: [WebDNA] I'm stuck... :-( ("Michael A. DeLorenzo" 2009)
  4. Re: [WebDNA] I'm stuck... :-( (Rob 2009)
  5. RE: [WebDNA] I'm stuck... :-( ("Michael A. DeLorenzo" 2009)
  6. Re: [WebDNA] I'm stuck... :-( (Steve Craig 2009)
  7. Re: [WebDNA] I'm stuck... :-( ( 2009)
  8. Re: [WebDNA] I'm stuck... :-( (Rob 2009)
  9. Re: [WebDNA] I'm stuck... :-( (Rob 2009)
  10. Re: [WebDNA] I'm stuck... :-( (Bob Minor 2009)
  11. Re: [WebDNA] I'm stuck... :-( ( 2009)
  12. Re: [WebDNA] I'm stuck... :-( ("Psi Prime, Matthew A Perosi " 2009)
  13. Re: [WebDNA] I'm stuck... :-( (Rob 2009)
  14. Re: [WebDNA] I'm stuck... :-( ("Dan Strong" 2009)
  15. Re: [WebDNA] I'm stuck... :-( (Rob 2009)
  16. Re: [WebDNA] I'm stuck... :-( (Donovan Brooke 2009)
  17. Re: [WebDNA] I'm stuck... :-( (Rob 2009)
  18. Re: [WebDNA] I'm stuck... :-( (Paul Willis 2009)
  19. [WebDNA] I'm stuck... :-( (Rob 2009)
From the docs... http://dev.webdna.us/ref/pages.html?context=IfContext.html Comparison: contains Example: [If "[browsername]" ^ "Mozilla"] variable [browsername] contains the text Mozilla So you just need [If ("[browsername]" ^ "iPhone")|("[browsername]" ^ "Blackberry")] Paul On 25 Mar 2009, at 18:53, Rob wrote: > Ok... I have some code that works good, but not the way I want it > to. ....Very high maintenance. > > I'm doing a redirect for wireless devices from the home page, and > need to know if there is a way to reduce the comparison string. I'd > like to reduce it down to iphone, or Blackberry, etc. > > Here is a piece of the code: > > [if]("[browsername]"="Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_2_1 > like Mac OS X; en-us) AppleWebKit/525.18.1 (KHTML, like Gecko) > Version/3.1.1 Mobile/5H11 Safari/525.20") | > ("[browsername]"="BlackBerry8330/4.3.0 Profile/MIDP-2.0 > Configuration/CLDC-1.1 VendorID/126 UP.Browser/5.0.3.3")] > [Then][REDIRECT url=mobile/index.html][/Then] > [Else][/Else] > [/if] > > So is there a better way to reduce: > "Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_2_1 like Mac OS X; en-us) > AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.1.1 Mobile/5H11 > Safari/525.20" > > Down to: > Iphone? > > Can't think of any way to do it with the [browsername] tag. > > The WAP system in the storebuilder doesn't seem to work, or is > outdated. > > Rob > > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > old archives: http://dev.webdna.us/TalkListArchive/ Paul Willis

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:

Don't know if this is a sily question... (2003) Listserver problem (1997) Unix DB Permission Error (2002) possible, WebCat2.0 and checkboxes-restated (1997) if else problem: Version 2 (2003) Limiting user access to .tmpl files (1997) webcat/webmerchant docs (1997) WebCatalog can't find database (1997) Tech support (2000) 2.0 Info (1997) Yet another db manager (2004) Summary layout (1997) Generating Options for a Form. (1997) Showif, Hideif reverse logic ? (1997) 2nd WebCatalog2 Feature Request (1996) [WebDNA] [OT] Mac Audit Software? (2009) To Err or Not Custom Error (1999) Using Plug-In while running 1.6.1 (1997) weird G3 happenings (1998) DataBaseHelper Flawed (1997)