WordPress.org

Ready to get started?Download WordPress

Forums

Issuu Embed
Handle Mobile Devices. Can this go into a live version please? (2 posts)

  1. Kazoosoft
    Member
    Posted 1 year ago #

    I have modified this application by adding a simple Mobile device handler for iPad etc.

    Here is the code which need changing.

    Change around line 290 of Issue-embed.php:

    return '<object style="width:' . $width . 'px;height:' . $height . 'px" ><param name="movie" value="http://static.issuu.com/webembed/viewers/style1/v1/IssuuViewer.swf?' . $querystring . '" /><param name="allowfullscreen" value="true"/><param name="wmode" value="transparent"/><param name="menu" value="false"/><embed src="http://static.issuu.com/webembed/viewers/style1/v1/IssuuViewer.swf" wmode="transparent" type="application/x-shockwave-flash" allowfullscreen="true" menu="false" style="width:' . $width . 'px;height:' . $height . 'px" flashvars="' . $querystring . '" /></object>';

    To this:

    // Check if we are running mobile or not!
    		if(strstr(strtolower($_SERVER['HTTP_USER_AGENT']), 'mobile') || strstr(strtolower($_SERVER['HTTP_USER_AGENT']), 'android')) {
    			return 'You are using a MOBILE Device!! <h3><a href="'.$url.'?mode=mobile">Click here to see the mobile version of our Page Turner!</a></h3>';
    
    		} else {
    			return '<object style="width:' . $width . 'px;height:' . $height . 'px" ><param name="movie" value="http://static.issuu.com/webembed/viewers/style1/v1/IssuuViewer.swf?' . $querystring . '" /><param name="allowfullscreen" value="true"/><param name="wmode" value="transparent"/><param name="menu" value="false"/><embed src="http://static.issuu.com/webembed/viewers/style1/v1/IssuuViewer.swf" wmode="transparent" type="application/x-shockwave-flash" allowfullscreen="true" menu="false" style="width:' . $width . 'px;height:' . $height . 'px" flashvars="' . $querystring . '" /></object>';
    		}

    Bobs you uncle all done! It will not show Mobile users a link to go off to the mobile version.

    http://wordpress.org/extend/plugins/issuu-embed/

    Kind Regards,

    Steven Church
    Kazoosoft

  2. Kazoosoft
    Member
    Posted 1 year ago #

    Damn its not working in the post.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.