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
  #382  
Old 07-08-2010, 06:18 AM
AURFSCAN AURFSCAN is offline
 
Join Date: Dec 2007
Posts: 328
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by gopherhockey View Post
For those interested in fixing this so iPads don't see the mobile version of your site, find this bit of code and simply add "iPad" too it.

This of course assumes you are making an exception for iPhones already. It would be nice to have this as a separate setting.

Code:
 $ipodbrowsers = array(
          "iPod",
          "iPad",
          "iPhone"
          );

tried that, doesnt work

do what dartho says above, that works

again, this works well on vb4
Reply With Quote
  #383  
Old 05-16-2011, 09:52 PM
Majidm Majidm is offline
 
Join Date: Aug 2005
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dartho View Post
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
Reply With Quote
  #384  
Old 05-16-2011, 11:00 PM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Styles have to be user selectable, but you don;t have to "Allow users to change styles"
Reply With Quote
  #385  
Old 05-17-2011, 01:25 AM
Majidm Majidm is offline
 
Join Date: Aug 2005
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dartho View Post
Styles have to be user selectable, but you don;t have to "Allow users to change styles"
Ok so how would they change?
Reply With Quote
  #386  
Old 05-17-2011, 07:13 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm not sure I understand where you are having a problem - if you want them to change styles, then allow them to change styles?
Reply With Quote
  #387  
Old 05-17-2011, 12:14 PM
Majidm Majidm is offline
 
Join Date: Aug 2005
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dartho View Post
I'm not sure I understand where you are having a problem - if you want them to change styles, then allow them to change styles?
Well my issue is that even if they switch styles, the detector still sees them coming from a $mobile device and triggers my custom templates to send the mobile header/footer... how do I determine which style they have selected using PHP?
Reply With Quote
  #388  
Old 05-17-2011, 09:47 PM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK , now I see - you're having trouble with your plugins.

What you've got only checks their device - you probably need to set some flag or cookie when they change styles so you know if they are using your desktop or mobile headers/footer.
Reply With Quote
  #389  
Old 05-21-2011, 04:02 AM
dinodonk dinodonk is offline
 
Join Date: Aug 2005
Posts: 106
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

vb 4.1.3 have built in mobile detection, any problem to run your mod together with it?
Reply With Quote
  #390  
Old 05-21-2011, 05:36 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this one would probably override the built in one?
Reply With Quote
  #391  
Old 08-06-2011, 01:40 PM
BGObsession's Avatar
BGObsession BGObsession is offline
 
Join Date: Apr 2009
Posts: 199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

We're on 3.8 and adding 'ipad' to the exclusion list doesn't seem to be working for us - it's still forcing Ipad users to the mobile skin. Any ideas? I'm assuming capitalization doesn't matter (ie..'IPad' vs ''ipad' vs 'Ipad')?
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 07:51 PM.


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.07302 seconds
  • Memory Usage 2,319KB
  • 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
  • (1)bbcode_code
  • (1)bbcode_php
  • (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