Runboard.com
You're welcome.







       Use the black navigation bar to log in or create your account.

Jump to Page:  1  2  3  4  5 

 
Lesigner Girl Profile
Live feed
Blog
Friends
Miscellaneous info

Minerva
Head of Runboard staff

Registered: 11-2005
Posts: 9536
Karma: 132 (+147/-15)
ReplyQuote
posticon FAQ: Login box and logout link, hidden when not needed


Updated July 13, 2009 to work with new ID attributes that were added to <body> tags in boards yesterday. In short, use class="logged_in" and class="logged_out" instead of id=, and replace the # in the CSS with a dot.

Here is the code for the Quick Login form at the top of the board. Change the parts in blue to your own board's address. This includes a logout link that's invisible to people who don't need it, based on whether they are logged in or not. You can use CSS to customize your login form.

<div class="login_form">
<form method="post" action="/login">
<fieldset>
  <legend>Quick Login:</legend>
<input type="hidden" name="submit" value="yes" />
<input type="hidden" name="warpmebackto" value="http://www.runboard.com/b*****" />
<input type="hidden" name="board" value="" />
        <label for="login">Username:</label><input class="login_input" type="text" name="login" id="login" value="" />
        <label for="password">Password:</label><input class="login_input" type="password" name="password" id="password" value="" />
<input class="login_submit" type="submit" value="Login" />
        <a href="http://www.runboard.com/create_user/lost_password">Lost password?</a> | <a href="http://www.runboard.com/create_user">Register</a>
</fieldset>
</form>
</div>



To make the form and logout link appear and disappear according to whether someone is logged in or not, go into your Custom Language Set (CLS) and do the following...

In the box marked control_panel, put this:

Control Panel<body class="logged_in">

If yours doesn't say "Control Panel," then replace those words with your current text or image, and put <body class="logged_in"> after it.

Since the Control Panel link doesn't show up on New Topic, Reply, and Edit screens but the posticons and smileys do, also add <body class="logged_in"> to either:
msgform_clickable_smilies ~or~ msgform_choose_a_posticon. If you use the scrolling smileys hack, msgform_choose_a_posticon may be your only option, due to character limits in the CLS.

Also in your custom language set, add this to the existing content of the box marked misc_regacc_globally:

<body class="logged_out">



Then in your CSS:

.logged_in .login_form {display:none;}
.logged_out .logout {visibility:hidden;}


You can also style your form with CSS. I personally find the default border ugly on a lot of layouts, and this is how you change the border color, make the border bigger, or make it disappear. Change the attributes to suit your layout:

