Mobile version - automate for mobile devices

microdigital

Avatar: microdigital

2012-05-04 09:36

Do you consider making an automated script which serves automatically the mobile version of the website ?

I tried the following code:

<script type="text/javascript">
<!--
if (screen.width <= 699) {
document.location = "mobile.php";
}
//-->
</script>

but something is wrong: I changed screen resolution to 800x600 (and 'screen.width <= 699' to 'screen.width <= 850'), but the browser seems to be in a loop while trying to open mobile.php. On my phone works, but I get an error message saying that there are scripts not accepted.

Another aspect: is there any way to hide banners or adsense codes for displaying on mobile devices ?

Thanks in advance.

» Quick.Cms v4.x

http://www.stomatologie-bucuresti.info/

treewood (OpenSolution)

Avatar: treewood

2012-05-07 07:40

microdigital - Quick.Cms v4.1 have this automatic redirection for mobile devices. upgrade script to Quick.Cms v4.1

microdigital

Avatar: microdigital

2012-05-10 09:06

Thanks for your answer, but I don't see any redirecting script for mobile devices in the source code (I'm using 4.1 version of QuickCMS).
Anyway, I've tested the code above on several cellphones and it works pretty well.
Thanks again.

http://www.stomatologie-bucuresti.info/

microdigital

Avatar: microdigital

2012-05-10 10:06

You were right. I've noticed in database/config/general.php: $config['detect_mobile'] = true;
Thanks again.

http://www.stomatologie-bucuresti.info/

boboo

Avatar: boboo

2012-05-10 10:09

And what with the call: detectMobile() in index.php
and the function detectMobile() in plugins.php
???

qc-plugins.kimla.de

SchwenLarson

No avatar

2012-06-29 01:10

There are sites who give you a mobile plan and give you the redirect code, too. PM me and I will tell you where they are.



<a href="http://homebuildersolympia.com/">Olympia Home Builders</a>

Back to top
about us | contact