I can not get it to work. Where ever I put the code you provided it gives me an error. If you could point me more specifically where to paste it I would appreciate it. Here is the code I have in the mobilebot.php file:
//Set template
if($template)
{
if(!$is_joomla15)
{
$db = JFactory::getDBO();
$query = "SELECT params FROM #__template_styles WHERE client_id = 0 AND template = ".$db->Quote($template)." ORDER BY id LIMIT 1";
$db->setQuery($query);
$params_data = $db->loadResult();
if(empty($params_data))
$params_data = '{}';
}
if(version_compare(JVERSION,'1.7','ge'))
{
$app->setTemplate($template, $params_data);
}
elseif(version_compare(JVERSION,'1.6','ge'))
{
$app->setTemplate($template);
$template_obj = $app->getTemplate(true);
$template_obj->params->loadJSON($params_data);
}
else
{
$app->setUserState('setTemplate', $template);
$app->setTemplate($template);
}
}