Login From Another Site?
#1
Is it possible to make it so your users can log in from another website. Like just have a login box and once they go to the forum they are logged in.

I'm kind of a newb to MyBB.
#2
Welcome to MyBB!
Sure, you can integrate it:
http://community.mybboard.net/showthread.php?tid=6190
#3
You can do that. Insert the below HTML/PHP code snippet where you would like to have the login forms.
<form action="http://domain/MyBBforums/member.php" method="post">
<table border="0" cellspacing="1" cellpadding="4" class="tborder">
<tr>
<td class="thead" colspan="2"><strong>Login</strong></td>

</tr>
<tr>
<td class="trow1"><strong>Username:</strong></td>
<td class="trow1"><input type="text" class="textbox" name="username" size="25" maxlength="30" style="width: 200px;" /></td>
</tr>
<tr>
<td class="trow2"><strong>Password:</strong><br /><span class="smalltext">Please note that passwords are case sensitive.</span></td>
<td class="trow2"><input type="password" class="textbox" name="password" size="25" style="width: 200px;" /></td>
</tr>
</table>

<br />
<div align="center"><input type="submit" class="button" name="submit" value="Login" /></div>
<input type="hidden" name="action" value="do_login" />
<?php
$domain=$_SERVER['HTTP_HOST'];$relativePath=$_SERVER["PHP_SELF"];
$curpurl=$domain$relativePath;


?>
<input type="hidden" name="url" value="<?php echo $curpurl; ?>" />
</form>


#4
Neither seem to be working too well. Sad
#5
Remove the MyBB bold tags from the form action.

@ Rohan
Thanks
Working great!
#6
Two questions:

1.) Is there any way so that once they hit the Login button it goes back to the page they were on?
2.) After they have logged in, can it show their user name and have a logout button?
#7
Anybody?
#8
jordanlw Wrote:Remove the MyBB bold tags from the form action.

@ Rohan
Thanks
Working great!

Thank you pointing it out. Done that now!
#9
Hockey Foo Wrote:Two questions:

1.) Is there any way so that once they hit the Login button it goes back to the page they were on?
I have made some changes in the code posted above in post#3. Use it now. Remember to change the action attribute in the first line of the code.

Hockey Foo Wrote:2.) After they have logged in, can it show their user name and have a logout button?
You will have to use cookies. Do you know how to play around with cookies?
#10
Rohan Shenoy Wrote:
Hockey Foo Wrote:Two questions:

1.) Is there any way so that once they hit the Login button it goes back to the page they were on?
I have made some changes in the code posted above in post#3. Use it now. Remember to change the action attribute in the first line of the code.

Hockey Foo Wrote:2.) After they have logged in, can it show their user name and have a logout button?
You will have to use cookies. Do you know how to play around with cookies?

No, I don't know much about cookies.


Forum Jump:


Users browsing this thread: 1 Guest(s)