.login_form fieldset{border:1px solid #6F6F6F;}


The only thing left to do now is decide where you want your logout link and put it there. In your custom header or footer (the header will make it easier for people to find), add this code:

<a class="logout" href="/logout">Logout</a>

You might have to tweak this last bit of code based on your layout. For instance, if you have a one-row table with a link in each table cell, you'll want to add that class name to the <td> containing the logout link. Example:

<table><tr>
      <td>link</td>
      <td>link</td>
      <td class="logout"><a href="/logout">Logout</a></td>
      <td>link</td>
</tr></table>

That last example will make the cell containing the link disappear, including the link inside it.

If you have any trouble with this or have any questions, you can ask in a reply to this thread. emoticon

Edited to improve code

Last revised by Lesigner Girl, 7/13/2009, 11:38 pm


---
Runboard Knowledge Base
Website Creation Tutorials
11/28/2005, 2:53 am Link to this post PM Lesigner Girl Read Blog
 
beaners rants Profile
Live feed
Blog
Friends
Miscellaneous info

Citizen

Registered: 03-2006
Posts: 13
Karma: 0 (+0/-0)
ReplyQuote
Re: Quick Login code


I put this code in my httml area and for some reason when I goto log in it comes back to your board
5/13/2006, 2:56 pm Link to this post PM beaners rants Read Blog
 
The Mooseman Profile
Live feed
Blog
Friends
Miscellaneous info

Citizen

Registered: 03-2005
Province: Looking for my brain...
Posts: 592
Karma: 8 (+8/-0)
ReplyQuote
Re: Quick Login code


Custom language set :


Enter for the string 'misc_regacc'
%1 %3 <b>Login: </b><input type=text name=login value="" size="10">
<input type=password name=password value="" size="10"><input type="submit" value="Go">

Enter for the string 'misc_regacc_global'
<b>Signup</b></td></a><form method="post" action="http://com3.runboard.com/login"><td align="right"><span class="miscoptbar" >

NOTE: Remember to change the com3 to whatever server is used in your board url.

Enter for the string 'misc_regacc_learn'
<input type="hidden" name="submit" value="yes"><input type="hidden" name="warpmebackto" value="bkarlstestboard">

NOTE replace bkarlstestboard with your the board name in the boards url (dont forget the b part) This will ensure after login the user is directed back to your forum and not Runboard.com or their control panel.

---
~ Quickly, I must hurry, for there go my people and I am their leader ~
5/13/2006, 7:29 pm Link to this post PM The Mooseman
 
Lesigner Girl Profile
Live feed
Blog
Friends
Miscellaneous info

Minerva
Head of Runboard staff

Registered: 11-2005
Posts: 9536
Karma: 132 (+147/-15)
ReplyQuote
Re: Quick Login code


Hi Beaner emoticon

You're supposed to change the part in blue to make it go to your board. I'll post the line again where that occurs here, putting that part in red this time so you can see it better.

<input type="hidden" name="warpmebackto" value="http://com#.runboard.com/b*****" />

---
Runboard Knowledge Base
Website Creation Tutorials
5/13/2006, 7:30 pm Link to this post PM Lesigner Girl Read Blog
 
Lesigner Girl Profile
Live feed
Blog
Friends
Miscellaneous info

Minerva
Head of Runboard staff

Registered: 11-2005
Posts: 9536
Karma: 132 (+147/-15)
ReplyQuote
Re: Quick Login code


Geeze, Moose, beating me to the punch again? emoticon

Beaner, if you use Moose's code, make sure to take mine out, otherwise you will have two login boxes at the top of your board.

---
Runboard Knowledge Base
Website Creation Tutorials
5/13/2006, 7:35 pm Link to this post PM Lesigner Girl Read Blog
 
beaners rants Profile
Live feed
Blog
Friends
Miscellaneous info

Citizen

Registered: 03-2006
Posts: 13
Karma: 0 (+0/-0)
ReplyQuote
Re: Quick Login code


Well added code where said to now nothing as far as sign in is there
5/14/2006, 7:19 pm Link to this post PM beaners rants Read Blog
 
Lesigner Girl Profile
Live feed
Blog
Friends
Miscellaneous info

Minerva
Head of Runboard staff

Registered: 11-2005
Posts: 9536
Karma: 132 (+147/-15)
ReplyQuote
Re: Quick Login code


Did you check it while you're logged out? emoticon

---
Runboard Knowledge Base
Website Creation Tutorials
5/14/2006, 9:29 pm Link to this post PM Lesigner Girl Read Blog
 
beaners rants Profile
Live feed
Blog
Friends
Miscellaneous info

Citizen

Registered: 03-2006
Posts: 13
Karma: 0 (+0/-0)
ReplyQuote
Re: Quick Login code


lol emoticon
5/15/2006, 12:15 am Link to this post PM beaners rants Read Blog
 
Lesigner Girl Profile
Live feed
Blog
Friends
Miscellaneous info

Minerva
Head of Runboard staff

Registered: 11-2005
Posts: 9536
Karma: 132 (+147/-15)
ReplyQuote
Re: Quick Login code


I take that to mean you forgot? emoticon

---
Runboard Knowledge Base
Website Creation Tutorials
5/15/2006, 2:32 am Link to this post PM Lesigner Girl Read Blog
 
Lesigner Girl Profile
Live feed
Blog
Friends
Miscellaneous info

Minerva
Head of Runboard staff

Registered: 11-2005
Posts: 9536
Karma: 132 (+147/-15)
ReplyQuote
Re: Quick Login code


Moose, why didn't you mention that I had forgotten to explain how I get the form to disappear when someone is logged in? emoticon

I just edited my original post to fix this oversight.

*smacks self upside the head*

---
Runboard Knowledge Base
Website Creation Tutorials
5/23/2006, 4:49 am Link to this post PM Lesigner Girl Read Blog
 


Add to this discussion


Jump to Page:  1  2  3  4  5 



You are not logged in (login)
Back To Top

This board's time is GMT.

Board's time is GMT