Im hoping to get this mod working:
https://vborg.vbsupport.ru/showthrea...ight=login+box
So far i have got a box which allows me to login, but then takes me back to the page where i logged in, not the actual forum like a want (can be seen at
http://www.hiven.net/files/test.php)
On top of this im trying to add this login box to my homepage, but it didnt work too well, what can i do to make it fit better?
http://img66.imageshack.us/img66/7080/problem8ji.jpg
Any help you guys can give to make this work would be really appreciated
James
All of the above is fixed apart from when a user goes back to the home page after logging in, they get this:
Quote:
Welcome back, $username!
"); //if the avatar url is not empty, display it if($user_av!='') print(""); } else { ?>
|
This is the code im using:
Quote:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php
chdir("./forums");
include("./global.php");
// added this line to include the user functions which
// has the fetch_avatar_url() function
include("./includes/functions_user.php");
chdir("../");
?>
<html>
<head>
<?
if ($bbuserinfo['userid']!=0) {
$username=$bbuserinfo['username'];
// i assigned the avatar url to the variable $user_av and check to see if it's empty.
$user_av = fetch_avatar_url($bbuserinfo['userid']);
if($user_av!='')
$user_av="/forums/" . $user_av; //replace "/forum/" with your virtual path to your forum pages.
print("<align='center'><span class='sectionheader'>Welcome back, $username!<br>");
//if the avatar url is not empty, display it
if($user_av!='')
print("<img src=\"" . $user_av . "\" vspace=4>");
} else {
?>
<form action='/forums/login.php' method='post' onsubmit='md5hash(vb_login_password,vb_login_md5pa ssword)'>
<script type='text/javascript' src='/forum/clientscript/vbulletin_md5.js'></script>
<span class="sectionheader">Username:</span>
<input type='text' class='button' name='vb_login_username' id='navbar_username' size='15' accesskey='u' tabindex='1' value='' onfocus='if (this.value == 'username') this.value = '';' /><br>
<span class="sectionheader">Password: </span>
<input type='password' class='button' name='vb_login_password' size='15' accesskey='p' tabindex='2' /><br>
<input type='checkbox' name='cookieuser' value='1' tabindex='3' id='cb_cookieuser_navbar' accesskey='c' checked='checked' /><span class='sectionheader'>Remember Me</span><br>
<input name="submit" type='submit' class='button' accesskey='s' tabindex='4' title='Log In' value='Log In' />
<input type='hidden' name='do' value='login' />
<input type='hidden' name='forceredirect' value='1' />
<input type='hidden' name='vb_login_md5password' />
</form>
<?
}
?>
</head>
</html>
|
Please help if you can!