Hi
This is the mobile development method I am working on.
These are basic changes.
There may be errors in translation.
Add to the contents of the ./includes/GeneralFunctions.php
Display All
Modify to the contents of the ./includes/pages.game/AbstractGamePage.class.php
Find
Display All
Add mobile function
Find line
Modify mobile check
Find line
Modify mobile check
The addition of the basic mobile connection environment has been completed.
And modify the ***Page.class.PHP of includes/game to be mobile recognized as follows.
./includes/pages/game/******Page.class.php file
ex)
All Find line the .tpl
All Modify
Then copy all tpl files and rename them to _mobile.tpl.
styles/templates/game/****.tpl
ex)
page.galaxy.default.tpl copy
page.galaxy.default_mobile.tpl
Just change _mobile.tpl to fit the mobile content size.
When connecting to a mobile device, layout.full_mobile is recognized for the first time.
You can develop it one by one by modifying the head and foot parts of layout.full_mobile.
We hope you have a nice mobile page and great results.
This is the mobile development method I am working on.
These are basic changes.
There may be errors in translation.
Add to the contents of the ./includes/GeneralFunctions.php
PHP Source Code
- //Mobile check
- function isMobile(){
- $sAgent = $_SERVER['HTTP_USER_AGENT'];
- $sMobile = '/(Android|iPhone|iPod|iemobile|ipaq|j2me|BlackBerry|SymbianOS|Opera Mini|Opera Mobile|Windows CE|Nokia|SonyEricsson|webOS|mobile.+firefox|PalmOS|wos)/i';
- if(preg_match($sMobile, $sAgent)){
- # is Mobile
- return true;
- }else{
- return false;
- }
- }
Modify to the contents of the ./includes/pages.game/AbstractGamePage.class.php
Find
PHP Source Code
Add mobile function
Find line
Modify mobile check
Find line
Modify mobile check
The addition of the basic mobile connection environment has been completed.
And modify the ***Page.class.PHP of includes/game to be mobile recognized as follows.
./includes/pages/game/******Page.class.php file
ex)
All Find line the .tpl
All Modify
Then copy all tpl files and rename them to _mobile.tpl.
styles/templates/game/****.tpl
ex)
page.galaxy.default.tpl copy
page.galaxy.default_mobile.tpl
Just change _mobile.tpl to fit the mobile content size.
When connecting to a mobile device, layout.full_mobile is recognized for the first time.
You can develop it one by one by modifying the head and foot parts of layout.full_mobile.
We hope you have a nice mobile page and great results.
--------------------------------------------------------------------------------------
The post was edited 1 time, last by noonn ().