2013-01-19, 01:58 AM
I created custom quick login so users don't need to click login link to show username textbox and password. But there's a problem here. When users read a thread and then they sign in using my quick login, they always redirected to index page.
For example users read thread: http://forum.komputer-id.com/Thread-Hell...d=12#pid12
And then they login, They will be redirected to index. I want it redirected to current page (the thread are being read by them).
It's my script:
I know the problem was here:
I know {$mybb->settings['bburl']} is means index page of forum. But I don't know script for current page. Can you tell me html script for current page? So it can make my quicklogin be redirected to page came from.
You can access my forum http://forum.komputer-id.com using username: user123 password: user123.
Try to read a thread and then sign in using username and password I've given. You always redirected to index page
For example users read thread: http://forum.komputer-id.com/Thread-Hell...d=12#pid12
And then they login, They will be redirected to index. I want it redirected to current page (the thread are being read by them).
It's my script:
<form method="post" action="member.php">
<input name="action" type="hidden" value="do_login"/>
<input name="url" type="hidden" value="{$mybb->settings['bburl']}"/>
<input name="quick_login" type="hidden" value="1"/>
<input name="quick_username" id="quick_login_username" type="text" placeholder="{$lang->login_username}" class="textbox text_UserPass"/>
<input name="quick_password" id="quick_login_password" type="password" placeholder="{$lang->login_password}" class="textbox text_UserPass"/> <input name="submit" type="submit" value="{$lang->welcome_login}" class="mylogin_button"> <input name="reg_button" type="button" value="{$lang->welcome_register}" class="register_button" onclick="window.location='{$mybb->settings['bburl']}/member.php?action=register'"/><span class="remember_me"><input name="quick_remember" id="quick_login_remember" type="checkbox" value="yes" class="checkbox"/><label for="quick_login_remember"> {$lang->remember_me}</label></span>
<a href="{$mybb->settings['bburl']}/member.php?action=lostpw" class="lost_password" rel="nofollow">{$lang->lost_password}</a>
</form>
I know the problem was here:
<input name="url" type="hidden" value="{$mybb->settings['bburl']}"/>
I know {$mybb->settings['bburl']} is means index page of forum. But I don't know script for current page. Can you tell me html script for current page? So it can make my quicklogin be redirected to page came from.
You can access my forum http://forum.komputer-id.com using username: user123 password: user123.
Try to read a thread and then sign in using username and password I've given. You always redirected to index page