WordPress.org

Support

Support » Plugins and Hacks » Smooci (WordPress on Mobiles) » [Plugin: Smooci (WordPress on Mobiles)] Full Website Link

[Plugin: Smooci (WordPress on Mobiles)] Full Website Link

  • You can give users on mobile devices the option of viewing your full fat website by adding the 3 statements below to the top of the function SMOOCI_verifyBrowser() just underneath $useragent = $_SERVER[‘HTTP_USER_AGENT’];

    if($_GET[“desktop”] == “true”)
    {
    $_SESSION[‘desktop’] = ‘true’;
    return “not mobile”;
    }

    if($_GET[“mobile”] == “true”)
    {
    unset($_SESSION[‘desktop’]);
    }

    if($_SESSION[“desktop”] == “true”)
    {
    return “not mobile”;
    }

    Because WordPress doesn’t support session values out of the box you will need to add the below code to the top of your wp-config.php file

    if (!session_id())
    session_start();

    When all that is done you simply add the link http://www.yourdomain.com/?desktop=true

    You can also use the link http://www.yourdomain.com/?mobile=true if you want to allow them to switch back.

    http://wordpress.org/extend/plugins/smooci-wordpress-on-mobiles/

  • The topic ‘[Plugin: Smooci (WordPress on Mobiles)] Full Website Link’ is closed to new replies.
Skip to toolbar