vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Integration with vBulletin - Mobile Device & Browser Detection (Adapted by BOP5) (https://vborg.vbsupport.ru/showthread.php?t=292704)

karabaja3 03-06-2013 12:01 AM

Will this work on v3.8.7?
Becuase this one doesn't https://vborg.vbsupport.ru/showthread.php?t=173239

BirdOPrey5 03-09-2013 09:42 AM

Only for 4.x, sorry.

ivanp 03-10-2013 05:53 PM

Nice mod :)

I suggest changing the hook to "init_startup" to be able to replace default mobile browser detection in init.php with:

Code:

if($vbulletin->options['bop5_mob_detect'])
{
        $mobile_browser = $vbulletin->detect->isMobile();
        if($mobile_browser && $vbulletin->detect->isTablet()) $mobile_browser = false;
        $mobile_browser_advanced = $mobile_browser;
}

That way tablets will not be considered as mobile devices, thus not being served mobile style as default style.

Budget101 06-09-2013 11:25 AM

Quote:

Originally Posted by ivanp (Post 2409190)
Nice mod :)

I suggest changing the hook to "init_startup" to be able to replace default mobile browser detection in init.php with:

Code:

if($vbulletin->options['bop5_mob_detect'])
{
    $mobile_browser = $vbulletin->detect->isMobile();
    if($mobile_browser && $vbulletin->detect->isTablet()) $mobile_browser = false;
    $mobile_browser_advanced = $mobile_browser;
}

That way tablets will not be considered as mobile devices, thus not being served mobile style as default style.

wouldn't removing the following line do the same thing??

Code:

$vbulletin->detect->isTablet()    - true if tablet

Toorak Times 06-09-2013 11:34 AM

Hey BOP, does this make our videos and stuff work on iPhones and pads?

BirdOPrey5 06-09-2013 03:24 PM

Quote:

Originally Posted by Toorak Times (Post 2426822)
Hey BOP, does this make our videos and stuff work on iPhones and pads?

No- it merely detects if it is a mobile browser or not- it does nothing without custom coding.

However to have YouTube and other videos work on iPhones and stuff check out these HTML 5 changes- https://vborg.vbsupport.ru/showthread.php?t=283594

behcet 07-31-2013 06:57 PM

upgrade pls

datoneer 07-31-2013 09:45 PM

Thanks, installed, nominated

Okuma Steve 08-16-2013 06:38 AM

Just installed this on my site and it is treating all my devices as desktop browsers and not mobile. Any ideas on why that may be?

I've tested it with a nexus 4, nexus 7, and an Ipad 1

I'm using this to hide a footer ad from mobile users:

PHP Code:

<vb:if condition="!$vboptions['isMobile']">

code code code

</vb:if> 


BirdOPrey5 08-17-2013 10:41 AM

Quote:

Originally Posted by Okuma Steve (Post 2439129)
Just installed this on my site and it is treating all my devices as desktop browsers and not mobile. Any ideas on why that may be?

I've tested it with a nexus 4, nexus 7, and an Ipad 1

I'm using this to hide a footer ad from mobile users:

PHP Code:

<vb:if condition="!$vboptions['isMobile']">

code code code

</vb:if> 


Did you follow the instructions in post #4? $vboptions['isMobile'] isn't going to exist if you don't set the value via a plugin first.


All times are GMT. The time now is 11:17 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.00997 seconds
  • Memory Usage 1,741KB
  • 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
  • (3)bbcode_code_printable
  • (2)bbcode_php_printable
  • (3)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
  • (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