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)

dartho 10-14-2009 12:02 AM

Taken from teh Mobile Style thread
Quote:

Originally Posted by dartho (Post 1898949)
G'day , get your users to visit http://vbdev.org/test-mob-detect.php and to copy and paste what shows up on the screen to you. This will tell you whether the browser is being detected as a mobile device, and also give you useragent info.

Quote:

Originally Posted by wacnstac (Post 1899041)
Well the device that doesn't render one of the websites properly shows:
Opera/9.80 (J2ME/MIDP; Opera Mini/4.2.14912/756; U; en)
Presto/2.2.0

Don't know what part(s) of that I need to enter to get it auto recognized.....

Quote:

Originally Posted by wacnstac (Post 1899059)
So here's what one user who gets the mobile style shows for a user agent:

HTTP_USER_AGENT: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PalmSource/Palm-D062; Blazer/4.5) 16;320x320
HTTP_ACCEPT: text/html, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/vnd.wap.wml , image/png, image/jpeg, image/gif, image/bmp, image/vnd.wap.wbmp, application/octet-stream, image/pjpeg, */*;q=0.1, */*,text/html;q=0.062,image/gif;q=0.062,image/x-jng;q=0.062,video/x-mng;q=0.062,image/x-mng;q=0.062,image/bmp;q=0.062,image/x-bmp;q=0.062

Quote:

Originally Posted by wacnstac (Post 1899068)
I am experiencing the following error now while browsing the mobile style:

"Warning: preg_match() [function.pre-match]: unknown modifier 'M' in [path]/global.php(238) : eval()'d code on line 117

This error started occurring after I tried to add J2ME/MIDP to the list of mobile browsers in the XML file that does the auto detect. I have since removed it and the error went away. Any thoughts on how to add J2ME/MIDP?


I'd say it was the "/" that upset it. J2ME and MIDP should already be detected. That link I posted should tell you if it was detected as a mobile device or not - what did it have to say?

wacnstac 10-14-2009 01:27 AM

It does say Mobile Device Detected, but for some reason the switch is made for:

http://www.michigan-sportsman.com/forum/

but not for:
http://www.ohiosportsman.com/forum/

Also I have a user who is not on a mobile device, but rather webTV. I would like him to see the normal version of the forums. His user agent string is:

Mobile Device Detected
HTTP_USER_AGENT: Mozilla/4.0 WebTV/2.6 (compatible; MSIE 4.0)
HTTP_ACCEPT: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*

What would I put in the Useragent Exceptions to make that happen?

dartho 10-14-2009 01:44 AM

putting "WebTV" in useragent exceptions should fix things.

I'm guessing a configuration issue, or possibly a conflict with another add-on. On Ohiosportsman, is your mobile style ticked as user selectable? are the mobile detection settings identical on both sites?

rasp187 10-15-2009 10:47 PM

Well this works great at assining your template to myself, a friend with a G1, another admin with a WM6.1 device and an iPhone user, but some iPhone users report it not working for them, and a few users running the BB Bold are reporting it not working, either. An administrator on my boards with the same phone that I have (that works perfectly fine) hare reported it not working.

I have instructed them all to clear their history and cache, and that has not helped rectify the issue. I have also added some of the useragents manually and that still hasn't helped their problems. Is there something I should be instructing them to do or what? Makes no sense that it would work with one iPhone but not another, yet quite a few users are claiming it's still loading the default template in normal view. Any help would be greatly appreciated.

dartho 10-16-2009 01:52 AM

I'd guess you have configuration issues.

Make sure all your styles are user selectable.
Check the exceptions section and remove any and/or disable
Enable ALL the detections (Mobile, WIndows CE, iPhone, Custom)
Test it logged out and see if that makes a difference to when logged in.

rasp187 10-16-2009 07:29 AM

Well I was running your other program that doesn't make the mobile template user-selectable. I'm not really a fan of forum users being able to choose that from the list.

Exceptions list is disabled and all detections are enabled.

I made all the templates user-selectable and now it shows the mobile template to people on the PC.

rasp187 10-16-2009 07:51 AM

Yeah now the default skin for anyone who has logged in with a mobile device before is the mobile template, so I am seeing the mobile template on my PC now and am unable to select another template.

Only other mod installed is vBAdvanced.

dartho 10-16-2009 07:58 AM

Do you have more than a single style on your forums which you allow users to select? If not then set your vBulletin options to not allow users to change styles. Then users can not selecte the mobile style from a PC.

HOWEVER - if a style is not user selectable then a user (ie. this add-on) can not use it.

You can, multiple styles installed which are user selectable AND also have vBulletin Options configured so that users can not change the style.

If you do have multiple styles and you do allow users to change them, you can either let them select what ever mobile styles you have installed, or try this mod which can hide a style form teh style selector: https://vborg.vbsupport.ru/showthread.php?t=183185

rasp187 10-16-2009 09:44 AM

I have 2 PC styles (a green and a blue one). Initially your mobile template was only working for admins because I was not allowing users the ability to select a template because we were working on the blue one still. We released the blue one today, and I opened that feature up. The minute I made the default template not forced on the users, it changed my default template on my PC to the mobile template so I was viewing my forums on my laptop through the mobile template.

Basically I'm not sure why it's not detecting it as a PC and then using the default template as the default template. I think it would be tedious for users to have to constantly change back to the default template when they get on their PC after viewing from a mobile device. Is there any reason why this would detect a PC as a mobile device and assign the mobile template?

Also note that if I make the mobile template selectable, once a user selects it, they are unable to switch back to a PC template unless I totally disable the template. So right now, on my forum, I have the mobile template enabled and selectable, and I cannot switch back to the PC template without having to disable the template itself.

dartho 10-16-2009 10:11 AM

Sounds like you had the mobile style as the default template, or some other configuration error.


All times are GMT. The time now is 04:59 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.01283 seconds
  • Memory Usage 1,751KB
  • 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
  • (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