Welcome, Guest
Username Password: Remember me

How to check which phone / template is used.
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: How to check which phone / template is used.

How to check which phone / template is used. 13 years, 11 months ago #707

  • marcelha
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
  • Karma: 0
I want to know which phone ans is detected and which template is used by MobileJoomla..
Can this be displayed on some way?

How to check which phone / template is used. 13 years, 11 months ago #2818

  • miohtama
  • OFFLINE
  • Expert Boarder
  • Posts: 112
  • Karma: 4
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.
  • Page:
  • 1
Time to create page: 0.10 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.