Quote:
Originally Posted by Filgga
Superb! I know, many will benefit from this... Do I add the code onto the above code and look like:
PHP Code:
//VB has already check and set cookies if the user can skip the style, so just read what they wrote
$vbulletin->input->clean_array_gpc('c', array(
COOKIE_PREFIX . 'userstyleid' => TYPE_INT,
COOKIE_PREFIX . 'skipmobilestyle' => TYPE_BOOL,
));
$skip = $vbulletin->GPC[COOKIE_PREFIX . 'skipmobilestyle'];
//Admin can have any style they want, so check if they're an admin and have specificed a styleid
if ($vbulletin->userinfo['permissions']['adminpermissions'])
{
$vbulletin->input->clean_gpc('r', 'styleid', TYPE_INT);
$styleid = $vbulletin->GPC['styleid'];
}
else if ($skip)
//if the user is not an admin has chosen to skip the mobile style (if allowed) give them default
$styleid=$vbulletin->GPC[COOKIE_PREFIX . 'userstyleid'];
else if ($vbulletin->mobile_browser_advanced)
$styleid=89; //Advanced mobile style ID
else if ($vbulletin->mobile_browser)
$styleid=89; //Basic mobile style ID
else
$styleid=1; //everyone else gets default style default style
select:eval
//options = fetch_style_title_options_array('', false, 'mobile');
$options = fetch_style_title_options_array();
$options = array('0' => $vbphrase['none']) + $options;
?
Thanks for your prompt response
|
none of this worked for me... running 4.2.1
I added the plugin but as soon as i clicked back onto forum link it brought up the default style

when choosing 'mobile' in the style chooser it wouldnt change it back