PDA

View Full Version : Redirect Mobile Devices Away From CMS?


MikeWarner
01-02-2011, 05:25 PM
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
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:

<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 1436516878 at 1436516878 ---------------

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

<script type="text/javascript">
function RedirectSmartphone(url){
if (url && url.length > 0 && 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 (http://stackoverflow.com/a/14457339/1176276)