Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Mobile Phone / iPhone / PDA Detection and Style Assignment Details »»
Mobile Phone / iPhone / PDA Detection and Style Assignment
Version: 1.0.0, by dartho dartho is offline
Developer Last Online: Oct 2023 Show Printable Version Email this Page

Category: Forum Display Enhancements - Version: 3.7.x Rating:
Released: 03-16-2008 Last Update: 03-16-2008 Installs: 957
Supported Uses Plugins
Translations  

This add-on will detect most mobile phones, iPhones, PDAs and other mobile browsing devices and automatically for the user to a specific vBulletin style.

What can it do?
Detects most mobile phones and force the user to a specific style (users will not be able to select other styles from a mobile device with this add-on installed). 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 - some links will appear at the bottom of this post
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 or 3.6 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.

Styles released on vBulletin which you can use:
Dartho's Mobile, Cell, Phone, PDA, iPhone Style for vBulletin 3.7 (<-- yep, that's mine)
ElForro's iPhone / iPod Touch Optimized Style
Zachery's vB Lite Style
vBMechanics Mobile Alabama Style

Due to the stripped down nature of these mobile styles, you will find that most for 3.5 and 3.6 will work quite happily on 3.5, 3.6 & 3.7 although additional features introduced in vBulletin in recent years such as Social Groups, Blogs and Photo Galleries will not show well on a small screen. All should display your actual forums well.

3.6 Version can be found here

Marked as Beta until I get some feedback, and 3.7 goes Gold

Release Information
1.0.0 Initial release for 3.7 ported over from 3.6.8 version

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
Don Z.

Comments
  #332  
Old 10-14-2009, 12:02 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Taken from teh Mobile Style thread
Quote:
Originally Posted by dartho View Post
G'day , get your users to visit http://vbdev.org/test-mob-detect.php and to copy and paste what shows up on the screen to you. This will tell you whether the browser is being detected as a mobile device, and also give you useragent info.
Quote:
Originally Posted by wacnstac View Post
Well the device that doesn't render one of the websites properly shows:
Opera/9.80 (J2ME/MIDP; Opera Mini/4.2.14912/756; U; en)
Presto/2.2.0

Don't know what part(s) of that I need to enter to get it auto recognized.....
Quote:
Originally Posted by wacnstac View Post
So here's what one user who gets the mobile style shows for a user agent:

HTTP_USER_AGENT: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PalmSource/Palm-D062; Blazer/4.5) 16;320x320
HTTP_ACCEPT: text/html, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/vnd.wap.wml , image/png, image/jpeg, image/gif, image/bmp, image/vnd.wap.wbmp, application/octet-stream, image/pjpeg, */*;q=0.1, */*,text/html;q=0.062,image/gif;q=0.062,image/x-jng;q=0.062,video/x-mng;q=0.062,image/x-mng;q=0.062,image/bmp;q=0.062,image/x-bmp;q=0.062
Quote:
Originally Posted by wacnstac View Post
I am experiencing the following error now while browsing the mobile style:

"Warning: preg_match() [function.pre-match]: unknown modifier 'M' in [path]/global.php(238) : eval()'d code on line 117

This error started occurring after I tried to add J2ME/MIDP to the list of mobile browsers in the XML file that does the auto detect. I have since removed it and the error went away. Any thoughts on how to add J2ME/MIDP?

I'd say it was the "/" that upset it. J2ME and MIDP should already be detected. That link I posted should tell you if it was detected as a mobile device or not - what did it have to say?
Reply With Quote
  #333  
Old 10-14-2009, 01:27 AM
wacnstac wacnstac is offline
 
Join Date: Nov 2001
Posts: 312
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It does say Mobile Device Detected, but for some reason the switch is made for:

http://www.michigan-sportsman.com/forum/

but not for:
http://www.ohiosportsman.com/forum/

Also I have a user who is not on a mobile device, but rather webTV. I would like him to see the normal version of the forums. His user agent string is:

Mobile Device Detected
HTTP_USER_AGENT: Mozilla/4.0 WebTV/2.6 (compatible; MSIE 4.0)
HTTP_ACCEPT: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*

