This topic is locked
[SOLVED]

 Mobile Template - Distinguishing between IPhone and IPad

9/24/2015 2:34:35 PM
PHPRunner General questions
S
stevelewis author

Hi,
I am about to implement the Mobile Template. I see a real value in this idea because the way it is now my web application does not display correctly on an IPhone. The desktop version of the Web Application does look good on my IPad. So my question is can I have the Mobile version template just work for the IPhone and not the IPad? I haven't tried it yet but I'm sure the function isMoble() will apply to the IPad as well.
Thank you,
-Steve Lewis

lefty 9/24/2015

In Phprunner 8.0 . Look at the Misc section . There is an option to check off for desktop version if it is a tablet/ipad.

HJB 9/24/2015

@John - Problem is only that STEVE LEWIS is v8.1 user (known from a previous posting by him) and does NOT see things mentioned by you under v8.0 so far (I mean, until next maintenance update) <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=77927&image=1&table=forumreplies' class='bbc_emoticon' alt=':(' />

S
stevelewis author 9/25/2015



@John - Problem is only that STEVE LEWIS is v8.1 user (known from a previous posting by him) and does NOT see things mentioned by you under v8.0 so far (I mean, until next maintenance update) <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=77928&image=1&table=forumreplies' class='bbc_emoticon' alt=':(' />


Thank you for taking the time to answer my question.
So what you are saying is I can't use the Mobile Template with version PHPRunner 8.1 until there is a maintenance update?
-Steve

HJB 9/25/2015

@Steve
For manual workaround purposes until the feature is going to be implemented in one of the next versions, see relevant index.htm code differences by yourself and make the necessary code adjustments by editing the index.htm after code generation. HTH <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=77929&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />
quote
v8.0 index.htm code WITH Ipad oriented code
<meta http-equiv="Pragma" content="no-cache" />

<meta http-equiv="Expires" content="-1" />

<script type="text/javascript" src="include/cookies.js"></script>

</head>

<body>

<!-- force rendering -->

<div>.</div>

<script type="text/javascript">

function getCookieRoot() {

var cutUpTo = document.location.pathname.lastIndexOf( '/' );

return document.location.pathname.slice( 0, cutUpTo );

}
var cookieRoot = getCookieRoot();
delete_cookie( 'runnerTabletDevice', cookieRoot );

if ( window.screen.width > 400 && window.screen.height > 400 && !navigator.userAgent.match(/Windows Phone/i) ) {

set_cookie( 'runnerTabletDevice', true, '', cookieRoot );

}
window.location.href = "login.php";

</script>

</body>

</html>
v8.0 index.htm code WITHOUT Ipad oriented code
<html>

<head>
<meta http-equiv=refresh content="0;url=login.php">

<meta http-equiv="cache-control" content="no-store, no-cache, must-revalidate, max-age=0" />

<meta http-equiv="Pragma" content="no-cache" />

<meta http-equiv="Expires" content="-1" />

</head>

<body>

</body>

</html>

Sergey Kornilov admin 9/25/2015

Steve,
just use 'Display desktop version on tablets' option that is available in both 8.0 and 8.1.

HJB 9/25/2015
Sergey Kornilov admin 9/25/2015

@walk2fly,
I guess that's because Mobile template is only installed for version 8.0. You need to install for version 8.1 and this is it.

HJB 9/25/2015

@admin - Yes, that did the trick. Thanx.

http://www.directupload.net/file/d/4121/8q5u9pgk_png.htm