![]() |
|
Pulling user cookie in image template - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: Pulling user cookie in image template (/thread-6764.html) |
Pulling user cookie in image template - earthnutvt - 2010-03-12 I'm setting up a "Favorites" function where people can save images as their "favorite". To do this, I need to pull a user variable (either username or id) in the image template. (This would obviously only pull if someone was logged in.) Is there a way to do this? Thanks! I tried various different variables from elsewhere in the script, but none of them seemed to work. Pulling user cookie in image template - kagutsuchi - 2010-03-12 You should use the global variable I should also mention that if the current user is not logged in, Pulling user cookie in image template - earthnutvt - 2010-03-13 I searched the entire script for $_zp_current_admin_obj and Zenphoto_Administrator, and found neither one. What am I missing? Pulling user cookie in image template - acrylian - 2010-03-13 Well, the global variable kagutsuchi meant is Pulling user cookie in image template - kagutsuchi - 2010-03-13 Ohh, sorry, I forgot that isn't in 1.2.9. acrylian is right. Pulling user cookie in image template - sbillard - 2010-03-13 Let me make sure that everything is clear to you. With Zenphoto 1.2.9 and previous there is a global array named However, once Zenphoto 1.3 is released, this variable will no longer exist as we are moving user references to an object model. With Zenphoto 1.3 you would have to change your theme to use the object method Pulling user cookie in image template - earthnutvt - 2010-03-15 Thank you SO MUCH! I truly appreciate the assistance! |