Quote:
Originally Posted by blueberry
guys there isn't logout button... anyone knows how to add it in the place of "register"?? Thanks alot..
|
You can try this however I am no coder so back up your templates!!!! And I have not tried this on my board as I am at work and just using backup files to pull the code, I will try and create it when I get home but in the mean time you can try it your self
The code below will create a logout link in text format. It will display the word log out followed by the username so if your username was ?Sam? it would say:
Log Out Sam
Code:
<if condition="!$show['guest']"><a href="login.php?$session[sessionurl]do=logout&logouthash=$bbuserinfo[logouthash]" onclick="return log_out()"><phrase 1="$bbuserinfo[username]">$vbphrase[log_out_x]</phrase></a> -</if>
Now looking at the Reg button this is the required code:
Code:
<if condition="$show['guest']"><a href="http://www.yourdomain.com/forum/register.php?do=signup" target="_self"><img src="http://www.yourdomain.com/forum/images/sr/misc/reg.gif" alt="Register" width="71" height="22" border="0" align="middle"></a> </if>
(Remember the url and image source links have been changed to post on a public site

)
So what I would think you would need to do would be this:
Code:
<if condition="!$show['guest']"><a href="login.php?$session[sessionurl]do=logout&logouthash=$bbuserinfo[logouthash]" onclick="return log_out()"><img src="http://www.yourdomain.com/forum/images/sr/misc/logout.gif" alt="Log Out" width="71" height="22" border="0" align="middle"></a> -</if>
Remember to change the urls in the above example to fit your site and you will need to create a log out button. Like I say I have NOT tested this so I am not sure if it will work or cause errors but this is what I would do, when I get home tonight from work I will try and create it and once working will provide better instructions plus where to install it good luck and let me know how you get on