Majidm |
05-16-2011 09:52 PM |
Quote:
Originally Posted by dartho
(Post 1779571)
OK - try the attached. Basically, if a user has used the style chooser (ie. manually chosen a style), it won't override their choice.
example 1 - user visits via iPhone for first time, they get presented with iPhone skin as configured. If they change teh style to default skin, all visits from here on in will present them with default skin or what ever style they manually choose from then on
example 2 - users visits with small screen old nokia phone, they get presented with mopbile skin as configured. If they change the style to defualt skin, all visits from then on will present them with teh default skin. If their browser can't handle it and they can;t get back to the style chooser. they will not be able to view your site properly again.
proviso's - browser must accept cookeis for this to work (clearing browers cookies will reset)
|
Hi dartho, first off thanks for the great mod.
Secondly can you explain a bit more how to use this addition? Do I need to enable custom Style Selection for the user?
I'm using your mod in conjunction with custom PHP code.. basically I'm serving a different PHP header and footer if they come from a mobile device, using your code:
PHP Code:
// Mobile Layout Start if ($mobile || $pda || $ipod || $except_browser || $custom1) { // Mobile header
} else { // Desktop header }
The header and footer are fed into vBulletin via a custom plugin..
Everything works great, I'm just not quite sure how to modify the detector to allow people to choose the desktop style when they are on a mobile device
|