Get sub album tags?

I'm running a script on my index.php page to find albums tagged with the word "featured" but the script doesn't seem to grab the sub-albums that are tagged. Is there a way to check the sub-album tags along with the top level albums?

`<?php while (next_album()): ?>

<?php $check = getTags();<br />
$check = substr_count($check,"featured");

if ($check == 1) { ?>`

``

`<?php } else {;}?>

<?php endwhile; ?>`

--> Thanks to BertSimons for writing the original script.

Comments

  • acrylian Administrator, Developer
    There is a function called printAllTagsAs() function which prints either a list or a tagcloud of all tags in your gallery. If you need something special you could make a custom function out of that.
    And take a look at the functions guide: www.zenphoto.org/documentation
  • csx Member
    hmmm... thanks for the hints, but unfortunately I not too familiar with writing anything php.

    I found the function `getAllTags()`, but it didn't seem to pull anything. :(
  • acrylian Administrator, Developer
    If you would take the time to read the documentation on www.zenphoto.org/documentation you would read this about getTags():
    "Returns a list of tags for either an image or album, depends on the page called from"
    So this returns the tags of the current image or album. If you want all tags used in your gallery use printAllTagsAs()
Sign In or Register to comment.