Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
603 views
in Q2A Core by
how to place login hyperlink in my website like above top right side near search box ? that is Someone click the login link and continue the previous page ? ex: person visits http://www.question2answer.org/qa/16054/how-to-get-like-us-on-facebook-app-in-your-website and then click the login link in and after login the page redirects to http://www.question2answer.org/qa/16054/how-to-get-like-us-on-facebook-app-in-your-website

actually i test to link in my page

http://www.example.com/qa/login?to=

but no response , the link only go to login page and then redirecting to the homepage

1 Answer

0 votes
by

The solution you find over here: http://www.question2answer.org/qa/20314/implementing-custom-login-how-get-paramter-url-for-redirect

            // loginbox layer with redirect to recent page ?to=
            $request=qa_request();
            $topath=qa_get('to');
            $userlinks=qa_get_login_links(qa_path_to_root(), isset($topath) ? $topath : qa_path($request, $_GET, ''));

            $this->output('<div id="loginBox">
                    <form method="post" action="'.qa_html(@$userlinks['login']).'" id="loginForm">
                     // ...
                    </form>
            </div>');

...