How to disable Slideshow for mobile

More
12 years 4 months ago #5594 by Sinkr0
Hi guys,

Firstly, thanks for the great module, it's the best Joomla Slideshow i've come across.

I'm supporting widescreen, so have 1440px x 450px slides. Hence i'm finding the slideshow is too heavy for mobile phones, as slides are just scaled down. I guess ideally in the future you'd build in some on the fly image resizing (too server intensive?), or have a subset of slides for mobile, tablet/desktop, and widescreen.

For now i'd like to set a break point of 600px browser width, under which the slideshow is not loaded. This should rule out most older phones, and leave it enabled for newer phones. CSS display: none works but still loads the approx 500k of images.

Would a simple if statement somewhere in the camera.js would achieve this? Any help would be great. Sorry i'm not much of a js coder.

Kind regards,
Matt

Please Log in or Create an account to join the conversation.

More
12 years 4 months ago #5596 by Sinkr0
Think i've found a solid workaround.

Using the PHP mobile_detect class ( code.google.com/p/php-mobile-detect/ ) in my index.php to turn my module position off in the case of mobile phone detection.

Thanks Ced keep up the good work,
Matt

Please Log in or Create an account to join the conversation.

More
12 years 4 months ago #5597 by ced1870
Hi
yes you can use the php user agent as described here
6.Bonus 2 - Detection of User-Agent for the Slideshow 47

www.joomlack.fr/en/joomla-documentations...e-joomla-for-mobiles

CEd

Joomlack Webmaster and Developer

Please Log in or Create an account to join the conversation.

Time to create page: 0.202 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 639 guests and one member online