Member
Member
special-k   2010-04-21, 20:06
#1

Can someone suggest ways in which I can filter out photos from being displayed for certain "special" tags? I know that it is easy to restrict galleries to certain types of users. But I have a situation where there are several galleries where most photos are ok to display to the public but some have sensitive information that only authorized people should see. These images are tagged as "private".

Can I, for example, do something like:

`

if ($_zp_loggedin & (ADMIN_RIGHTS)) {

show all tags

                                 }

else

{

skip photos tagged private

}

`

Member
Member
Blue Dragonfly   2010-04-21, 20:16
#2

As a quick thought, rather than building a whole parallel interface to manage hidden tags, maybe you can prefix all special tags with a specefic character, such as "-private" or "~private". Then you can simply modify the tag display functions to only display tags that do not start with that character.

This would at least be more flexible than hard-coding or building a separate list of tags that you consider "special".

Just a thought!

Member
Member
special-k   2010-04-21, 20:21
#3

Actually that's what I want to do. Not build a parallel interface but just add tagname_private and filter those out.

But I am asking for more input as to where in the flow I would do this step.

Member
Member
kagutsuchi   2010-04-21, 20:24
#4

If you only have one group that should be able to see all private images, then you could simply have the private images be unpublished and give the private group VIEW_ALL_RIGHTS.

Otherwise, I think a better approach would be to use the user_groups plugin. Separate the users into groups and then have the rights tested against the group instead of against tags or other criteria.

Member
Member
kagutsuchi   2010-04-21, 20:28
#5

Didn't see your new post until after I posted...

If you're looking as to where you should add the checks, it would depend on the theme you're using.

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