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 2017-08-16 15:44:45

Rainer Goergen
Member
From: Trier, Germany
Registered: 2016-05-01
Posts: 401
Website

Button Scroll To Top

If I enable phplugins and use the css code from Rod, the button is shown.

If I now klick on a thumb, the single image appears without the caption under the image.
If I disable phplugins, the caption is displayed again. How can I fix this?

Rainer

Offline

#2 2017-08-16 22:40:15

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

Re: Button Scroll To Top

it's working correctly for me.
Can you post an album that exhibits the problem?

And credit where credit is due, the original code is from Monte Trumbull, I merely added a small css contribution in this thread:
http://community.theturninggate.net/vie … hp?id=7894


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 2017-08-17 03:36:51

Rainer Goergen
Member
From: Trier, Germany
Registered: 2016-05-01
Posts: 401
Website

Re: Button Scroll To Top

You can use every album. I now enable phplugins, so you can see, that in fancybox slideshow the caption is not visible.

- done -

Rainer

Last edited by Rainer Goergen (2017-08-17 06:55:32)

Offline

#4 2017-08-17 06:58:37

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

Re: Button Scroll To Top

what hook are you using in phplugins to insert the scroll-to-top script? Should be ttg_scripts


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 2017-08-17 07:04:27

Rainer Goergen
Member
From: Trier, Germany
Registered: 2016-05-01
Posts: 401
Website

Re: Button Scroll To Top

<?php function ttg_scripts( $style, $path ) { 
    echo '
    <script src="http://www.phototheque.nicolaslogerot.fr/backlight/publisher/resource.php?template=26&extension=js&name=scripts"></script>
    <a href="#top" class="btn-scroll-to-top" title="Top of page" ><i class="fa fa-arrow-up fa-lg"></i></a>
<script>
    $(document).ready(function() {
        $(".btn-scroll-to-top").click(function() {
            $("html, body").animate({ scrollTop: 0 }, "slow");
            return false;
        });
        $(window).scroll(function() {
            if ($(this).scrollTop() > 200) {
                $(".btn-scroll-to-top").fadeIn();
            } else {
                $(".btn-scroll-to-top").fadeOut();
            }
        });
    });
    </script>
    ';
}
?>

Offline

#6 2017-08-17 07:32:05

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

Re: Button Scroll To Top

why are you adding jQuery in the ttg_scripts hook? This is not needed and may be the cause of the problem. Matt already has jQuery loading just above any scripts added with the ttg_scripts 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

#7 2017-08-17 07:54:24

Rainer Goergen
Member
From: Trier, Germany
Registered: 2016-05-01
Posts: 401
Website

Re: Button Scroll To Top

I have copied it from an other user.

R.

Offline

#8 2017-08-17 08:43:45

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

Re: Button Scroll To Top

it's not needed. In fact, it's more than likely causing the problem.
What you've included looks like the jQuery included with an earlier version of Backlight, and as such, since it's called after the included version, it's probably overriding the current included version.

If you compare the contents of the two files, the current one included with Backlight is nearly twice as large as the one you're including via the ttg_scripts hook.

So remove that code from your phplugins file.


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

Offline

#9 2017-08-17 15:30:17

Rainer Goergen
Member
From: Trier, Germany
Registered: 2016-05-01
Posts: 401
Website

Re: Button Scroll To Top

Don't know what you mean. I have no knowledge about php. I have only tested it with the button scroll to top and I was glad to see that it works. But if I disable this php file the button is gone.

Rainer

Offline

#10 2017-08-17 16:41:50

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

Re: Button Scroll To Top

This line :

    <script src="http://www.phototheque.nicolaslogerot.fr/backlight/publisher/resource.php?template=26&extension=js&name=scripts"></script>

Kill it.

Don't double-load scripts. Don't load your own copy of jQuery; we're already loading jQuery. You need to look at what the page is already doing before you start scripting on your own.


Matt

The Turning Gate, http://theturninggate.net

Offline

#11 2017-08-17 20:06:06

Rainer Goergen
Member
From: Trier, Germany
Registered: 2016-05-01
Posts: 401
Website

Re: Button Scroll To Top

Thank you, I did copy and paste without knowledge of programming.
Try and error. Did not notice that there is a script.

Rainer

Edit:

Killed - works!

Rainer

Last edited by Rainer Goergen (2017-08-17 20:09:35)

Offline

Board footer

Powered by FluxBB