MyBB Community Forums

Full Version: About login redirect
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello

I want to do this:

A user enters the forum site without login (like a guest) and he/she opens a thread (like showthread.php?tid=1) and he/she decides to login. Then he/she login from navbar loginbox. After login, He/she redirects the index.php page.

How can I make the user redirects "showthread.php?tid=1" page?

Thank you.
theman80 Wrote:Hello

I want to do this:

A user enters the forum site without login (like a guest) and he/she opens a thread (like showthread.php?tid=1) and he/she decides to login. Then he/she login from navbar loginbox. After login, He/she redirects the index.php page.

How can I make the user redirects "showthread.php?tid=1" page?

Thank you.

That's not true. It redirects you to the place you were in. So basicaly it redirects you back to the thread.
try it again and see.
zaher1988 Wrote:That's not true. It redirects you to the place you were in. So basicaly it redirects you back to the thread.
try it again and see.

Yes, you are right, my bad.

But I found a bug I think.

When I try to login from navbar loginbox on "member.php?action=register" page, it logins and redirects to "member.php?action=register" and an error message says "you are already member....".
Can you fix this please?
It doesn't happen to me. I click register then click login i login and on the indexBig Grin ..?? double check it.
zaher1988 Wrote:It doesn't happen to me. I click register then click login i login and on the indexBig Grin ..?? double check it.

But you must login from NAVBAR LOGINBOX when you are on "member.php?action=register" page.
By default there is no login box in the header, so this is not a bug.
zaher1988 Wrote:By default there is no login box in the header, so this is not a bug.

You are right.
But can you fix this anyway?
Because I think I can't remove navbar loginbox on "member.php?action=register" page.
I need to see the HTML code of the box 1st.
zaher1988 Wrote:I need to see the HTML code of the box 1st.

HTML code of navbar loginbox is here:

<form action="member.php" method="post">
<input type="hidden" name="action" value="do_login" />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><span class="smalltext">{$lang->login_username}</span></td>
<td><input type="text" class="textbox" SIZE="15" name="username" title="{$lang->login_username}" value="{$lang->login_username}" onfocus="this.value=''" /></td>
</tr>
<tr>
<td><span class="smalltext">{$lang->login_password}</span></td>
<td><input type="password" class="textbox" SIZE="15" name="password" title="{$lang->login_password}" value="{$lang->login_password}" onfocus="this.value=''" />&nbsp;<input type="submit" class="button" name="submit" value="{$lang->login}" /></td>
</tr>
</table>
</form>

Thank you.
Well after looking at your template code.
And after looking at MyBB member.php code, checking the redirect after login.
And after testing the modification.

I conclude that even in this what you are saying isn't true... unless member.php in your case has a different name or you have changed things in it.