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
  #152  
Old 11-02-2008, 02:55 PM
zane99 zane99 is offline
 
Join Date: Jan 2006
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi, great mod.

However seems to be running ok for some users and not others. at the moment i think its the majority of blackberry users which it is not working for.

any ideas?

cheers
Reply With Quote
  #153  
Old 11-02-2008, 07:45 PM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

They are probably new models which have a useragent which sin;t detected by this add-on. could you check their useragent strings and post back here or PM me?
Reply With Quote
  #154  
Old 11-03-2008, 08:57 PM
wma wma is offline
 
Join Date: Aug 2004
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hello,

a great work! it works fine for my mobile users, include iphone & co.

now, some users ask to change the rule, how the detector works. some iphone user (and others) want to visit my board with the original style. i think i can realize taht with the following steps:


1. make a subdomain like mobile.exampleforum.com

2. route the new subdomain (http forwarding at the server) to one of the mobile style url, to let the detector find wich style is prefered (cellular or iphone)

3. if a mobile user want to visit the board with normaly style, he can visit www.exampleboard.com

4. but ... i must find the variable $_SERVER['HTTP_USER_AGENT'] in the normaly style to kill them. because the detector want to route the mobile users to the style.

and 5th: my problem is, i didn't find your variable $_SERVER['HTTP_USER_AGENT'] in the styles. can you give me a tipp please?

and the next problem is, i don't want that the PC users can visit my mobile styles. and i didn't know how i can solve these problem.

i think, i install the add-on but only on my mobile style...


is there any way to solve my wish?


sorry for my bad english ;-)

best regards,
tom
Reply With Quote
  #155  
Old 11-03-2008, 09:59 PM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think it may be easier to go about this in the opposite manner.

This is untested!

Create a sub-domain like "pc.exampleforum.com" and park it on the same web space as your main forum

Create a new plugin called "Force to Default Style" on "fetch_style" hook execution order 10 with the following code:
Code:
$pc_url= "pc.exampleforum.com";
if(preg_match('/'.$pc_url.'/i', $_SERVER['HTTP_HOST'], $match))
    {
      $styleid=x;
    }
change the x on th line $styleid=x; to be the styleid number of your default style.

Tell your mobile users that if they wish to view the default style, they should visit pc.exampleforum.com or add a link in your mobile style navbar to this subdomain called "Default STyle" or some such thing.

This way mobile visitors to your site are still detected and given a mobile skin, but they can choose to view the site using the default style.

If you make your mobile styles not user selectable, they will not be able to view you site form their PC's via the mobile style (they could with User Agent spoofing - but there's not much you can do about that)

Hope this helps.

nb - this will only work correctly if all your links are relative - hard code full path links and addons such as VBSEO may break this.
Reply With Quote
  #156  
Old 11-03-2008, 10:05 PM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by trigatch4 View Post
Dartho... you make good points. The thing is, I want to FORCE the user to the mobile version initially but be able to switch/use the full version if they wish. Otherwise, if it STARTS on the full version and they are able to switch TO the mobile version, I think they are much less likely to see where/how to switch since there is so much going on. Whereas a link to use the FULL VERSION on the mobile theme would be easily spotted.

Secondly, where can I find the Replacement Variables?

EDIT: Regardless, I should add you've done a great job and thanks for the valuable addition to the community!
Check the post above for a work around which may make it possible for mobile users to choose to view the site via it's default style.

Replacement Variables are in your admincp - Styles and Templates, Style Manager, All Style Options (for the mobile style) right at the very end.
Reply With Quote
  #157  
Old 11-03-2008, 11:44 PM
Quarterbore Quarterbore is offline
 
Join Date: Mar 2005
Location: Valley Forge PA
Posts: 538
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

dartho,

Can we work on a small test script that would show the user what useragents are associated with their mobile device? I am going to play with the code and post here if I get a fix but I have one member that this is not working for and they can't help me figure out what the issue is either.

I'll post what I come up with...

That was easier then I expected...

Create a file "test.php" and to that file add:

PHP Code:
<?php
echo 'User Agen Test Script.<p>';
echo 
'Your user agent: <p>';
echo 
$_SERVER['HTTP_USER_AGENT'];
exit();
?>
When your users access the file their browser says something like:

Quote:
User Agent Test Script:

Your use agent:

BlackBerry8310/4.2.2Profile/MDP-2.0 Configuration/CLDC-1.1 VendorID/102
From that, you can add useragents to give access to mobile users!

You can see the test script here:

http://www.vbclassified.com/test.php
Reply With Quote
  #158  
Old 11-04-2008, 02:59 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good stuff, QB :up:
Reply With Quote
  #159  
Old 11-06-2008, 03:54 PM
fredang85 fredang85 is offline
 
Join Date: Sep 2007
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What do you need to edit in the template for only a few forums to show up?

Thanks.
Reply With Quote
  #160  
Old 11-13-2008, 06:29 AM
gamerfu gamerfu is offline
 
Join Date: Apr 2008
Location: 台灣,&
Posts: 326
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PSP is not detected. PSP drop-down menu will not auto-refresh when choosen "Mobile" style.
Reply With Quote
  #161  
Old 11-13-2008, 07:31 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PSPs should be detected - what is the user agent string of the device?
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 10:22 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
  • Page Generation 0.05260 seconds
  • Memory Usage 2,325KB
  • 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
  • (2)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
  • (2)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