Welcome, Guest
Username Password: Remember me

One Subdomain
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: One Subdomain

One Subdomain 14 years ago #664

  • jmtmay
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
Is it possible to have one subdomain for all phones, but still use different templates for the iphone and pdas? We would like to use mobile.site.com and then it would detect if what phone the user is on. Right now when I put in one site in the settings for mobile joomla it takes all phones to the pda template. It doesn't use the iphone template at all.

Thanks!

One Subdomain 14 years ago #2684

  • dryabov
  • OFFLINE
  • Administrator
  • Denis Ryabov, Lead Developer
  • Posts: 4867
  • Karma: 105
We didn't expect such way of use. In this case there is workaround only based on changing of "Mobile - Domains" plugin.

Try to replace text of function onDeviceDetection in the file plugins/mobile/domains.php with the following:
 
function onDeviceDetection(&$MobileJoomla_Settings, &$MobileJoomla_Device)
{
if($MobileJoomla_Settings['domains'] == '1')
{
$parsed = parse_url(JURI::base());
$path = isset($parsed['path']) ? $parsed['path'] : '';
$http = isset($parsed['scheme']) ? $parsed['scheme'] : 'http';
$domain_xhtml = $MobileJoomla_Settings['xhtmldomain'];
if($domain_xhtml && $_SERVER['HTTP_HOST'] == $domain_xhtml)
{
if(!$MobileJoomla_Device['markup'])
$MobileJoomla_Device['markup'] = 'xhtml';
$config =& JFactory::getConfig();
$config->setValue('config.live_site', $http.'://'.$domain_xhtml.$path);
}
elseif($MobileJoomla_Device['markup']!=='')
{
global $mainframe;
if($MobileJoomla_Settings['xhtmlredirect'] && $domain_xhtml)
$mainframe->redirect($http.'://'.$domain_xhtml.$path);
}
}
}
 


After the modification set
General Settings / Domain (multisite) support : Yes
Smartphone (XHTML-MP/WAP2.0) Domain / Domain name : mobile.site.com
Smartphone (XHTML-MP/WAP2.0) Domain / Redirect to domain : Yes (if you need it)
  • Page:
  • 1
Time to create page: 0.23 seconds

By continuing to use this site you consent to the use of cookies on your device as described in our cookie policy unless you have disabled them. This site will not function correctly without cookies.

I accept cookies from this site.