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 2015-03-07 03:34:06

scottfrey
Member
Registered: 2013-10-12
Posts: 122

Masonry, Elastic

What setting do I need to change to retain the masonry grid when viewed with an iPad? (rather than the mobile grid)

Offline

#2 2015-03-07 04:53:19

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

Re: Masonry, Elastic

masonry is not sent to mobile devices, they will always use the standard layout
http://ce4.theturninggate.net/docs/doku … e_freewall


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 2015-03-07 05:10:45

scottfrey
Member
Registered: 2013-10-12
Posts: 122

Re: Masonry, Elastic

That's kinda my point, iPads should not be treated as mobile devices (IMHO). How do I exclude iPads from getting redirected to mobile.php? (even at the expense of the new, nicely done mobile menu if nessessary). Something triggers the redirect. It's not width (though that would be nice)

Offline

#4 2015-03-07 06:17:53

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

Re: Masonry, Elastic

Something triggers the redirect.

There's this code in the head tag:

<script>
    if (screen.width < 768 || navigator.userAgent.match(/Android|Blackberry|SymbianOS|iPhone|iPod|iPad/i)){
        window.location.replace('mobile.php'); }
    </script>

which basically says that if the screen width is less than 768 px OR the device is one of those listed, then feed the mobile page.

I know that Masonry relies on Javascript, which can tax resources (this is why you see huge galleries that use Masonry take a long time to load). Perhaps this is why the standard gallery is fed to mobile devices: because of limited memory or other resources.


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

Offline

#5 2015-03-07 08:25:55

scottfrey
Member
Registered: 2013-10-12
Posts: 122

Re: Masonry, Elastic

Thanks! That was it.

Now, is there a way I can make a plugins.php change that will override that (else I have to edit the code with each update)

I know that Masonry relies on Javascript, which can tax resources (this is why you see huge galleries that use Masonry take a long time to load). Perhaps this is why the standard gallery is fed to mobile devices: because of limited memory or other resources.

That and Matt believes iPads should be mobile devices (we've had that discussion before). I disagree on this point (and the mobile menu now solves most of his very valid objections). I get very offended when my iPad is trapped in a mobile site, that is probably a character flaw on my part wink

iPads can handle it, I've been running my CE3 site that way for a while, iPad 2s handle it fine

Offline

#6 2015-03-07 08:38:31

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

Re: Masonry, Elastic

Now, is there a way I can make a plugins.php change that will override that

I don't think that scripts coming later in the document will override an early script like later css overrides earlier css. Otherwise you could try placing the modified script in the ttg_head_end hook.


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

Offline

Board footer

Powered by FluxBB