We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33982 ☆ A M B ☆
    • 476 Posts
    So I’m attempting to a take a PHP script for Mobile phone detection and implement it into the MODx site I’m working on.

    The PHP:

    http://detectmobilebrowsers.mobi

    I would need to implement this into my template:
    <?php
    include('mobile_device_detect.php');
    mobile_device_detect(true,true,true,true,true,true,'iphone.html','blackberry.html');
    ?>
    


    Since I can’t just dump raw PHP into my template, of course I would need to create a snippet with the content of "mobile_detect.php" from above and call that snippet in the MODx template. Problem is the second part of the above php portion:
    mobile_device_detect(true,true,true,true,true,true,'iphone.html','blackberry.html');
    


    Not entirely sure where I would need to implement this. Someone had pointed this out to me: http://wiki.modxcms.com/index.php/API:setPlaceholder , but entirely sure how to work with this either. Hope this question makes sense.

    Thanks!
      Precision Web Development ... SmashStack.com
      • 26931
      • 2,314 Posts
      Hi flinx,

      ...not an answer to your question, but maybe these might be useful for you too:
      http://modxcms.com/forums/index.php/topic,34858.msg255425.html#msg255425
      http://modxcms.com/extras/package/591