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 2019-02-27 01:30:16

mad
Member
From: Arkansas
Registered: 2014-01-03
Posts: 154
Website

Adding a button to the images on an album

I am looking to add a specific button to each image on an album (not a cart). I know there is a write-in button but it is for add-to-cart, I want to be able to add my own button to each image on the gallery grid.  Is there a way to do this?  BTW, I know how to create the button and add it to an image but have not done so using the backlight album img grid. Any suggestions or has someone done this already?

Offline

#2 2019-02-27 01:57:07

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

Re: Adding a button to the images on an album

one idea comes to mind. Create an album template that used the colored label grid icon. Maybe make it a Cart enable album as well.
Use the inspector to see where those elements are added.
Use jQuery to insert your own buttons into the the ul or whatever is adding those grid icons.
If you don't want the buttons to show up on the smaller thumbnails necessary for mobile us, write a css media query to hide the buttons.

this might work if all the buttons have the same code. If not....I don't know. You'd probably have to write code that interrogates the database since I believe that's where the individual image info comes from.


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 2019-02-27 02:17:21

mad
Member
From: Arkansas
Registered: 2014-01-03
Posts: 154
Website

Re: Adding a button to the images on an album

Yeah, I had the same idea but since each button code is unique to the image it would be difficult to do. BTW, I do know where the elements are added. Another idea I had was to use the Theater Blank Page and do my own thing - not my preference.

Also, if I knew the functions that Ben uses to interrogate the database I would use that.  I may have to hunt and peck through the code to find them though.  I try not to reinvent the wheel if someone already has. lol!!!

I just had another idea, I could use an iFrame and build my own HTML image Page Container and thus have control of adding the buttons to the images. 

Unless Ben or Matt have any better ideas!!!!

Last edited by mad (2019-02-27 02:27:40)

Offline

#4 2019-02-27 02:42:50

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

Re: Adding a button to the images on an album

Have you seen that Theater has the Pym embedded i-frame feature?
http://backlight.theturninggate.net/doc … tation_pym


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 2019-02-27 02:46:02

mad
Member
From: Arkansas
Registered: 2014-01-03
Posts: 154
Website

Re: Adding a button to the images on an album

Yes, I use it on my Client sub-domain already. I think I may go in this direction.

Last edited by mad (2019-02-27 02:46:31)

Offline

#6 2019-02-27 03:13:24

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 1,624
Website

Re: Adding a button to the images on an album

Have a look at the album_top example in the phplugins sample file. You might need to download the installer again to get the latest version.

This shows you how you can replace the entire grid. Now you can write your own code to create the grid and add your custom button wherever you want to have it. I would assume that your code would be based on the current implementation in order to leverage the existing css and full page view.


Daniel Leu | Photography   
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com

Offline

#7 2019-02-27 04:07:34

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

Re: Adding a button to the images on an album

Daniel Leu wrote:

Have a look at the album_top example in the phplugins sample file. You might need to download the installer again to get the latest version.

This shows you how you can replace the entire grid. Now you can write your own code to create the grid and add your custom button wherever you want to have it. I would assume that your code would be based on the current implementation in order to leverage the existing css and full page view.

I'd forgotten about that. How cool.


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 2019-02-27 07:18:18

mad
Member
From: Arkansas
Registered: 2014-01-03
Posts: 154
Website

Re: Adding a button to the images on an album

Thanks Daniel good to know that I can do that.

Offline

#9 2019-03-11 00:12:57

mad
Member
From: Arkansas
Registered: 2014-01-03
Posts: 154
Website

Re: Adding a button to the images on an album

Daniel I want to thank you for your suggestion, I implemented the album_top plugin function of course with much different coding but I figured out that I did not need a button over the image at all; I just modified the behavior of the image itself to be the button and pass on the information I needed it to have so it could load the next cart album correctly.  I now have all my albums going through this function in my plug-in. So, Daniel I want to thank you for pointing me into the right direction.

Here is a link to how my albums are functioning if you would like to check it out: https://kp.keylightphotography.us/galle … lryprdcrt/      You can click on any image and it will build the images for the cart based on which product you selected.  It is Context-Sensitive Albums now with everything else that I have done on my site dynamically.

Thanks again Daniel much appreciated.

Offline

#10 2019-05-13 23:25:50

Nico3939
Member
From: France
Registered: 2016-10-05
Posts: 235
Website

Re: Adding a button to the images on an album

Whao! Mad, how do you have implemented your "i" button on the album thumbnails?
Really nice to have a popup displaying metadata.

Nico

Offline

Board footer

Powered by FluxBB