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.

#26 2017-02-07 19:16:55

Mediahype
Member
Registered: 2017-01-18
Posts: 42

Re: "Return to Gallery" Button action in shopping cart

Heh no need to apologise I appreciate all the hlp your giving me.  This is also not working though with the same error.  Is there anywhere specific in the php file that it needs to go.  I have tried inserting it after the input type's and also into <section id = "content 4"> area

Cheers

Offline

#27 2017-02-07 19:35:48

Mediahype
Member
Registered: 2017-01-18
Posts: 42

Re: "Return to Gallery" Button action in shopping cart

If I insert it between the opening and the function ttg_gallery_bottom it doesn't error but doesn't change the slideshow height either.

  <section id="content4">
        <!-- opening the gallery tab -->

    ';
    return true;
} // END


function ttg_scripts( $style, $path ) {
    echo '
    <script>
        $(\'input:radio[id="tab4"]\').change(function(){
            if(this.checked) {
                vegasAspectRatio();
            }
        });
    </script>
    ';
} // END


function ttg_gallery_bottom( $style, $path ) {
    echo '

        <!-- closing the gallery tab -->
  </section>

Offline

#28 2017-02-07 22:17:58

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: "Return to Gallery" Button action in shopping cart

I would put the ttg_scripts function last, but it doesn't actually matter. I clicked on your page link, but it's a 404 error.


Matt

The Turning Gate, http://theturninggate.net

Offline

#29 2017-02-07 22:39:18

Mediahype
Member
Registered: 2017-01-18
Posts: 42

Re: "Return to Gallery" Button action in shopping cart

Sorry Matthew,

The page link has changed, my bad I should have posted the new link. 

https://www.overthetopimagery.com.au/Sok

I've moved the script to the end and it seems to be working now.

Really great for all you help on this, darn awesome!  And thanks to Ben and Rod for the earlier assistance.

Wicked stuff!

Cheers

Last edited by Mediahype (2017-02-07 23:00:01)

Offline

#30 2017-02-07 23:01:01

Mediahype
Member
Registered: 2017-01-18
Posts: 42

Re: "Return to Gallery" Button action in shopping cart

Maybe I was premature in celebrating....it works intermittanly it would appear

Offline

#31 2017-02-07 23:23:58

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: "Return to Gallery" Button action in shopping cart

I see what's happening. The aspect ratio function is in an isolated scope, so we're not able to call it. We'll have to strong arm it then.

function ttg_scripts( $style, $path ) { 
    echo '
    <script>
        $(\'input:radio[id="tab4"]\').change(function(){
            if(this.checked) {
              var galleryWidth = $(\'.gallery\').width();
              var galleryAspectRatio = 0.5625;
              $(\'.gallery\').css(\'height\', galleryWidth * galleryAspectRatio );
            }
        });
    </script>
    ';
} // END

Matt

The Turning Gate, http://theturninggate.net

Offline

#32 2017-02-08 17:46:58

Mediahype
Member
Registered: 2017-01-18
Posts: 42

Re: "Return to Gallery" Button action in shopping cart

That's done the trick!  Once again thanks Matthew, This is awesome!! 

I have a thin white line to the right and bottom of the images which I'll have to find why through the styling or slideshow template.

But this is the layout I envisaged so it's really great to get this working!!!  I'm much happier without the iFrames, pym.js.

This is also great as it maintains the ability to publish the slideshow direct from Lightroom!

If you wish to see the result, I've renamed the page back to what it was originally;

https://www.overthetopimagery.com.au/Sokar

Thanks again, You Rock!

Offline

#33 2017-02-08 18:02:59

Mediahype
Member
Registered: 2017-01-18
Posts: 42

Re: "Return to Gallery" Button action in shopping cart

Just a thought Matthew,  Could these tabs be used to insert multiple contact foms?  So instead of a gallery insert a contact form?

I have 2 types of enquries with different contact forms.  I was just wondering if I could setup a page with 2 tabs on it with 1 contact form under each tab?

Cheers

Offline

#34 2017-02-08 22:05:45

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: "Return to Gallery" Button action in shopping cart

Glad that's working.

You can put pretty much whatever you like into a tab, though probably not using Backlight's embedded form feature. You'd have to code your own form.

The white lines around the image I think are a sub-pixel artifact from scaling the image. When the math gives you an impossible dimension, such as a height of 640.7-pixels, this is sometimes what you end up with, because a display cannot render 0.7 pixels. Maybe edit the Javascript function to round up to the nearest whole pixel?


Matt

The Turning Gate, http://theturninggate.net

Offline

Board footer

Powered by FluxBB