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-10-09 10:18:25

evan
Member
From: Chicago
Registered: 2013-10-06
Posts: 55
Website

hook auto index gallery on the main page

I have been trying to add the gallery auto index onto the main page as well for a better mobile homepage (more like Daniel Lue http://danielleu.com/.) I have to hook working just fine and I copied the code in the galleries.php. The result finds the galleries but doesnt correctly display.  see the bottom of http://ce4.studiothomas.org/.


here is the relevant phplugins.php  Any help would be greatly appreciated.

elseif (G_SLUG == 'pages-gallery') {
        echo '
<div id="gallery-index" class="gallery-index iconic container_12 step_down clearfix">
        ';
    define('BASE_DIR', './galleries/');
    if (!defined('BASE_DIR'))
        define('BASE_DIR', '');
    include './lib/autoindex/autoindex-view.php';
        echo '
</div><!-- #gallery-index -->
        ';
        return false; // Places Gallery index at the bottom of the home page
    }

Offline

#2 2015-10-09 11:09:20

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

Re: hook auto index gallery on the main page

You're probably going to have to put in the html markup that supports displaying the gallery index too.

You can take a look at the source code on Daniels home page or, better yet, just ask him how he did it.


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-10-09 23:00:38

evan
Member
From: Chicago
Registered: 2013-10-06
Posts: 55
Website

Re: hook auto index gallery on the main page

Funny thing is when you look at the page source it shows exactly what the galleries page shows as well.  the code is creating everything it needs, creating the album link, getting the thumbnail, setting up the style.  And then nothing but the album title shows. cant figure it out.  will send Daniel a message as well.

Offline

#4 2015-10-09 23:10:02

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

Re: hook auto index gallery on the main page

Funny thing is when you look at the page source it shows exactly what the galleries page shows as well.  the code is creating everything it needs, creating the album link, getting the thumbnail, setting up the style.

That didn't just show up on its own. I believe Daniel used phplugins to target that page and add the necessary html markup.

He might even have a blog post about how he did it. I know he's done a few TTG customization blog posts.


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-10-10 00:47:02

evan
Member
From: Chicago
Registered: 2013-10-06
Posts: 55
Website

Re: hook auto index gallery on the main page

I dont quite get what you are saying. the html markup is fully created by autoindex-view.php.  it is completely there on the page when you view the generated source code.  and if I can grab the html markup that is created on the galleries page and copy it into the phplugins, the result is the same.  the only thing to display is the gallery names with no link and no images.  the fact that it finds the galleries at all means it is at least starting to work.  I just cant seem to get it to post the image and display as a link.

Offline

#6 2015-10-10 00:50:00

evan
Member
From: Chicago
Registered: 2013-10-06
Posts: 55
Website

Re: hook auto index gallery on the main page

eureka!   The problem was with the style-component.css.  in the galleries.php it is

<link rel="stylesheet" type="text/css" media="all" href="./lib/css/style-component.css" />

In every other page it is

<link rel="stylesheet" type="text/css" media="all" href="<?php echo $resources_url; ?>/css/style-component.css" />

I added the first into the phplugins.php just after my hook and voila!  there it is!

Offline

#7 2015-10-10 01:39:19

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

Re: hook auto index gallery on the main page

ah, you're right about the index. Daniel added a whole new div to hold the index in the block.


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

Offline

#8 2015-10-10 05:44:08

evan
Member
From: Chicago
Registered: 2013-10-06
Posts: 55
Website

Re: hook auto index gallery on the main page

css gets me everytime...  getting this figured out now.  I'll do a bit more formal workup of what I did to get it working.  Had to create a new id:"fav-index" and then label the css with that id.  tricky.  also had to edit the autoindex-layout file to get the grid setup I wanted (grid_2) now to figure out how to make it step down better to grid_2/grid_4/grid_6/grid_12 rather than the current grid_2/grid_6/grid_12 (its just too big of a jump) see http://ce4.studiothomas.org/

Offline

#9 2015-10-10 06:47:16

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

Re: hook auto index gallery on the main page

looks like just a matter of adding a media query and tweaking the others.


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