PHPrunner32x32     PHPRunner manual


Mobile Template

<< Click to Display Table of Contents >>

Navigation:  Advanced topics >

PHPrunner32x32     PHPRunner manual


Mobile Template

 

Mobile template allows you to build mobile version of your web application (requires PHPRunner 6 or later). To see how it works, you can open mobile-enabled live demos available at http://xlinesoft.com/phprunner/livedemo4.htm from your mobile device.

Mobile Template is a paid add-on and can be purchased for $50. Buy now. PHPRunner9.8 requires Mobile template v2. Upgrade from previous version of Mobile template $25. Buy now.

You need Mobile template if you use "Old style" layouts. For Bootstrap-based layouts Mobile template is not required.

To build a mobile version of your website, proceed to Miscellaneous page in PHPRunner and select Build Mobile version check box. PHPRunner detects mobile devices automatically and redirects to the mobile version of your website. To display desktop version on tablets, clear Build Mobile version check box.

When Build mobile version option is enabled on Miscellaneous page, Desktop/Mobile radio-buttons appear above the list of tables in Visual Editor. You can switch between  normal (desktop) or mobile version of the current page and make changes to each version independently.

You can customize mobile pages appearance for any chosen page in Visual Editor i.e. add a button or change the page layout.

Here is the mobile pages on iPhone:

List page

mobile_list

Edit page

mobile_edit

Installation

To install mobile template for 32-bit version of PHPRunner unzip the template to C:\Program Files (x86)\PHPRunner9.8\userLayouts\Mobile

 

To install mobile template for 64-bit version of PHPRunner unzip the template to C:\Program Files\PHPRunner9.8\userLayouts\Mobile

 

Notes

How do I find if application is being accessed from mobile device?

PHPRunner provides MobileDetected() function that returns true if application is accessed from mobile device. For example, you can hide certain tables from mobile users. Use ModifyMenuItem event for this purpose:

  if ($menuItem->getTable() == 'Cars' && MobileDetected()) {

      return false;

  }

  return true;

 

How do I display different header when application runs on mobile device?

MobileDetected() function comes to rescue again. Proceed to the Visual Editor, open Header page and switch to HTML mode. Here is the sample code:

<?php

 

if (MobileDetected())

  echo "<font size='3'>My website</font>";

else

  echo "<font size='6'>My website</font>";

 

?>

 

Testing

You can test test your mobile app on your mobile device as well as on the desktop: Testing web apps in mobile mode.