The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
iPhone/Android Redirect to Mobile App
I have a iPhone and Android App in the App Store/Market and I have setup so when someone goes to my site via the iPhone or Android browser they get an alert that there is a Mobile App and then they get redirected to the app in the appropriate store...
just I have the code in 'header" and "headerinclude" template and when go to my site via phone browser it pretty much loads the entire site before the alert appears so need to know a better location for the code so loads quickly.... here is copy of the code I have header ------------------ Code:
<body onload="iPhoneAlert( );"> headerinclude ------------------ Code:
<script type="text/javascript"> function iPhoneAlert( ) { if ( navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i) ) { var qes+ += confirm( "This forum has an iPhone app! Click OK to learn more about Digital Mayhem Mobile for iPhone." ); if ( qes ) window.location+ += "http://dmlinks.us/DMMobile-iOS"; } else if ( navigator.userAgent.match(/Android/i) ) { var qes+ += confirm( "This forum has an Android app! Click OK to learn more about Digital Mayhem Mobile for Android." ); if ( qes ) window.location+ += "market://details?id=com.vbulletin.build_113"; } } </script> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|