How to disable Slideshow for mobile
12 years 4 months ago #5594
by Sinkr0
How to disable Slideshow for mobile was created 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
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.
12 years 4 months ago #5596
by Sinkr0
Replied by Sinkr0 on topic How to disable Slideshow for mobile
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
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.
12 years 4 months ago #5597
by ced1870
Joomlack Webmaster and Developer
Replied by ced1870 on topic How to disable Slideshow for mobile
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
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