The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
I need help with a PHP script. I would like users to be able to login to the forums from a non-vB page. If someone could make a script for me or show me how to do this, it would be much appreciated. I know HTML, so i can do the layout myself. I have tried one of the hacks posted here, but it didn't work. I have include what I would like it to look like below.
If user is not logged in: ------------------------------------------------------------------------------ Welcome Guest! Click Here to register or login below. Username: |--------| Password: |--------| ------------------------------------------------------------------------------ And if a user is logged in: ------------------------------------------------------------------------------ Wecome back Username. Click here to go to the forums or click here to logout. You have # of Private Messages new messages. Click here to read them! ----------------------------------------------------------------------------- Thanks |
#2
|
||||
|
||||
Check the released hacks forum. Search for login. It's there already.
Amy |
#3
|
||||
|
||||
I already tried that, and it didn't work.
|
#4
|
||||
|
||||
What didn't work? The script or the search?
Amy |
#5
|
||||
|
||||
the script
|
#6
|
||||
|
||||
url to hack please.. i tried searching for it but couldnt find it =\
|
#7
|
|||
|
|||
Code:
<?PHP chdir("/path/to/board"); require("./global.php"); ?> <html> <head> <title>My homepage :D</title> </head> <body><table width=100%"> <tr> <td><img src="board/images/vBulletin_logo.gif"></td> <td valign=bottom align=right> <?PHP if ($bbuserinfo['userid']!=0) { $username=$bbuserinfo['username']; print("Welcome back, <b>$username!</b>"); } else { ?> you're not logged in <p> <form action="http://path/to/board/member.php" method="post" /> <input type="hidden" name="s" value="<?PHP print("$session[sessionhash]"); ?>" /> <input type="hidden" name="action" value="login" /> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td align="left"><font class="verdana, arial, helvetica" size="1"><b>Username:</b></font></td> <td align="left"><input type="text" name="username" size="7" /></td> </tr> <tr> <td align="left"><font class="verdana, arial, helvetica" size="1"><b>Password:</b></font></td> <td align="left"><input type="password" name="password" size="7" /></td> </tr> <tr> <td align="center" colspan="2"><input type="submit" value="Login!" /></td> </tr> </table> </form> </p> <?PHP } ?> </td></tr> <tr><td colspan=2><?PHP print("<a href='./board/member.php?s=$session[sessionhash]&action=logout'>Log Out</a>"); ?></td></tr> </table> </body></html> this should work, don't forget to fill in your own path to your board directory in the chdir() routine. |
#8
|
||||
|
||||
I tried the above script. HOwever, I want to use it with cookies, and on a non vB page. The login works fine, but when i got back to the page where I want the login, it doesn't have my username. It still acts like I am not logged in.
|
#9
|
||||
|
||||
Lotus Ims
If you have included the script with the url instead of the path to the file, that's probably why it doesn't work. Amy |
#10
|
|||
|
|||
don't forget to set your cookie domain .mydomain.com (notice the first dot) in your board options
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|