What would I put in the Useragent Exceptions to make that happen?
Reply With Quote
  #334  
Old 10-14-2009, 01:44 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

putting "WebTV" in useragent exceptions should fix things.

I'm guessing a configuration issue, or possibly a conflict with another add-on. On Ohiosportsman, is your mobile style ticked as user selectable? are the mobile detection settings identical on both sites?
Reply With Quote
  #335  
Old 10-15-2009, 10:47 PM
rasp187 rasp187 is offline
 
Join Date: Dec 2005
Location: Ohio
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well this works great at assining your template to myself, a friend with a G1, another admin with a WM6.1 device and an iPhone user, but some iPhone users report it not working for them, and a few users running the BB Bold are reporting it not working, either. An administrator on my boards with the same phone that I have (that works perfectly fine) hare reported it not working.

I have instructed them all to clear their history and cache, and that has not helped rectify the issue. I have also added some of the useragents manually and that still hasn't helped their problems. Is there something I should be instructing them to do or what? Makes no sense that it would work with one iPhone but not another, yet quite a few users are claiming it's still loading the default template in normal view. Any help would be greatly appreciated.
Reply With Quote
  #336  
Old 10-16-2009, 01:52 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'd guess you have configuration issues.

Make sure all your styles are user selectable.
Check the exceptions section and remove any and/or disable
Enable ALL the detections (Mobile, WIndows CE, iPhone, Custom)
Test it logged out and see if that makes a difference to when logged in.
Reply With Quote
  #337  
Old 10-16-2009, 07:29 AM
rasp187 rasp187 is offline
 
Join Date: Dec 2005
Location: Ohio
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well I was running your other program that doesn't make the mobile template user-selectable. I'm not really a fan of forum users being able to choose that from the list.

Exceptions list is disabled and all detections are enabled.

I made all the templates user-selectable and now it shows the mobile template to people on the PC.
Reply With Quote
  #338  
Old 10-16-2009, 07:51 AM
rasp187 rasp187 is offline
 
Join Date: Dec 2005
Location: Ohio
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah now the default skin for anyone who has logged in with a mobile device before is the mobile template, so I am seeing the mobile template on my PC now and am unable to select another template.

Only other mod installed is vBAdvanced.
Reply With Quote
  #339  
Old 10-16-2009, 07:58 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do you have more than a single style on your forums which you allow users to select? If not then set your vBulletin options to not allow users to change styles. Then users can not selecte the mobile style from a PC.

HOWEVER - if a style is not user selectable then a user (ie. this add-on) can not use it.

You can, multiple styles installed which are user selectable AND also have vBulletin Options configured so that users can not change the style.

If you do have multiple styles and you do allow users to change them, you can either let them select what ever mobile styles you have installed, or try this mod which can hide a style form teh style selector: https://vborg.vbsupport.ru/showthread.php?t=183185
Reply With Quote
  #340  
Old 10-16-2009, 09:44 AM
rasp187 rasp187 is offline
 
Join Date: Dec 2005
Location: Ohio
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have 2 PC styles (a green and a blue one). Initially your mobile template was only working for admins because I was not allowing users the ability to select a template because we were working on the blue one still. We released the blue one today, and I opened that feature up. The minute I made the default template not forced on the users, it changed my default template on my PC to the mobile template so I was viewing my forums on my laptop through the mobile template.

Basically I'm not sure why it's not detecting it as a PC and then using the default template as the default template. I think it would be tedious for users to have to constantly change back to the default template when they get on their PC after viewing from a mobile device. Is there any reason why this would detect a PC as a mobile device and assign the mobile template?

Also note that if I make the mobile template selectable, once a user selects it, they are unable to switch back to a PC template unless I totally disable the template. So right now, on my forum, I have the mobile template enabled and selectable, and I cannot switch back to the PC template without having to disable the template itself.
Reply With Quote
  #341  
Old 10-16-2009, 10:11 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sounds like you had the mobile style as the default template, or some other configuration error.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:28 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05459 seconds
  • Memory Usage 2,322KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete