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 2018-07-05 08:18:50

grover_c
Member
Registered: 2016-12-10
Posts: 117

Galleria question

Hi All,

I've got an odd one here.  On my pre-Pangolin site, I used Galleria on my homepage with a specific call to the javascript in the header section of my custom php.  Since then I've updated to Pangolin and added the Galleria addon package so I can easily use my albums for a homepage Galleria slideshow.  It's currently working but I realized that I still had that old code in my custom PHP file.  The strange thing is that when I remove the code the Galleria addon doesn't work anymore. 

Here is the custom php code I'm using.  If I remove either line it no longer works.  I'm also thinking that this may be why Galleria is behaving a bit odd on some of my mobile devices.

function ttg_head( $style, $path ) {
    echo '
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
    <script type="text/javascript" src="/galleria/galleria-1.2.9.min.js"></script>
    ';
    return true;
}


My website is at www.bretculp.com

Am I missing something obvious?  Any insights will be greatly appreciated.


Thanks,
bret

Offline

#2 2018-07-05 09:27:38

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

Re: Galleria question

first, Backlight already calls jQuery so you shouldn't be calling it again.
And you also shouldn't need to be loading galleria since Backlight already has that. Also, you're loading an earlier version of Galleria. The version Backlight uses is 1.5.7 and you're loading 1.2.9

If you're using the Backlight Galleria module, you shouldn't need to use those scripts.

Can you post a page that's has an embeddedBackligth Galleria album that is not using the code you've inserted?


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 2018-07-05 10:15:07

grover_c
Member
Registered: 2016-12-10
Posts: 117

Re: Galleria question

Yes, those are all exactly my points, Rod. 

Here is a link to a test galleria page without my added JQuery or the Galleria php call.  http://www.bretculp.com/gallery/tg/

Last edited by grover_c (2018-07-05 10:15:17)

Offline

#4 2018-07-05 10:32:13

grover_c
Member
Registered: 2016-12-10
Posts: 117

Re: Galleria question

The problem seems to be in the page copy I've added.  When I remove the page copy it works without the calls.

The following seems to be the offending part of the page copy, specifically the Table.  I know it's a bit old school but it has been a long migration and is due for an update.  Any idea why this would prevent the Galleria addon form running?


<div id="bottom_wrapper_homepage">
        <div id="bot_homepage">
          <div id="at">
            <div id="AddThisHome">
              <!-- AddThis Pro BEGIN -->
              <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=grover_c" defer>
</script> <!-- AddThis Pro END -->
               <!-- Go to www.addthis.com/dashboard to customize your tools -->

              <div class="addthis_sharing_toolbox"></div>
            </div>
          </div>

          <div id="social_homepage">
            <table width="100%" border="0" cellspacing="0" cellpadding="0" align="right">
              <tr>
                <td>
                  <div id="twitter_homepage">
                    <a href="http://twitter.com/BretCulp" target="_blank" title="Follow Bret on Twitter"></a>
                  </div>
                </td>

                <td>
                  <div id="facebook_homepage">
                    <a href="http://www.facebook.com/bretculp" target="_blank" title="Visit Bret on Facebook"></a>
                  </div>
                </td>

                <td>
                  <div id="googleplus_homepage">
                    <a rel="author" href="https://plus.google.com/u/0/101206045897690890411?rel=author" target="_blank" title="Bret on Google+"></a>
                  </div>
                </td>
              </tr>
            </table>
          </div>
        </div>
      </div>

Last edited by grover_c (2018-07-05 10:34:15)

Offline

#5 2018-07-05 10:43:06

grover_c
Member
Registered: 2016-12-10
Posts: 117

Re: Galleria question

I removed the table and all seems to be well now.  I still find it weird that a table would prevent Galleria form working.

Last edited by grover_c (2018-07-05 10:43:58)

Offline

#6 2018-07-05 10:47:49

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

Re: Galleria question

Off the top of my head, no. But this is a relatively senseless use of a table. And if the table is giving you grief, then we can easily do without it. Try this instead:

<div id="bottom_wrapper_homepage">
  <div id="bot_homepage">

    <div id="at">
      <div id="AddThisHome">
        <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=grover_c" defer></script>
        <div class="addthis_sharing_toolbox"></div>
      </div>
    </div>

    <div id="social_homepage">
      <ul>
        <li id="twitter_homepage"><a href="http://twitter.com/BretCulp" target="_blank" title="Follow Bret on Twitter"></a></li>
        <li id="facebook_homepage"><a href="http://www.facebook.com/bretculp" target="_blank" title="Visit Bret on Facebook"></a></li>
        <li id="googleplus_homepage"><a rel="author" href="https://plus.google.com/u/0/101206045897690890411?rel=author" target="_blank" title="Bret on Google+"></a></li>
      </ul>
    </div>

  </div>
</div>

So long as the JavaScript you're loading doesn't hinge on the table elements, should be fine. You will probably need to add some CSS to get the list layout as you like, but that's a relatively simple task.

Also, everything Rod says above about loading jQuery and Galleria scripts absolutely applies.


Matt

The Turning Gate, http://theturninggate.net

Offline

#7 2018-07-05 10:50:38

grover_c
Member
Registered: 2016-12-10
Posts: 117

Re: Galleria question

Already done.  Thanks.

Offline

Board footer

Powered by FluxBB