lang['MOBILE_ON']) ? $user->lang['MOBILE_ON'] : 'Mobile Version';
$mobile_link = str_replace('nomobile=1&', '', append_sid("{$phpbb_root_path}index.$phpEx", 'nomobile=0'));
}
else
{
$mobile_text = isset($user->lang['MOBILE_OFF']) ? $user->lang['MOBILE_OFF'] : 'Full Version';
$mobile_link = append_sid("{$phpbb_root_path}index.$phpEx", 'nomobile=1');
}
$mobile_html = '' . $mobile_text . '';
$user->lang['TRANSLATION_INFO'] = (isset($user->lang['TRANSLATION_INFO']) ? $user->lang['TRANSLATION_INFO'] . ' ' : '') . $mobile_html;
$template->assign_var('MOBILE_LINK', $mobile_html);
}
// MOD end: Mobile/SEO style
]]>
sql_query($sql, 3600);
$this->theme = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
// User has wrong style
]]>
check_mobile($sql, $style))
{
// MOD end: Mobile/SEO style
]]>
theme)
{
trigger_error('Could not get style data', E_USER_ERROR);
}
]]>
data['is_bot']) && strpos($browser, 'Mobile') === false && strpos($browser, 'Symbian') === false && strpos($browser, 'Opera M') === false && strpos($browser, 'Android') === false && stripos($browser, 'HTC_') === false && strpos($browser, 'Fennec/') === false && stripos($browser, 'Blackberry') === false && strpos($browser, 'Windows Phone') === false && strpos($browser, 'WP7') === false && strpos($browser, 'WP8') === false)
{
return true;
}
define('MOBILE_DEVICE', true);
if(!empty($_REQUEST['nomobile']))
{
define('MOBILE_DEVICE_OFF', true);
return true;
}
global $db;
// Important: change number 0 below to ID of Artodia:Mobile style.
// If it is set to 0, script will automatically find style, but it will use extra time and resources.
$mobile_style_id = 0;
if($mobile_style_id)
{
$sql2 = str_replace('s.style_id = ' . $style, 's.style_id = ' . $mobile_style_id, $sql);
$result = $db->sql_query($sql2, 3600);
$this->theme = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if($this->theme !== false)
{
define('MOBILE_STYLE', true);
return false;
}
}
// try to find style
global $phpbb_root_path;
$files = scandir($phpbb_root_path . 'styles');
$base = $phpbb_root_path . 'styles/';
for($i=0; $isql_escape($name) . '\'', $sql);
$result = $db->sql_query($sql2, 3600);
$this->theme = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if($this->theme !== false)
{
define('MOBILE_STYLE', true);
return false;
}
}
}
}
return true;
}
// MOD end: Mobile/SEO style
]]>