How to disable Slideshow for mobile

How to disable Slideshow for mobile was created by Sinkr0

Posted 11 years 6 months ago #5594
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
by Sinkr0

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

Replied by Sinkr0 on topic How to disable Slideshow for mobile

Posted 11 years 6 months ago #5596
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
by Sinkr0

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

Replied by ced1870 on topic How to disable Slideshow for mobile

Posted 11 years 6 months ago #5597
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

by ced1870

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

Time to create page: 0.908 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 829 guests and no members online