Re: goMobile Support Thread
I haven't tested the new version of this mod but it looks like there may be a problem switching between mobile and full sites.
The new sitechoice.php looks for a querystring variable called 'fullsite', but the code looking for a querystring variable called 'fullsiteoverride' is still in init_templates.php.
It looks to me like the init_templates.php included in the new distribution is an old one. I think it should just look for a cookie called 'siteversion' and show the appropriate template based on that rather than looking at querystring variables.
As I mentioned, I haven't tested this yet so I could be wrong!
Re: goMobile Support Thread
Change this section of code in includes/init_includes/overrides/init_templates.php
Code:
/*** Check if user has requested specific version of the site*/
if ($_GET['fullsiteoverride'] == 1)
{
$value = 'fullsiteoverride';
setcookie("mobileCookie", $value);
setcookie("mobileCookie", $value, time()+1800); /* expire in 1/2 hour */
$iwnatfullsite = 1;
}
if ($_GET['fullsiteoverride'] == 0)
{
$value = 'fullsiteoverride';
setcookie("mobileCookie", $value);
setcookie("mobileCookie", $value, time()-1800); /* expire in 1/2 hour */
$iwnatfullsite = 0;
}
if(isset($_COOKIE['mobileCookie'])) {$iwnatfullsite = 1; }
/*** Check if there is a specific template for this mobile platform and use it*/
if ($mobile_browser >= 1){
if($iwnatfullsite == 1)
{
$template_dir;
}
else
{
$template_dir = $template_dir.'_mobile';
}
}
/*** EOF : SPECIFIC TEMPLATE FOR MOBILE CLIENT**/
to this
Code:
/* Override to mobile version of site if requested */
if(($mobile_browser >= 1 && !isset($_COOKIE['siteversion'])) || isset($_COOKIE['siteversion']) && $_COOKIE['siteversion'] == 'mobile') $template_dir = $template_dir . '_mobile';
/*** EOF : SPECIFIC TEMPLATE FOR MOBILE CLIENT**/
Re: goMobile Support Thread
Thank you for your input Damian! I had narrowed it down to the same thing, but wasn't sure how to make the change so that it would work. I'll give it a try this weekend!
Re: goMobile Support Thread
Re: goMobile Support Thread
Hello
Is there a way to get the templates files for this mod or something to give an example how to make mobile templates/CSS files?
beside read.me telling to create another template folder the add-on comes with no explanation ....
Thanks
L.
:blush:
Re: goMobile Support Thread
Hello,
This module works great for me on 1.5.1 however when i go to the mobile site it drops all the sidebox's, I'm guessing because they aren't activated in the boxes layout controller in admin (all files were duplicated). I'd quite like them. how have others worked around this? Cheers!
:-)
Re: goMobile Support Thread
Quote:
Originally Posted by
hitch
Hello,
This module works great for me on 1.5.1 however when i go to the mobile site it drops all the sidebox's, I'm guessing because they aren't activated in the boxes layout controller in admin (all files were duplicated). I'd quite like them. how have others worked around this? Cheers!
:-)
That's the whole idea, it lightens the content to suit a smaller screen.
Can you post a link to your site?
Re: goMobile Support Thread
Quote:
Originally Posted by
damiantaylor
Change this section of code in includes/init_includes/overrides/init_templates.php
Code:
/*** Check if user has requested specific version of the site*/
if ($_GET['fullsiteoverride'] == 1)
{
$value = 'fullsiteoverride';
setcookie("mobileCookie", $value);
setcookie("mobileCookie", $value, time()+1800); /* expire in 1/2 hour */
$iwnatfullsite = 1;
}
if ($_GET['fullsiteoverride'] == 0)
{
$value = 'fullsiteoverride';
setcookie("mobileCookie", $value);
setcookie("mobileCookie", $value, time()-1800); /* expire in 1/2 hour */
$iwnatfullsite = 0;
}
if(isset($_COOKIE['mobileCookie'])) {$iwnatfullsite = 1; }
/*** Check if there is a specific template for this mobile platform and use it*/
if ($mobile_browser >= 1){
if($iwnatfullsite == 1)
{
$template_dir;
}
else
{
$template_dir = $template_dir.'_mobile';
}
}
/*** EOF : SPECIFIC TEMPLATE FOR MOBILE CLIENT**/
to this
Code:
/* Override to mobile version of site if requested */
if(($mobile_browser >= 1 && !isset($_COOKIE['siteversion'])) || isset($_COOKIE['siteversion']) && $_COOKIE['siteversion'] == 'mobile') $template_dir = $template_dir . '_mobile';
/*** EOF : SPECIFIC TEMPLATE FOR MOBILE CLIENT**/
This was exactly wher i was looking for, thx for youre time and efforts :-)
Re: goMobile Support Thread
I'm running 1.5.1 and the module works fine, except for EZ pages. They load the header and nothing else. I have the URI Mapping add on, but disabling it didn't fix my problem. I looked at my other addons and none of them should affect how EZ pages load. Anyone else have a similar issue?
Re: goMobile Support Thread
This mod is exactly what I've been looking for to combine a dynamic site with responsive templates using the DIY responsive template mod. Here's what I'm trying to resolve now: I have 2 versions of templates I'm working with--the main version we've used for years, and a new one I'm building. The existing template is not mobile-optimized and I plan to replace it with the new version eventually. What my template folder looks like now is template #1, template #2, template #2_mobile. However, even when I have template #1 selected, when attempting to access the site on a mobile device it goes to template #2_mobile.
Is there a way to change the code to look for a mobile version of the current template, and finding none default to the full site instead of going to another version that does have a mobile folder?