vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Add-On Releases - Mobile Phone / iPhone / PDA Detection and Style Assignment (https://vborg.vbsupport.ru/showthread.php?t=226946)

dartho 05-09-2010 09:40 AM

Adding google as a custom user agent string is done via the "Custom User Agent String" section in AdminCP - I just added "google" You could add as many spiders as you want assuming they have unique usert-agent strings, but you'd have to do this manually

Some might suggest that the mobile style is more SEO friendly as it has little markup and lots of content - but I have no real knowledge in this area, and did not design it for such.

As for showing text in links - I assume you mean alt or title tags. I don;t know how google treats these, but it wouldn't take much to add them in to this style if one was keen.

Simon Lloyd 05-09-2010 10:36 AM

Quote:

Originally Posted by dartho (Post 2034058)
Adding google as a custom user agent string is done via the "Custom User Agent String" section in AdminCP - I just added "google" You could add as many spiders as you want assuming they have unique usert-agent strings, but you'd have to do this manually

Some might suggest that the mobile style is more SEO friendly as it has little markup and lots of content - but I have no real knowledge in this area, and did not design it for such.

As for showing text in links - I assume you mean alt or title tags. I don;t know how google treats these, but it wouldn't take much to add them in to this style if one was keen.

Thanks for that, and i will look at how to get the mod to reference the spiders.xml for the future.

I found the issue though, it was the header_includes template all that was there was the link to the wireless.css it was missing the site keywords and description, i added those, turned it back on and all is well in the search engines :)

Thanks for your time dartho!

AURFSCAN 05-24-2010 11:11 PM

seems to be working on 4.01 just nice....thx

madbatty1 06-02-2010 04:45 AM

Someone may know why the iPad is not handeled like the iPhone via this plugin?

or I better say ... how to get rid of that problem^^

AURFSCAN 06-27-2010 12:16 PM

Quote:

Originally Posted by madbatty1 (Post 2046893)
Someone may know why the iPad is not handeled like the iPhone via this plugin?

or I better say ... how to get rid of that problem^^


try adding the iPad to the list of user agents in the plugin (plugin manager)
- Edit: Plugin Detect Mobile Device and Assign Style

-Scroll down about half way, you'll see what I mean.

Code:

if ($vbulletin->options['mob_detect_enabled'] == 1)
  {
  $mobile=0;
  $pda=0;
  $ipod=0;
  $except_browser=0;
  $custom1=0;

  if ($vbulletin->options['brows_exceptions_enabled'] == 1)
  {
  $exceptbrowsers = explode(",",$vbulletin->options['brows_exceptions']);
  if(preg_match('/('.implode('|', $exceptbrowsers).')/i', $_SERVER['HTTP_USER_AGENT'], $match))
    {
        $except_browser=1;
    }
  }



  if ($except_browser==0)
  {
    if ($vbulletin->options['custom1_skin_enabled'] == 1)
    {
    $custom1agents = explode(",",$vbulletin->options['custom1_skin_agent']);
    if(preg_match('/('.implode('|', $custom1agents).')/i', $_SERVER['HTTP_USER_AGENT'], $match))
      {
          $custom1=1;
      }
    }

    if ($vbulletin->options['pda_skin_enabled'] == 1 && $custom1==0)
    {
      $pdabrowsers = array(
          "Windows CE"
          );
    if(preg_match('/('.implode('|', $pdabrowsers).')/i', $_SERVER['HTTP_USER_AGENT'], $match))
      {
        $pda=1;
      }
      else if (isset($_SERVER['HTTP_UA_OS']))
      {
      if (strstr($_SERVER['HTTP_UA_OS'],"POCKET PC") !== false)
        {
          $pda=1;
        }
      }
    }

    if ($vbulletin->options['ipod_skin_enabled'] == 1 && $custom1==0)
    {
      $ipodbrowsers = array(
          "iPod",
          "iPhone"
          );
      if(preg_match('/('.implode('|', $ipodbrowsers).')/i', $_SERVER['HTTP_USER_AGENT'], $match))
      {
        $ipod=1;
      }
    }


    if ($pda == 0 && $ipod ==0 && $custom1==0)
    {
      if ($vbulletin->options['mobile_skin_enabled'] == 1)
      {
      $mobilebrowsers = array(
        "WebTV",
        "AvantGo",
        "Blazer",
        "PalmOS",
        "lynx",
        "Go.Web",
        "Elaine",
        "ProxiNet",
        "ChaiFarer",
        "Digital Paths",
        "UP.Browser",
        "Mazingo",
        "iPhone",
        "iPod",
        "iPad",
        "Mobile",
        "T68",
        "Syncalot",
        "Danger",
        "Symbian",
        "Symbian OS",
        "SymbianOS",
        "Maemo",
        "Nokia",
        "Xiino",
        "AU-MIC",
        "EPOC",
        "Wireless",
        "Handheld",
        "Smartphone",
        "SAMSUNG",
        "J2ME",
        "MIDP",
        "MIDP-2.0",
        "320x240",
        "240x320",
        "Blackberry8700",
        "Blackberry",
        "Opera Mini",
        "NetFront",
        "BlackBerry",
        "Minimo",
        "Android",
        "Droid ",
        "MSIEMobile",
        "IEMobile",
        "PSP"

        );
 
        if(preg_match('/('.implode('|', $mobilebrowsers).')/i', $_SERVER['HTTP_USER_AGENT'], $match))
        {
          $mobile=1;
        }
        elseif (strpos($_SERVER['HTTP_ACCEPT'], 'application/vnd.wap.xhtml+xml'))
        {
          $mobile=1;
        }
        elseif (strpos($_SERVER['HTTP_ACCEPT'], 'text/vnd.wap.wml'))
        {
          $mobile=1;
        }
      }
    }
  }



  if ($mobile==1)
  {
    //      echo "<!-- Mobile Device -->";
    $styleid=$vbulletin->options['mobile_skin'];
  }
  else if ($pda==1)
  {
    //      echo "<!-- PDA Device -->";
    $styleid=$vbulletin->options['pda_skin'];
  }
  else if ($ipod==1)
  {
    //      echo "<!-- IPOD Device -->";
    $styleid=$vbulletin->options['ipod_skin'];
  }
  else if ($custom1==1)
  {
    //      echo "<!-- CUSTOM1 Device -->";
    $styleid=$vbulletin->options['custom1_skin'];
  }
  else if ($except_browser==1)
  {
    //      echo "<!-- Excepted Device -->";
  }
 
  else
  {
    //      echo "<!-- No Mobile Device-->";
  }
}


:)

dartho 06-28-2010 01:31 AM

That would detect as a mobile, but not as an iPhone type device. I would have thought people would want the iPad as an exception so it gets the full style? - but to be treated like iphones etc, you should change the following in the plugin.

from
Code:

      $ipodbrowsers = array(
          "iPod",
          "iPhone"
          );

to

Code:

      $ipodbrowsers = array(
          "iPod",
          "iPad",
          "iPhone"
          );


Megatr0n 06-28-2010 07:11 PM

Quote:

Originally Posted by dartho (Post 2060809)
That would detect as a mobile, but not as an iPhone type device. I would have thought people would want the iPad as an exception so it gets the full style? - but to be treated like iphones etc, you should change the following in the plugin.

from
Code:

      $ipodbrowsers = array(
          "iPod",
          "iPhone"
          );

to

Code:

      $ipodbrowsers = array(
          "iPod",
          "iPad",
          "iPhone"
          );


dartho, what code changes are there between this and the 3.7 version even if it's small?

dartho 06-28-2010 09:45 PM

just a version number if my memory serves me right?

AURFSCAN 06-30-2010 06:56 AM

thx for clearing up the ipad thing dartho

AURFSCAN 07-01-2010 12:58 AM

I have a question dartho. How do I make it that guests see the mobile skin. ATM if your not logged in and view the forum via mobile you see it as full view. Log in you get mobile view.

How to enable forcing of mobile skin to guests viewing via mobile?

thx


All times are GMT. The time now is 12:46 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.01270 seconds
  • Memory Usage 1,765KB
  • 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
  • (5)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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