mixmax2
Citizen
Registered: 05-2006
Posts: 6
Karma: 0 (+0/-0)
|
ReplyQuote
|
|
Logout?
How would I go about adding a nifty little logout button that is only visible if you are logged in at the TOP of my forum?
|
5/29/2006, 7:24 pm
|
Link to this post
PM mixmax2
|
Lesigner Girl
Minerva
Head of Runboard staff
Registered: 11-2005
Posts: 9597
Karma: 132 (+147/-15)
|
ReplyQuote
|
|
Re: Logout?
Welcome to Illusia, mixmax!
First, the simple explanation: Hiding the logout link is hidden when people are already logged out, just like the login form is hidden when people are already logged in. That said, here's how. It may seem a little backwards, so I'll try to be extra clear at the risk of overexplaining things.
Obviously, we don't need a logout link to show up for someone who is already logged out. Since the registration link only shows up when someone is logged out or not registered, this is where we want to put the call to hide the logout link.
So... in your Custom Language Set, look for misc_regacc_globally and add the following line to whatever is already in there. Before or after, either is fine, as long as there aren't any html comment tags surrounding it to prevent it from working:
<body id="logged_out">
So far, we've given the whole page an id of "logged_out" when someone is logged out.
In your css, add this line:
#logged_out .logout{visibility:hidden;}
Now, when someone is logged out, anything that has the class of "logout" will be hidden. (# signifies an id, whereas a period . signifies a class.)
Now, for this board, I have all those links in an unordered list (<ul>), so I defined the <li> with the "logout" class. But where you put this will depend on the way you are structuring your links at your board. Here is what I have at this board:
<li class="logout"><a href="/logout">LOGOUT</a></li>
If you only want to hide the link itself:
<a class="logout" href="/logout">LOGOUT</a>
If you have a line break <br /> after each link, you can add a span tag to also hide the <br />:
<span class="logout"><a href="/logout">LOGOUT</a><br /></span>
If you have your links in a table, each link in its own cell:
<td class="logout" width="??"><a href="/logout">LOGOUT</a></td>
I hope you get the idea. If not, feel free to post your list of links here and I'll be happy to help you sort it out, if somebody else doesn't beat me to it. 
|
5/30/2006, 12:31 am
|
Link to this post
PM Lesigner Girl
Read Blog
|
mixmax2
Citizen
Registered: 05-2006
Posts: 6
Karma: 0 (+0/-0)
|
ReplyQuote
|
|
Re: Logout?
Thank you so much Lesigner Girl
|
5/30/2006, 1:58 am
|
Link to this post
PM mixmax2
|
Lesigner Girl
Minerva
Head of Runboard staff
Registered: 11-2005
Posts: 9597
Karma: 132 (+147/-15)
|
ReplyQuote
|
|
Re: Logout?
You're very welcome, mixmax! 
|
5/30/2006, 2:36 am
|
Link to this post
PM Lesigner Girl
Read Blog
|
Pastor Rick
Citizen
Registered: 07-2005
Province: Texas
Posts: 619
Karma: 11 (+12/-1)
|
ReplyQuote
|
|
Re:
Is it a td or something else if you want the logout link to show in the .ak_miscoptbar_table?
|
4/16/2011, 5:22 am
|
Link to this post
PM Pastor Rick
Read Blog
|
Lesigner Girl
Minerva
Head of Runboard staff
Registered: 11-2005
Posts: 9597
Karma: 132 (+147/-15)
|
ReplyQuote
|
|
Re:
I don't understand the question. Can you please re-phrase it?
|
4/16/2011, 4:19 pm
|
Link to this post
PM Lesigner Girl
Read Blog
|
Pastor Rick
Citizen
Registered: 07-2005
Province: Texas
Posts: 619
Karma: 11 (+12/-1)
|
ReplyQuote
|
|
Re: Logout?
Well, the whole thing is a table by the way the class is named .ak_miscoptbar_table but normally we only say .miscoptbar in the CSS while decorating. With the logout link though it looks like this is the proper coding:
<td class="logout" width="??"><a href="/logout">LOGOUT</a></td>
since it is actually located in a table right? Now to get that kind of code there it seems like it would have to be tacked on to one of the custom language entries or am I over thinking?
|
4/17/2011, 12:12 am
|
Link to this post
PM Pastor Rick
Read Blog
|
Lesigner Girl
Minerva
Head of Runboard staff
Registered: 11-2005
Posts: 9597
Karma: 132 (+147/-15)
|
ReplyQuote
|
|
Re: Logout?
Let's look at the HTML for that table, as grabbed from the source code of this page, minus the <body> hack, and condensed for easier reading:
<table class="ak_miscoptbar_table" ...>
<tr>
<td align="left" valign="bottom">
<span class="miscoptbar">
<a ...>Runboard.com</a> |
<a ...>Control Panel</a> |
<a ...>Subscribe to topic</a> |
<a ...>Bookmark Illusia</a> |
<a ...>PM Inbox</a>
</span>
</td>
<td align="right" valign="bottom">
<span class="miscoptbar">
</span>
</td>
</tr>
</table>
The green is what you can edit in the custom language set. Where would you insert your logout link within that HTML?
On a side note, it really pains me to post this obsolete HTML here, but that's what we have to work with for now.
|
4/17/2011, 4:58 am
|
Link to this post
PM Lesigner Girl
Read Blog
|
Pastor Rick
Citizen
Registered: 07-2005
Province: Texas
Posts: 619
Karma: 11 (+12/-1)
|
ReplyQuote
|
|
Re:
After the PM Inbox so it is as close to the same place the login link displays at as possible.
|
4/17/2011, 10:44 pm
|
Link to this post
PM Pastor Rick
Read Blog
|
Lesigner Girl
Minerva
Head of Runboard staff
Registered: 11-2005
Posts: 9597
Karma: 132 (+147/-15)
|
ReplyQuote
|
|
Re: Logout?
It sounds like you want this, then.
<table class="ak_miscoptbar_table" ...>
<tr>
<td align="left" valign="bottom">
<span class="miscoptbar">
<a ...>Runboard.com</a> |
<a ...>Control Panel</a> |
<a ...>Subscribe to topic</a> |
<a ...>Bookmark Illusia</a> |
<a ...>PM Inbox</a> | <a href="/logout">LOGOUT</a>
</span>
</td>
<td align="right" valign="bottom">
<span class="miscoptbar">
</span>
</td>
</tr>
</table>
Do you still need help figuring out which class to define, or can you figure it out from this HTML? If you still need help, what are you wanting to do with the styling, and at which board (so I can see what CSS we may need to override)?
Last revised by Lesigner Girl, 4/17/2011, 11:17 pm
|
4/17/2011, 11:17 pm
|
Link to this post
PM Lesigner Girl
Read Blog
|