Log in

View Full Version : Logout function


odln018
02-19-2008, 01:30 PM
I'm wanting to put a logout button on my navbar, I see the "\index.php?logout" but that apparently isn't the way to call it from within the template.

How would I do this?

odln018
02-20-2008, 02:47 PM
Here's the code I'm trying to use, could I please get some advice?


<if condition="$show['member']">
<a href="login.php?$session[sessionurl]do=logout&amp;logouthash=$bbuserinfo[logouthash]" onclick="return log_out('$vbphrase[sure_you_want_to_log_out]')"><img src="...logout-center.gif" alt="" border="0" /></a>
</if>

Lynne
02-20-2008, 03:02 PM
That looks like the logout code.... what happens when a user clicks on it? And what page are you using it on?

odln018
02-20-2008, 03:13 PM
Thanks for the response!

I'm trying to incorporate it into the first navbar, and have placed the code in my header template.

I'm not able to view the button at all.

Lynne
02-20-2008, 03:27 PM
It looks like you are using an image for your LogOut button? "<img src="...logout-center.gif" alt="" border="0" />" That is not a valid path, so you won't see a thing. You need to correct your image path.

odln018
02-20-2008, 03:37 PM
Second one I tried:


<if condition="$show['member']">
<td align="center><a href="login.php?$session[sessionurl]do=logout&amp;logouthash=$bbuserinfo[logouthash]" onclick="return log_out('$vbphrase[sure_you_want_to_log_out]')"><img src="{if}/logout-center.gif" alt="" border="0" /></a></td>
</if>