![]() |
VB4 - Mobile Phone / iPhone / PDA Detection and Style Assignment
1 Attachment(s)
This is a direct port from my 3.x versions which detects most mobile phones, iPhones, PDAs and other mobile browsing devices and automatically presents the user with a specific vBulletin style.
The one significant addition over previous versions is that a user can now over-ride the style assignment - more information in the notes section. This will probably work with previous versions of vBulletin (but untested) What can it do?Detects most mobile phones and presents the user with a specific style. If you have multiple styles installed which are optimized for small screen mobile devices, iPhones, WIndows Mobile devices you can assign a specific style to each of these groups. Whilst designed with mobile device users in mind, you could also assign styles to self defined browsers. For example you can assign an alternative style to Internet Explorer users whilst Firefox users get the default style. You could also assign an alternative style to Google or Yahoo spiders. Instructions: 0. Install styles which you wish to assign to Mobile/PDA/iPhone users 0.5 Uninstall previous versions 1. Download the product file 2. Install via Product Manager 3. Configure options via vBulletin Options, Mobile Device Detection (should appear at end) 4. Start browsing from your mobile device! 5. Click "Mark as Installed" If upgrading from a previous 3.5, 3.6 or 3.7 version, you will need to uninstall that and the install this one. To uninstall simply uninstall the product - there are no database changes or additional files. See HERE for a lightweight vBulletin 4 style to go along with this addon Version Control 1.0.0 - Initial Release 1.0.1 - Add option to enable/disable overriding style assignment. Notes Previous versions of this mod have forced a mobile device to a specific style, this is no longer the case! If a user now follows a link which changes the style (using a URL parameter of "styleid=xx") they will then be given that style for the rest of their session. If they close their browser and reload your site, they will then be detected again. Cookies must be enabled on the users browser for overriding detection to work To Do
|
F.a.q.
|
tagged and thanks
|
This is great, I have been waiting for this. Thank you!
|
Tagged. Currently using the previous version with no problems.
|
This version is great 'cos users can switch back to the normal style - so thank you for that :)
However, I have one user who says his Samsung phone is now going to the default style after the welcome page ... but it worked on the previous version - he's deleted his cache/cookies too (so he says). |
so when he first visits, he gets a specified style, but when he clicks a link het gets the default style?
|
Yeah pretty much.
It's a Samsung phone, so the useragent is there, he reckons he cleared his cookies and rebooted his phone too ... I wish I knew more about his phone. Most other users are reporting no problems, except one (A nokia user) who is now stuck on the default style (I'm a Nokia user and I have no problems). |
try giving him a link to follow to the style, ie. http://mydomain.com/forum.php?styleid=nn where nn is the style you want to display to him on his phone
|
Quote:
|
Question: How many additional database queries are required by this add-on?
|
zero
|
Quote:
|
Quote:
|
Oh, of course. Just a simple if... then. :o
|
Nice update. thanks.
|
Quote:
Quote:
Considering it worked on the older version, I'm thinking the only way to make the style fully switchable (without problems) is with a custom profile option and a conditional to turn off the useragent detection ... I did try the following: if ($vbulletin->options['mob_detect_enabled'] == 1 AND $bbuserinfo['fieldxx'] == "On") but that just killed the plugin completely. |
You would be after:
Code:
if (($vbulletin->options['mob_detect_enabled'] == 1) AND ($bbuserinfo['fieldxx'] == "On")) |
I'm a bit stumped too, I haven't got any access to different brands of phone to see if it's user error or not.
I'll try your conditional and see if that works, in the meantime I've gone back to the 3.8 plugin. :) |
Hmm, that conditional is just getting ignored :S
|
If we can get that conditional to work, count me in!
|
Doesn't work with android browser...
|
Quote:
|
How? I installed and enabled and my Droid is pointed to the full version.
|
I even entered Mozilla/5.0 (Linux; U; Android 2.2; en-us; Droid Build/FRG22D) AppleWebKit/533.1 (KHTML, like Gecko) in the box.
|
just enter "Android" in the custom section, and make the style is user selectable
|
Works. Must be case sensitive...i coulda swore i tried that before and it failed.
Maybe give android a full thing like WinMob and iOS? There's more Android devices than iphones now bro. |
Any others that should be entered into the Custom section?
For example, will this work on Blackberry phones as is? |
Quote:
Quote:
|
I had to add Palm. The string was WebOS.
|
Quote:
|
new version released which adds a "disable style override" option and *might* resolve the issue reported by a couple of detection on being triggered on first page visited
|
A user with an Appele iPad wants the default style, must I put 'iPad' in the Useragent Exceptions section?
|
Yes, that should work
|
Hmm, doesn't seem to work with my iphone (only device I have to try it with).
I have it set to use the mobile style for mobile devices... but it still brings me to the default style. Any thoughts? Thanks! |
Do you have the mobile style set as user selectable. Double check your settings in AdminCP and take a screen shot to post here if still not working. Thanks
|
1 Attachment(s)
I believe these are the relevant screens, and yep, the style is available to anyone, guest or otherwise.
|
That all looks correct. I've just connected to your site using my desktop browser with a spooffed USER Agent (pretending to be an iPhone) and got the lightweight style OK. The full style link does not work though, as you have specified not to enable over-ride.
Could you try 2 things. 1 - clear all your cookies, and then if that doesn;t work, log out of vbulletin and clear the cookies again then connect to your site again. Also try turning off iPhone detection (having Mobiule Detection enabled implicitly catches iPhones also) |
Works great! woohoooooooo!
|
strange, i used the user switch agent to manually add the user agent of my iphone 4, and it works in my browser then. but no matter what i do, I can't get it to work on my actual iphone4. cleared cache/cookies/history. restarted iphone for good measure. not logged in. still doesn't work, haha.
i'm going to ask some of my users to try it out, if its just me I don't mind. Many thanks for your awesome products and excellent responsiveness. you rock. here is the user agent just for reference: Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_1 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8B117 Safari/6531.22.7 |
All times are GMT. The time now is 01:43 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|