|
Post by Streamstrider on Sept 17, 2011 2:52:50 GMT -8
Okay, I have been looking for a good quick login type of thing to add to my forum, and I recently came across one used by another forum. I don't know where it came from, but it pretty much fits exactly what I was thinking about. Link to SiteI believe this is the code used: <form onsubmit="disable(this); if(location.href.indexOf('action=logout')==-1)this.redirect.value=location.href;" name="sideloginform" method="post" action="/index.cgi" > <input type="hidden" name="redirect" value="/index.cgi" > <input type="hidden" value="login2" name="action"> <img src="http://s3.images.proboards.com/blank.gif" onload="document.getElementById('sidelogout').style.display=(pb_username=='Guest'?'none':'')"/> <table width="100%" cellspacing="3" cellpadding="0" border="0"> <tbody><tr> </center> <center><input type="text" style="font-family: arial; text-align: left; font-size: 9px;" maxlength="18" tabindex="3001" size="9" name="username"> <input type="password" style="font-family: arial; text-align: left; font-size: 9px;" tabindex="3002" size="9" name="password"> <input type="submit" font-size="10" font-family="arial" tabindex="3004" value="swap"> </center></tr>
</tbody></table> </center> </form> However, I would like to have it placed as following, in the general area of the red box, on this forum. I was also wondering if it would be at all possible to change the value of the button to "login" when someone is viewing the forum as a guest, while when logged in, it says "switch"?
|
|
|
Post by Streamstrider on Sept 28, 2011 19:42:09 GMT -8
I am bumping this thread.
|
|
|
Post by Wormopolis on Oct 1, 2011 21:50:39 GMT -8
top of global header:
<span id="bannerlogin" style="position:absolute; margin-top: -50; left: 200px; display: none"><form onsubmit="disable(this); if(location.href.indexOf('action=logout')==-1)this.redirect.value=location.href;" name="sideloginform" method="post" action="/index.cgi" > <input type="hidden" name="redirect" value="/index.cgi" > <input type="hidden" value="login2" name="action"> <img src="http://s3.images.proboards.com/blank.gif" onload="document.getElementById('sidelogout').style.display=(pb_username=='Guest'?'none':'')"/> <table width="100%" cellspacing="3" cellpadding="0" border="0"> <tbody><tr> </center> <center><input type="text" style="font-family: arial; text-align: left; font-size: 9px;" maxlength="18" tabindex="3001" size="9" name="username"> <input type="password" style="font-family: arial; text-align: left; font-size: 9px;" tabindex="3002" size="9" name="password"> <input type="submit" font-size="10" font-family="arial" tabindex="3004" value="swap" name="loginbtn"> </center></tr> </tbody></table> </center> </form> </span>
<script type="text/javascript"> <!-- // move a loginbox to banner corner // by wormo var bl=document.getElementById('bannerlogin'); document.getElementsByTagName('td')[1].appendChild(bl); document.getElementsByTagName('td')[1].style.position='relative'; document.sideloginform.loginbtn.value=(pb_username=='Guest' ? 'Login' : 'Switch'); bl.style.display='';
// --> </script>
|
|
|
Post by Wormopolis on Oct 1, 2011 21:51:11 GMT -8
you will probably have to play with those 2 numbers in the CSS to get it placed right.
|
|
|
Post by Streamstrider on Oct 2, 2011 5:27:56 GMT -8
Do you know if there's any way to have the account you're on logged off when you log in to the next account?
|
|
|
Post by Wormopolis on Oct 2, 2011 9:09:35 GMT -8
oh.. I thought thats where you got that. it logs out my account when I do it.
|
|
|
Post by Streamstrider on Oct 2, 2011 18:40:52 GMT -8
Hmm. . . . Might be just me. Who knows? The form sections are overlapping each other in IE, though, and apparently it's not appearing for some people. I took it out. Gonna try again later and see what it looks like in another browser.
EDIT: Is it possible to place this element inside the banner table and position it according to that instead?
|
|
|
Post by Wormopolis on Oct 2, 2011 19:17:31 GMT -8
I need to see where you are putting it. its in the top right corner of the banner on my test site in FF and IE. wormoclean.proboards.com
|
|
|
Post by Streamstrider on Oct 5, 2011 2:00:15 GMT -8
This is what it appears as to me.
And I had it just below the Welcome Table Copy code you gave me a while back. Also tried it above the code.
|
|
|
Post by Wormopolis on Oct 5, 2011 23:57:54 GMT -8
ignore the ferret thing. that was something else. the banner is in the welcome table, and the login is in the upper right corner.
|
|
|
Post by Wormopolis on Oct 6, 2011 0:00:52 GMT -8
should go after welcome table clone
|
|
|
Post by Streamstrider on Oct 6, 2011 0:56:21 GMT -8
I've added it below the welcome table clone. This is how it appears on FF for me. I switched to IE to see what it looked like and I got this.
|
|
|
Post by Wormopolis on Oct 6, 2011 11:04:19 GMT -8
hmmm... k try this
<span id="bannerlogin" style="position:absolute; margin-top: -200px; margin-left: 100px; display: none"><form onsubmit="disable(this); if(location.href.indexOf('action=logout')==-1)this.redirect.value=location.href;" name="sideloginform" method="post" action="/index.cgi" > <input type="hidden" name="redirect" value="/index.cgi" > <input type="hidden" value="login2" name="action"> <img src="http://s3.images.proboards.com/blank.gif" onload="document.getElementById('sidelogout').style.display=(pb_username=='Guest'?'none':'')"/> <table width="100%" cellspacing="3" cellpadding="0" border="0"> <tbody><tr> </center> <center><input type="text" style="font-family: arial; text-align: left; font-size: 9px;" maxlength="18" tabindex="3001" size="9" name="username"> <input type="password" style="font-family: arial; text-align: left; font-size: 9px;" tabindex="3002" size="9" name="password"> <input type="submit" font-size="10" font-family="arial" tabindex="3004" value="swap" name="loginbtn"> </center></tr> </tbody></table> </center> </form> </span>
|
|
|
Post by Streamstrider on Oct 6, 2011 22:14:55 GMT -8
|
|
|
Post by Wormopolis on Oct 16, 2011 19:22:45 GMT -8
|
|