Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: How to disable Slideshow for mobile

How to disable Slideshow for mobile 18 Sep 2012 05:36 #5594

  • Sinkr0
  • Sinkr0's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
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.

How to disable Slideshow for mobile 18 Sep 2012 06:12 #5596

  • Sinkr0
  • Sinkr0's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
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.

How to disable Slideshow for mobile 18 Sep 2012 06:16 #5597

  • ced1870
  • ced1870's Avatar
  • Offline
  • Administrateur
  • Administrateur
  • Posts: 21335
  • Karma: 427
  • Thank you received: 2697
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

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

Joomlack Webmaster and Developer
  • Page:
  • 1
Time to create page: 0.206 seconds

Fast and powerful creation, customizable and responsive.

Read More

Qui est en ligne

We have 449 guests and no members online