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)

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


All times are GMT. The time now is 09:27 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.01575 seconds
  • Memory Usage 1,745KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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