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.
You are not logged in.
Pages: 1
What setting do I need to change to retain the masonry grid when viewed with an iPad? (rather than the mobile grid)
Offline
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
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
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
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
iPads can handle it, I've been running my CE3 site that way for a while, iPad 2s handle it fine
Offline
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
Pages: 1