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-03-20 07:31:56

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

How to Set an Album in plugins

I have a Page that I am loading by calling my version of album_top in plugins by using the $this-->dispatch('album_top') and it is working correctly.  However, when I remove the Page include Album the Album is no longer set and the $this-> pointers no longer exists since there is no album.  So right now I have two different versions of the album loading one that is mine and the other is backlight which is loading after mine.  How can I set the album from a page directly so that I can call $this-->dispatch('album_top') and not get a duplicate album being loaded by backlight [meaning not to include it from backlight->designer->album]; how to supress.

I do not see any functions in ABHPlugins class to set the album specific to my needs.

Any suggestions?

Offline

#2 2019-03-20 11:02:09

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

Re: How to Set an Album in plugins

Might be that I'm tired, but I'm not quite following this. What's going on on the page/album without PHPlugins, and then what does the PHPlugins function look like?


Matt

The Turning Gate, http://theturninggate.net

Offline

#3 2019-03-20 22:02:36

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

Re: How to Set an Album in plugins

Let me explain:  I have a album_top function which is my own flavor of how I want and plan on displaying photos in an album; as I have plans to do things with the photos that backlight does not support.  Basically, I am enhancing how and when I want photos to display.  Doing this requires that I also taking control of the Page and showing the album the way I want.  So, under designer in backlight I have the Page that is being called and it includes the Album; however this is not the default behavior I want; I want the Page using the Base Page Template I set up but then I can modify the page by including the album using the dispatch('album_top') function when the page is called to display the way I want the photos within the album to display.  I do have future plans to add some things to the photos specific to the individual photos; therefore, I need control of the individual photos of the album.  I already do this partially with the Shop Galleries on my site; just looking for more control.

However, the Page with the include to the album is not what I want displayed.  I just want the page and I then want to construct/include my own code for the album to display.  However, as soon as I remove the include from the Designer->Page for the album.  I have no way to construct the album so I can call the dispatch->('album_top') to run through the code I developed for the purposes I want to do.  I need a way to call a class constructor for the album before I call the dispatch->('album_top').  Obviously, there is a way to do this as the Designer->Page include Album is already doing this but I do not see where it is constructing this include; I do not want this include to happen; I want to construct my own include and then process through my own code.  I just need to bypass the Designer->Page Album include.  I have this working but as I said it shows my album and then the Backlight Designer-Page Album include.

One Possible way around this problem is that I could include a dummy Gallery Album with no photos as the include on the Page but to me that is just inefficient but it will work as it will only show what I want it to show.  I would prefer how to include my own Album to the Page rather than directly through backlight designer->page which limits what I can do in the future.

My code to what I am wanting is to large to include here but safe to say it does work the way I want with all my galleries (CRG, cart, etc..) with the possibility of my future additions on a per photo basis in an Album.

Hope this explains it better.

Offline

#4 2019-03-23 11:53:18

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

Re: How to Set an Album in plugins

The latest version of our phplugins-pangolin-sample.php includes two examples of note, beginning on lines 492 and 510. These show how to call up album information and create a custom image loop in an album. That's about the extent of what I am prepared to support for album customization. You are, of course, welcome to be as ambitious as you like with things, but I can really only support what's "in the box", so to speak.

I could recommend trying to keep your customizations within albums, rather than trying to over-complicate things with pages and album embeds.


Matt

The Turning Gate, http://theturninggate.net

Offline

#5 2019-03-28 00:46:16

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

Re: How to Set an Album in plugins

Not a good answer, I just need to know how to call the constructor class and the members of the class on my own to create the album.  It is not complicated just want to use it the way I want.  Nonetheless, I have found a way around the problem (which is now running in my prod environment) but I would prefer to just know how the album is constructed in the first place so that I can do what I need to do without having to hide what backlight album include is showing which by the way is not constructing it correctly anyway.  It should be there to expose the album class constructor I would prefer not to look through the backlight code to find the answer.

Offline

Board footer

Powered by FluxBB