ZenphotoCMS Forum
how to use the user log out plug-in - 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: how to use the user log out plug-in (/thread-3937.html)



how to use the user log out plug-in - trond - 2008-10-23

I'm really not any good in programming and I have a question.

I understand that users who have logged in with an album password, actually stays logged in until windows clears the cookie history. That can be a problem on shared computers. Therefore, you guys came up with the user log out plug-in (I guess..)

Can anybody explain to me (in plain english, step-by-step) how this works, which code to copy and where to place it.

In the tutorial it says: "Place a call on printUserLogout() where you want the logout link to appear" ... that doest tell me anything really!




how to use the user log out plug-in - acrylian - 2008-10-23

That means you need to place that function on your theme files where you want the logout link to appear.




how to use the user log out plug-in - trond - 2008-10-23

So do I just paste this part into my html document, without further editing?

void printUserLogout( [string $before = ''], [string $after = ''], [bool $showLoginForm = false] )




how to use the user log out plug-in - acrylian - 2008-10-23

No, only the function itself, just look at how it is done in themes and please read this: http://www.zenphoto.org/2008/04/how-to-read-the-zenphoto-functions-guide/




how to use the user log out plug-in - trond - 2008-10-25

So i did, but I'm sorry im not good at this. (Still learning)

Do I place This on my index page then:

``




how to use the user log out plug-in - acrylian - 2008-10-25

Yep, but don't forget the closing semicolon: ``




how to use the user log out plug-in - trond - 2008-10-25

I'm sorry but I could not make this work?

I pasted the code above into the index.php file in the themes folder.
When I loaded the page, a new password box appeared, not an option to log out. I can only log out when im logged in as admin, not as a user viewing an album?