Playing with Tags

Hi,

Is there a function to check if an image or album has a certain tag? Basically we use ZenPhoto to share design / GUI mockups between the design and user interface guys, we then use comments to discuss and make improvements (this is because we are spread out across multiple offices and countries).

What I would like to do, is check for a tag such as 'new' or 'updated' and show some kind of flag if it exists. I guess I need a function like if_tag_exists('new') or something. Does anything like that exist?

If not, do you think it would be hard to create? I'm not sure how the tagging works in ZenPhoto so any leads would be really helpful!

Comments

  • acrylian Administrator, Developer
    You mean more a kind of "hasTag()" function? No, we don't have that. But you can get the tags for each album or image using `getTags()`. Then you could create a loop and check if a certain tag is there. Alternatively you could just setup search for tags only and do a search for a tag.

    Actually just think this makes sense so I will put such a helper function on my list.
  • Or you could just use `if (in_array($tag, gettags()) {....`
  • Thanks guys!
Sign In or Register to comment.