How to check which phone / template is used.

marcelha
13 years, 11 months ago
I want to know which phone ans is detected and which template is used by MobileJoomla..
Can this be displayed on some way?
miohtama
13 years, 11 months ago
marcelha wrote:
I want to know which phone ans is detected and which template is used by MobileJoomla..
Can this be displayed on some way?


Try this module example - it switches loaded template name based on the active mark up:
 
// no direct access
defined('_JEXEC') or die('Restricted access');
 
$lang =& JFactory::getLanguage();
$lang->load('mod_search');
 
$button_pos = $params->get('button_pos', 'left');
$button_text = $params->get('button_text', JText::_('Search'));
$width = intval($params->get('width', 20));
$maxlength = $width > 20 ? $width : 20;
$text = $params->get('text', JText::_('Search box'));
$moduleclass_sfx = $params->get('moduleclass_sfx', '');
 
$MobileJoomla =& MobileJoomla::getInstance();
 
switch ($MobileJoomla->getMarkup()) {
case 'iphone':
require(JModuleHelper::getLayoutPath('mod_mj_search', 'default_iphone'));
break;
default:
require(JModuleHelper::getLayoutPath('mod_mj_search', 'default_pda'));
break;
}'
 
 


Then you have default_pda and default_iphone.php instead of default.php in tmpl folder of module.

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.