Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2014-09-04 03:41:35

evan
Member
From: Chicago
Registered: 2013-10-06
Posts: 55
Website

Different Galleria configurations for standard v mobile

Is there any way to have separate galleria configurations for desktop v mobile.  In Pages there was no direct way but I could modify the mobile php to the correct configuration so the home page renders correctly.  Specifically the height:ratio and imageCrop tags.  But that is not an option for Stage.

Offline

#2 2014-09-05 06:05:00

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Different Galleria configurations for standard v mobile

there's nothing in the plugin for that. And Stage doesn't output a mobile.php file. So I guess the answer would be no.
Unless the changes you made were to css, then you use media queries in custom css.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#3 2014-09-06 16:53:12

evan
Member
From: Chicago
Registered: 2013-10-06
Posts: 55
Website

Re: Different Galleria configurations for standard v mobile

When using a Galleria Slideshow in Stage CE3 broke down much nicer on mobile.  The switch to a simple gallery presention worked better at mobile screen dimensions.  Trying to figure out how to shoehorn a gallery presentation into the mobile place.  Cant seem to figure it out yet though.

Offline

#4 2014-09-13 07:32:02

evan
Member
From: Chicago
Registered: 2013-10-06
Posts: 55
Website

Re: Different Galleria configurations for standard v mobile

So I got my hands dirty and edited the template_index.php file in my publisher driven galleria slideshows.

Where the php makes the call to run galleria i added some variables that I set to the standard then an if statement that checks for the screen width and sets the variables I want changed for mobile, then call those variables in the Galleria.configure.  This gave the the ability to have different setups for galleria and optimize for mobile.  The differences are subtle but make a difference.  And i couldn't figure out how to get this into css or a phplugin.  Not elegant and has its downfalls, but it works.

$GalleriaHeight  = .453125;
$GalleriaimageCrop = "height";

if (screen.width < 768 || navigator.userAgent.match(/Android|Blackberry|SymbianOS|iPhone|iPod|iPad/i)){ 
    $GalleriaHeight = 0.66;
    $GalleriaimageCrop = "landscape";
}
        
Galleria.loadTheme("<?php echo TTG_SITE; ?>lib/galleria/galleria.ce4.min.js");
Galleria.run("#galleria");
Galleria.configure({
    
    autoplay: 3000, 
    clicknext: true, 
    fullscreenCrop: false, 
    height: $GalleriaHeight, 
    imageCrop: $GalleriaimageCrop, 
    imagePan: false, 
    initialTransition: "fade", 
    maxScaleRatio: 1, 
    pauseOnInteraction: true, 
    showCounter: true, 
    showImagenav: true, 
    showInfo: false, 
    thumbnails: false, 
    touchTransition: "fadeslide", 
    transition: "fade", 
    transitionSpeed: 400,
    _showFullscreen: true,
    _showPlay: true
});

Last edited by evan (2014-09-13 10:16:30)

Offline

#5 2014-09-14 21:59:27

Pfredd
Member
Registered: 2014-04-16
Posts: 189

Re: Different Galleria configurations for standard v mobile

You might want to add IEMobile to your list so that it works on Windows Phones.

Offline

#6 2014-09-16 23:32:40

evan
Member
From: Chicago
Registered: 2013-10-06
Posts: 55
Website

Re: Different Galleria configurations for standard v mobile

Good catch that.  Thank you.  Any others I missed.  I did steal the screen width thing from somewhere else in the script maybe I should add it there too.

Offline

Board footer

Powered by FluxBB