vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Forum Display Enhancements - Mobile Phone / iPhone / PDA Detection and Style Assignment (https://vborg.vbsupport.ru/showthread.php?t=173239)

SVTCobraLTD 01-15-2010 04:12 PM

How can I give the option to choose the PC version of the site? Some users do not like the mobile version.

CR_TurboGuy 01-15-2010 05:18 PM

Quote:

Originally Posted by SVTCobraLTD (Post 1956634)
How can I give the option to choose the PC version of the site? Some users do not like the mobile version.

This is how I handled it on my forum:
https://vborg.vbsupport.ru/showpost....&postcount=283

--JOsh

SVTCobraLTD 01-16-2010 02:34 PM

Quote:

Originally Posted by CR_TurboGuy (Post 1956705)
This is how I handled it on my forum:
https://vborg.vbsupport.ru/showpost....&postcount=283

--JOsh

I did that. Now where do the user's change the settings? I went into my usercp while in mobile and do not see it anywhere.

Bounce 01-31-2010 08:25 PM

Does this work on vb4? i've installed it but doesn't work for users on phones :(

Biker_GA 02-12-2010 03:32 AM

Yo! Dartho! Down here!

Any plans on porting this jewel over to 4.0x? My users (namely the rich ones who have iPhones and Androids) are clamoring for the mobile style. Yet, vB sees the OS as a Desktop OS and gives 'em the default style for the site. This little jewel allows me to force those fancy mobile devices to the mobile style, which my mobile users prefer.

SVTCobraLTD 02-13-2010 11:46 PM

Quote:

Originally Posted by SVTCobraLTD (Post 1957376)
I did that. Now where do the user's change the settings? I went into my usercp while in mobile and do not see it anywhere.

Anyone?

stardotstar 02-16-2010 08:38 PM

Hi dartho, thanks for such a godsend suite of mobile goodness!
I am blind and the rest of this post was redundant - sorry about posting for help - the options were further up - my congratulations on great mods, support and attitude stand!
Will

Biker_GA 02-17-2010 03:11 AM

Quote:

Originally Posted by SVTCobraLTD (Post 1981756)
Anyone?

Did you read what this modification does?

Quote:

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.
There is no option for users to change the style. This allows you, as the Administrator, to force a specific style for mobile users.

dartho 02-17-2010 04:32 AM

Quote:

Originally Posted by Biker_GA (Post 1980496)
Yo! Dartho! Down here!

Any plans on porting this jewel over to 4.0x? My users (namely the rich ones who have iPhones and Androids) are clamoring for the mobile style. Yet, vB sees the OS as a Desktop OS and gives 'em the default style for the site. This little jewel allows me to force those fancy mobile devices to the mobile style, which my mobile users prefer.

This version should work under 4.0 - i held of releasing it as I was hoping to get time to look at a few changes. If I were to release it now as a 4.0 product, it would be identical code

Biker_GA 02-21-2010 09:43 PM

Perfect! I'll give it a shot and report back if I run into any issues. :D

CR_TurboGuy 02-24-2010 06:18 PM

Quote:

Originally Posted by SVTCobraLTD (Post 1957376)
I did that. Now where do the user's change the settings? I went into my usercp while in mobile and do not see it anywhere.

You'll need to visit your user control panel from a normal browser once to set that preference.

--JOsh

lowlight 03-12-2010 02:33 AM

I added "Pre" to the custom definitions list. You asked us to report it here, so you here go :)

lowlight 03-12-2010 02:40 AM

Problem is, putting "Pre" in the custom definitions causes all "Presto" browsers to be detected as mobile.

Is there any other way? This is the Palm Pre's useragent:

Mozilla/5.0 (webOS/1.4.0; U; en-CA) AppleWebKit/532.2 (KHTML, like Gecko) Version/1.0 Safari/532.2 Pre/1.0

lowlight 03-12-2010 02:41 AM

Hmm I'll try "WebOS"

gopherhockey 04-02-2010 11:14 AM

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"
          );


dartho 04-02-2010 11:27 AM

given the iPad's screen resolution, you'd be best off adding it to the user agent exceptions section ...

Zillo 04-13-2010 05:43 PM

Quote:

Originally Posted by aggiefan (Post 1468120)
any chance you might get this ready to use with the new skyfire browser.... just got my beta and skyfire is awesome but this script does not redirect me to our mobile site like pocket IE does.

i dont know what specifically skyfire identifies itself as but its not currently working with this script and i suspet more and more users will be going to this browser because its awesome.

