Using tag_extras to Create Related Tags

Good afternoon. I've been scratching my head all day trying to figure out how to incorporate tag_extras into a Related Tags feature.

When a user is viewing an album that contains multiple photos with different tags, a list on the side will show all the tags in that current album, giving the option to click the tag and view all photos with that specific tag.

After reading the documentation I noticed that it asks for the $albumname. I've tried to use the URL and file location with no avail. Another issue is if a user was to go to the archive page and select a tag from there it'll display all tagged photos/albums from the gallery, not having its own physical album folder to try to link to. Any suggestions?

Also, the function I am using to try to display the tags is printAllTagsFromAlbum.

Comments

  • acrylian Administrator, Developer

    The albumname is the folder name as Zenphoto's gallery is file system based. That is what you see in the URL minus domain etc.

    So if you have an album "album" (URL yourdomain/album/) that is the name. If the album is a subalbum "subalbum" of "album" (URL yourdomain/album/subalbum/) the name is "album/subalbum".

    You get the name of the current album using the global object variable $_zp_current_album->name.

    I fear I don't understand the 2nd issue right now.

  • Perfect, figured it had to do something with that.

    For the 2nd part, what I mean is that if I were to look at tag results, i.e. "websitename"/page/search/tags/"SelectedTag" it would not have its own physical folder. It instead loads all images in the gallery that have that tag.

    What I want to find out is if there's a function to get the tags from that page

  • acrylian Administrator, Developer

    Yes, tag results are always global. It would require some customisation to limit that. Not sure off hand if taht is possible for tag searchs. It is generally for general searches.

Sign In or Register to comment.