Redirection script for iPhone Safari users

Discussion in 'Hacks and Advanced Features' started by winter, Aug 4, 2009.

  1. winter Tapatalk Master

    Hi,

    The following is the same script we have installed in this forum to notify iPhone/iPod users of availability of Tapatalk on your forum. You can change it the way you want it e.g. the number of days before it shows again to user (we set it to 30 days), and the url it redirects to (we set it to open the app store Tapatalk screen directly).

    HTML:
    <script type="text/javascript"> 
    if (document.cookie.indexOf("iphone_redirect=false") < 0) {
        if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {
            if (confirm("This forum is iPhone Native! Click OK to learn more about Tapatalk iPhone.")) {            
                document.cookie = "iphone_redirect=false"; 
                window.location = "http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=307880732&mt=8";
            } else {
                var date = new Date();
                var days = 30;
                date.setTime(date.getTime()+(days*24*60*60*1000));
                var expires = "; expires="+ date.toGMTString();
                document.cookie = "iphone_redirect=false" + expires; 
            }
        }
    }
    
    </script>
    
    We copy and paste this code to vBulletin template's "header" -

    Untitled.jpg

    We would be delighted if you can do the same on your site if you are happy with the Tapatalk experience so far. :)
    1 people like this.
  2. iFonz Tapatalk Fan Boi

    been waiting on this

    good ish
  3. DonLKSAB New Member

    Thanks!
    Installed!
  4. winter Tapatalk Master

    Sorry folks - fixed a bug where in some cases it never shows!

    Also updated the URL so it directs to app store much faster.

    Thanks for installing it!
  5. Ben New Member

    Thanks - installed!
  6. Froggy New Member

    Installed!
  7. movslow New Member

    installed.

    Thanks
    :cool:
  8. Haltech Boss

    Installed on both skins, thanks for the script.
  9. iPika New Member

    Installed

    Thanks winter!!!

    Installed, but on headerinclude, that template is constant on all my skins, and works pretty well.

    Best Regards. :D
  10. winter Tapatalk Master

    That's a great idea iPika :)
  11. vaguard Wallyville Mayor

    Thank you for this, works great!!
  12. melbo Member

    Any way to have this automatically open tapatalk if you browse to a forum with iPhone safari that supports tapatalk? Right now i just get the message "..... Learn More"
  13. winter Tapatalk Master

    We thought about it, the only challenge is what if the user doesn't have the Tapatalk app installed? Do they want to open the free version or the paid version? The iPhone itself doesn't provide such information so it seems a bit convoluted to implement this. :eek:

    Keep brainstroming personally I want to see this happen too...
  14. Rancor New Member

    Sorry, wrong thread... :(
  15. Warren New Member

    How can I do this on phpBB?
    Pasted the code in overall_header.html, but doens't work...:(
  16. Yao Android Developer

    You can find Installation instruction at forum owner area
    http://www.tapatalk.com/en/user



    phpBB - Installation

    * Place the zip package at the root of your forum system.
    * Unzip the package. You should see a directory called "mobiquo" inside your forum system root directory. For example, if your forum URL is http://www.mysite.com/forum, it should be placed at http://www.mysite.com/forum/mobiquo/.
    * Edit the file /<phpBB3_root>/styles/{YOUR_STYLE}/template/overall_footer.html
    * Search in this file:

    </body>
    </html>

    * Insert the following line above them

    <script type="text/javascript" src="mobiquo/tapatalkdetect.js"></script>

    * Purge the forum cache by logging in to the administration panel, find "Resynchronize or reset statistics" in the "General" section, click "Purge the cache".

  17. Warren New Member

    OMG - my fault... sorry :-D
  18. Mandig New Member

    Winter, I'm an iPhone user so maybe my question is stupid but is there something similar to this script for Android Market, OVI Store and Blackberry App Store ?

    Thanks for your support. In any case I installed the iPhone script !!

    Regards.
  19. Rukbat New Member

    Works a charm on vB4.0.8
    Thanks!

Share This Page