vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Redirect Mobile Devices Away From CMS? (https://vborg.vbsupport.ru/showthread.php?t=256362)

MikeWarner 01-02-2011 05:25 PM

Redirect Mobile Devices Away From CMS?
 
I have a mobile style and detection that auto selects the mobile style for mobile devices, however the vBulletin CMS is not compatible with the mobile style.

Is there a way for the mobile users to be auto redirected away from any CMS page and onto the Forums?

Many thanks.

naveeid 06-01-2015 10:30 AM

no replies??? i am also looking for answer.......any one can help???

SaN-DeeP 06-01-2015 07:26 PM

Quote:

I have a mobile style and detection that auto selects the mobile style for mobile devices, however the vBulletin CMS is not compatible with the mobile style.
Can anyone thorough on this topic please reply possibly ?
+1 to OP..

Kwikms 07-10-2015 04:41 AM

This could help https://vborg.vbsupport.ru/showthread.php?t=292704

fxdigi-cash 07-10-2015 06:19 AM

possibly there are many ways how to do that. one option is you need to add some javascript to you web page to detect the screen width like this:

HTML Code:

<script type="text/javascript">

  if (screen.width <= 800) {
    window.location = "http://mydomain.com";
  }
 
</script>

another option is to use some rewrite rules if you are on Apache server, you can search on that over the net. I think you can find it easily.

check that out and leave feedback to us! :up:

--------------- Added [DATE]1436516878[/DATE] at [TIME]1436516878[/TIME] ---------------

by the way, just a quick search at SOF and found this great solution:

PHP Code:

<script type="text/javascript">
function 
RedirectSmartphone(url){
    if (
url && url.length && IsSmartphone())
    
window.location url;
}
function 
IsSmartphone(){
    if (
DetectUagent("android")) return true;
    else if (
DetectUagent("blackberry")) return true;
    else if (
DetectUagent("iphone")) return true;
    else if (
DetectUagent("opera")) return true;
    else if (
DetectUagent("palm")) return true;
    else if (
DetectUagent("windows")) return true;
    else if (
DetectUagent("generic")) return true;
    else if (
DetectUagent("ipad")) return true;
    else if (
DetectUagent("ipod")) return true;
    return 
false;
}
function 
DetectUagent(name){
    var 
uagent navigator.userAgent.toLowerCase();
    if (
uagent.search(name) > -1)
    return 
true;
    else
    return 
false;
}
RedirectSmartphone("http://mobile.version.com");
</
script

this is a complete solution for any type of smartphone

source: Javascript code to redirect mobile phone users


All times are GMT. The time now is 02:56 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.01628 seconds
  • Memory Usage 1,731KB
  • 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_html_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete