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:

Formating found categories (1997) retail and wholesale... (2000) WebCat2 several catalogs? (1997) attn: smitmicro - cart limitation (2002) WebCat2 several catalogs? (1997) breaking & sorting (2000) Rumpus/Typhoon modules included in Typhoon ... (1997) Generating Report Totals (1997) Email Format (Umlaut) (2004) WebCat editing, SiteGuard & SiteEdit (1997) WC Database Format (1997) webten vs. webstar (1998) New commands in Final candidate (1997) Fwd: State-of-the-Art Digital Aquarium for Your Computer (2006) Hosts who have upgraded to v5.0? (2003) RE: Deafness (1998) weird cart #? (1999) First n words (2000) No luck with taxes (1997) Modifying databases manually (was Banner DNA) (1997)