Member
Member
hellweaver666   09-03-2010, 14:36
#1

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!

Administrator
Administrator
acrylian   09-03-2010, 14:47
#2

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.

Member
Member
sbillard   09-03-2010, 18:08
#3

Or you could just use if (in_array($tag, gettags()) {....

Member
Member
sbillard   09-03-2010, 20:26
#4

Also you might find this useful:http://www.zenphoto.org/2010/02/flag_thumb_as_new/

Member
Member
hellweaver666   17-03-2010, 10:10
#5

Thanks guys!

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.