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>
can you convert this for ProBoards?
Well considering this is a support forum for vForums , i don't think he will lol
can you convert this for ProBoards?
No.
It's vF. We do not support competitor services.
Oh Ok Doky
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.
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';
I did that Wrighty but its not working for me bro
http://testforum.virtualforums.co.uk/
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! It's conflicting with another code!
Yes i did have to put it in the global footer, and its working . Thank you Wrighty .
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.also i didnt realize this, but you should really center it instead of it being pushed to the left
That post was made 2 months ago! >.>
Preview of this code in action: http://wimg.co.uk/SjCb24.gif