vForums Support > Programming & Coding :: Database of Codes/Hacks/Mods :: > vBulletin Style Quick Login

vBulletin Style Quick Login - Posted By Michael (wrighty) on 15th Apr 08 at 5:39pm
This code will add a vBulletin styled quick login to your forum, it will appear below the banner and above the menu. You can only use it on the main forum page as that already contains the quick login. On other pages, it's simply not shown.

Main Header:
<script>
function login(){
    get('username','name')[0].value = get('un','id').value;
    get('password','name')[0].value = get('pw','id').value;
    get('time','name')[0].value = get('t','id').value;
    get('loginForm','name')[0].submit();
}

function build(){
    var a = get('welcome_table','id').insertRow(1).insertCell(0);
    a.innerHTML = '<form action=javascript:void(0); onsubmit=login();>Username: <input type="text" id="un" size="10"> Password: <input type="password" id="pw" size="10"> Stay Logged in for: <select id="t" tabindex="1"><option value="30">30 Minutes</option><option value="60">1 Hour</option><option value="120">2 Hours</option><option value="360">6 Hours</option><option value="720">12 Hours</option><option value="1440">1 Day</option><option value="10080">1 Week</option><option value="1051897" selected="selected">Forever</option><option value="session">This Session</option></select> <input type="submit" value="Login"></form>';
    a.className = 'title1';
}
</script>


Main Footer:
<script>
if(location.href.match(/.co.uk($|\/$)/) && vf_username == 'guest'){
    build();
    get('loginForm','name')[0].firstChild.style.display = 'none';
    get('loginForm','name')[0].parentNode.previousSibling.style.display = 'none';
    get('loginForm','name')[0].parentNode.nextSibling.style.display = 'none';
}
</script>

Re: vBulletin Style Quick Login - Posted By MiNiCliP™ (miniclip238) on 21st Apr 08 at 11:48am
can you convert this for ProBoards?

Re: vBulletin Style Quick Login - Posted By Alex Bailey (system) on 21st Apr 08 at 6:45pm
Well considering this is a support forum for vForums , i don't think he will lol {Tongue Out}

Re: vBulletin Style Quick Login - Posted By Michael (wrighty) on 21st Apr 08 at 9:46pm
 
can you convert this for ProBoards?


No.

It's vF. We do not support competitor services.

Re: vBulletin Style Quick Login - Posted By MiNiCliP™ (miniclip238) on 1st May 08 at 2:00pm
Oh Ok Doky {Smile}

Re: vBulletin Style Quick Login - Posted By CåñåÐå™ (canada) on 20th May 08 at 2:34pm
Would it be possible to still have the vForum login at the bottom of the forum and this on the top Wrighty ? Or it that against vForums TOS.

Re: vBulletin Style Quick Login - Posted By Michael (wrighty) on 20th May 08 at 2:44pm
No, that's fine... Just remove these 3 lines:

get('loginForm','name')[0].firstChild.style.display = 'none';
get('loginForm','name')[0].parentNode.previousSibling.style.display = 'none';
get('loginForm','name')[0].parentNode.nextSibling.style.display = 'none';

Re: vBulletin Style Quick Login - Posted By CåñåÐå™ (canada) on 20th May 08 at 5:45pm
I did that Wrighty but its not working for me bro {Confused}

http://testforum.virtualforums.co.uk/

Re: vBulletin Style Quick Login - Posted By Michael (wrighty) on 20th May 08 at 6:15pm
move this part:

<script>
if(location.href.match(/.co.uk($|\/$)/) && vf_username == 'guest'){
build();
}
</script>


To the top of your main footer, OR if it is, to the top of your global footer! {Wink} It's conflicting with another code! {Tongue Out}

Re: vBulletin Style Quick Login - Posted By CåñåÐå™ (canada) on 20th May 08 at 8:30pm
Yes i did have to put it in the global footer, and its working . Thank you Wrighty {Grin} .

Re: vBulletin Style Quick Login - Posted By Michael (wrighty) on 20th May 08 at 8:42pm
{Grin}

Re: vBulletin Style Quick Login - Posted By dog199200 (dog199200) on 24th May 08 at 12:54am
also i didnt realize this, but you should really center it instead of it being pushed to the left

Re: vBulletin Style Quick Login - Posted By ashkir (ashkir) on 30th Jul 08 at 9:53pm
Posted By dog199200 on 24th May 08 at 12:54am
 
also i didnt realize this, but you should really center it instead of it being pushed to the left
On vB it isn't centered by default. If you want it to be centered add <center></center> tags to the code where you see the form HTML.

Re: vBulletin Style Quick Login - Posted By Michael (wrighty) on 30th Jul 08 at 9:58pm
That post was made 2 months ago! >.>

Re: vBulletin Style Quick Login - Posted By ashkir (ashkir) on 17th May 09 at 7:53pm
Preview of this code in action: http://wimg.co.uk/SjCb24.gif