Quote:

Originally Posted by dartho (Post 1468210)
@aggiefan - Use your PDA to browse your site with Skyfire, then form your PC check who is online, turn on display user agent and check the User Agent string of your skyfire browser. You can post it here, or send me a PM. Although if it does indeed render pages that well, you might want to add it to the exceptions list!

Skyfire's user-agent is Firefox so there is no way to check who is using Skyfire just by checking the user-agent. Skyfire has its own HTTP headers: x_skyfire_phone , x_skyfire_screen and x_skyfire_version. That is the only way to check who is using Skyfire but I guess this script created by dartho does not detect any other header different than user-agent.

By the way Skyfire is probably the only way to watch flash videos and flash streaming on Windows Mobile and Symbian

jansen_berlin 04-22-2010 01:02 PM

This addon disables the manually Style choice in vb 3.8.5. Anybode else has the same problem?

Wings69 07-07-2010 01:48 PM

Quote:

Originally Posted by dartho (Post 2014566)
given the iPad's screen resolution, you'd be best off adding it to the user agent exceptions section ...

What do I have to put there? I tried googling the Ipad user agent string and putting it there but it didn't work.

dartho 07-07-2010 11:20 PM

@Wings69 - add the word ipad to the user agent exceptions section.

AURFSCAN 07-08-2010 06:18 AM

Quote:

Originally Posted by gopherhockey (Post 2014558)
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

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

dartho 05-16-2011 11:00 PM

Styles have to be user selectable, but you don;t have to "Allow users to change styles"

Majidm 05-17-2011 01:25 AM

Quote:

Originally Posted by dartho (Post 2196538)
Styles have to be user selectable, but you don;t have to "Allow users to change styles"

Ok so how would they change?

dartho 05-17-2011 07:13 AM

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?

Majidm 05-17-2011 12:14 PM

Quote:

Originally Posted by dartho (Post 2196669)
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?

dartho 05-17-2011 09:47 PM

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.

dinodonk 05-21-2011 04:02 AM

vb 4.1.3 have built in mobile detection, any problem to run your mod together with it?

dartho 05-21-2011 05:36 AM

this one would probably override the built in one?

BGObsession 08-06-2011 01:40 PM

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')?

dartho 08-06-2011 02:01 PM

can;t remember if it is case sensative, but did you try 'iPad' and also ensured excpetions are enabled - also if you have more than ob exception, try iPad only; check no spaces between commas etc.

BGObsession 08-07-2011 08:03 PM

it's not case-sensitive, I'm just embarrassed to admit that I didn't have the exclusion option turned on. Details - they're a *****! :) Worked fine once I did that.

BGObsession 08-07-2011 08:07 PM

Dartho...I've got a user with a Nokia N900 who wants to be excluded... any idea what 'user string agent' I need to insert to exclude that model?

dartho 08-07-2011 08:44 PM

the UA is "Mozilla/5.0 (X11; U; Linux armv7l; en-GB; rv:1.9.2a1pre) Gecko/20090928 Firefox/3.5 Maemo Browser 1.4.1.21 RX-51 N900", so i think N900 should do it or 1.9.2a1pre

It uses a Firefox browser, so you could also make all firefox browsers excluded by adding Firefox to teh exclusions?

BGObsession 08-09-2011 10:34 PM

N900 worked like a charm. Thanks!

barakuda 10-24-2011 09:05 AM

hi,

when i use this mode the other style can,'t work in firefox ?

dartho 10-24-2011 09:41 AM

Disable "Enable user defined device detection" and/or remove the word "Firefox" from the "Custom/User Defined Useragent String"

barakuda 10-24-2011 05:16 PM

Quote:

Originally Posted by dartho (Post 2260879)
Disable "Enable user defined device detection" and/or remove the word "Firefox" from the "Custom/User Defined Useragent String"

Solution number 1-Disable "Enable user defined device detection" is work but number 2-remove the word "Firefox" from the "Custom/User Defined Useragent String" not work.
is this mod still work if i choose Disable "Enable user defined device detection"?

Thank you
Best Regard

dartho 10-24-2011 09:01 PM

Yes - the mod will still work

cronjob78 11-29-2011 07:07 PM

Any one experiencing issues with the iphone 4 for this mod?

Works a treat on android but on iphone it just shows the normal full view style and not the mobile specific style.

Suggestions appreciated.


All times are GMT. The time now is 05:48 PM.

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.01858 seconds
  • Memory Usage 1,830KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (15)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete