Member
Member
ClicClac   29-06-2008, 08:30
#1

Hello,

Does an 'is-admin' function (like in WordPress) exist in Zenphoto ?

I have a button for copying the image path in clipboard, but I want to display it only for me, not for visitors.

Administrator
Administrator
acrylian   29-06-2008, 08:49
#2

You could use if(($_zp_loggedin & ADMIN_RIGHTS)) { }

Member
Member
ClicClac   29-06-2008, 09:36
#3

Perfect!!
Many thanks for this very fast solution...

Member
Member
sbillard   29-06-2008, 16:07
#4

More precicely, if (zp_loggedin()) will tell you if the viewer is logged in as an admin. acrylian' code is more precice on what kind of administrator is logged in. Most of the time it is not improtant what the admin's rights are so zp_loggedin() is appropriate. Also, it works anywhere. If you use if(($_zp_loggedin & ADMIN_RIGHTS)) within a function you will need to declare global $_zp_loggedin;

Administrator
Administrator
acrylian   29-06-2008, 16:27
#5

I actually copied too quickly the wrong thing...

Member
Member
ClicClac   29-06-2008, 20:16
#6

Thanks for this detail, sbillard !

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