Announcement

Collapse
No announcement yet.

How to Alert and Redirect users to Mobile App

Collapse
X
Collapse
  •  

  • How to Alert and Redirect users to Mobile App

    Here are instructions on how to display an alert on your users phone when they attempt to browse your site from their phones browser.

    open up the "header" template and at the very bottom add this code:

    Code:
    
    
    then open up "headinclude" template and at the very bottom add this code:

    Code:
    of course replacing Digital Mayhem Mobile with the name of your App and the links with the links of your App Store and Android Market links...


    **NOTE** I am trying to find a better file to put the code that loads first because atleast on all of my sites from both iPhone & Android practically the entire site loads before the message is displayed and user redirected.

    **Maybe vBulletin will make this a sticky**

    • dillon015
      #4
      dillon015 commented
      Editing a comment
      thank you for sharing

    • nima6
      #5
      nima6 commented
      Editing a comment
      I don't have an iPhone app yet but I do have an Android one. I put the code in header and the following in headerinclude but its not working. Any idea why? Here is a link to the forum.

      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 Hookah Forum mobile app for iPhone." );
      if ( qes )
      window.location* *= "";
      }
      else if ( navigator.userAgent.match(/Android/i) )
      {
      var qes* *= confirm( "This forum has an Android app! Click OK to learn more about Hookah Forum mobile app for Android." );
      if ( qes )
      window.location* *= "market://details?id=com.vbulletin.build_1221";
      }
      }
      </script>

    • screenmates
      #6
      screenmates commented
      Editing a comment
      Why don't they include this chunk in the vB's core instead?

      Another nice feature is to include Suppress-o-Matic code to suppress repetitive email alerts on dB failure. These are a few lines of code that would prevent hacking our code.
    Posting comments is disabled.

About the Author

Collapse

SteveLV702 Find out more about SteveLV702

Article Tags

Collapse

Latest Articles

Collapse

  • Enabling Push Notifications in vBulletin 5.3.2 and Mobile Suite 1.16
    by Wayne Luke
    vBulletin Mobile Suite 1.16 includes functionality for Push Notifications. One of the requirements to add this functionality is that you must be running vBulletin 5.3.2 Connect on your site and create a project with Google's Firebase Cloud Messaging (FCM) platform. The steps below will walk you through the process of enabling this functionality in vBulletin and in your Mobile Apps.

    Add a project to your Firebase account








    ...
    Thu 27th Jul '17, 8:56am
  • How to Alert and Redirect users to Mobile App
    by SteveLV702
    Here are instructions on how to display an alert on your users phone when they attempt to browse your site from their phones browser.

    open up the "header" template and at the very bottom add this code:

    :
    
    
    then open up "headinclude" template and at the very bottom add this code:

    :
    function iPhoneAlert( )
    {
    if ( navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i) )
    {
    var qes* *= confirm( "This forum has an iP
    ...
    Mon 16th May '11, 12:01pm
  • Install App in Android Emulator
    by Jasper Aguila
    Don't have an Android device and want to see your vBulletin Mobile Suite app before it gets published? Then use the Android Emulator!

    Below is a tutorial on how to run your apk file in the Android emulator. Note: Extra step for Windows 7/Vista users! All the way at bottom of the post!

    For Mac Users check the second comment made by Lynne below.

    Thank you so much to botskool for basically helping me compile this article!
    ----------------------------------------------------------------------- ...
    Fri 13th May '11, 1:52pm
  • Installing Your App on your iPhone
    by SteveLV702
    So you got the new Mobile Suite, compiled your App and submitted to Apple but don't wanna wait for Apple to Approve it and get in the store which can take like 6 weeks... You wanna use your app NOW... well you can here is the instructions... * Login to your iOS Provisioning Portal > Devices > Add Device > enter your Phones UID to get your phones UID connect to iTunes in the Phone Summery page click on serial number and while change to UID. * go to Provisioning > Distribution tab > N...
    Fri 22nd Apr '11, 12:23pm
  • Recovering App Crash Reports
    by Wayne Luke
    In order to help diagnose bugs and error reports it would be very helpful if you submitted the bug and crash reports generated by the apps in your JIRA issue report. These crash reports will be located within your Apple App Store or Android Marketplace developer's sites. Below, we have outlined the steps to recover these. Once recovered, you will need to either copy and paste them into the JIRA issue report as a comment or attach the resulting file to the JIRA Issue Report.

    iOS Issue...
    Mon 18th Apr '11, 9:06am
  • 12. Create an Android Application
    by Wayne Luke
    This article tells you how to create your Android Application. This is the second step in getting your vBulletin App submitted to Google for Approval. ...
    Wed 13th Apr '11, 9:06am
Working...
X