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)

zane99 11-02-2008 02:55 PM

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

dartho 11-02-2008 07:45 PM

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?

wma 11-03-2008 08:57 PM

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

dartho 11-03-2008 09:59 PM

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.

dartho 11-03-2008 10:05 PM

Quote:

Originally Posted by trigatch4 (Post 1656045)
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.

Quarterbore 11-03-2008 11:44 PM

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

dartho 11-04-2008 02:59 AM

Good stuff, QB :up:

fredang85 11-06-2008 03:54 PM

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

Thanks.

gamerfu 11-13-2008 06:29 AM

PSP is not detected. PSP drop-down menu will not auto-refresh when choosen "Mobile" style.

dartho 11-13-2008 07:31 AM

PSPs should be detected - what is the user agent string of the device?


All times are GMT. The time now is 01:47 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.01186 seconds
  • Memory Usage 1,747KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)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