Gossamer Forum
Home : Products : Gossamer Links : Discussions :

redirect after login and rate?

Quote Reply
redirect after login and rate?
How do I get links to redirect folks back to the page they were on before they logged in? For example: a visitor clicks to rate a link, they are not logged in. They must login in order to rate. They login and I'd like them to be redirected back to the page where they were going to rate something. Same thing with submitting a link. I'd liek them to be redirected back to the category page they were on before logging in.

It seems odd that this is not a standard feature of this program. Doesn't it?

Thanks in advance. I appreciate your help!
Quote Reply
Re: [Evoir] redirect after login and rate? In reply to
Nobody knows how to do this? Or is everyone just busy?
Quote Reply
Re: [Evoir] redirect after login and rate? In reply to
It should be sending the user back to the page they were at. Sounds like your login template is missing content. When they get redirected to the login page, it should have a url= in theq query string, which tells login where to send the user after logging in successfully.

Adrian
Quote Reply
Re: [brewt] redirect after login and rate? In reply to
I'm using the default Luna template. No changes. Here it is:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%~if logout and error%>
<%~set message = $error%>
<%~set error = ''%>
<%~endif%>
<%~if url and not error%>
<%~set error = 'You must first login before you can access that.'%>
<%~endif%>
<html>
<head>
<title><%site_title%>: User Login</title>
<%include include_common_head.html%>
</head>
<body id="login">
<%include include_accessibility.html%>
<div id="wrapper">
<%include include_header.html%>
<%include include_contentheader.html%>
<div id="ocwrapper" class="clear">
<div id="icwrapper" class="clear">
<%include include_leftsidebar.html%>
<div id="contentwrapper" class="shadowleft">
<%include include_contentwrapper_top.html%>
<div class="shadowtop"><div class="shadowtopleft"></div><div class="shadowtopright"></div></div>
<div class="shadowright">
<div id="content">
<%include include_content_top.html%>

<div class="crumb"><%Links::Utils::format_title($main_title_loop, separator => $crumb_separator, no_escape_separator => $no_escape_crumb_separator, include_home => 1, link_type => 2)%></div>
<h2>User Login</h2>

<p>Login to <%site_title%>:</p>

<form action="<%config.db_cgi_url%>/user.cgi" method="post">
<input type="hidden" name="login" value="1" />
<%if url%><input type="hidden" name="url" value="<%escape_html url%>" /><%endif%>

<div class="row required clear">
<label for="Username" class="name">Username:</label>
<div class="value">
<input type="text" id="Username" name="Username" value="<%if Username%><%escape_html Username%><%endif%>" class="text" />
</div>
</div>
<div class="row required clear">
<label for="Password" class="name">Password:</label>
<div class="value">
<input type="password" id="Password" name="Password" class="password" />
</div>
</div>
<%~if config.user_sessions eq Cookies%>
<div class="row clear">
<label for="Remember" class="name">Remember Me:</label>
<div class="value">
<input type="checkbox" id="Remember" name="Remember" class="checkbox" />
</div>
</div>
<%~endif%>
<div class="formsubmit">
<input type="submit" value="Login" class="submit" />
</div>
</form>

<p>
If you don't have an account, please <a href="<%config.db_cgi_url%>/user.cgi?signup_form=1">register</a>.<br />
If you've forgotten your password, we can <a href="<%config.db_cgi_url%>/user.cgi?email_pass=1">e-mail it to you</a>.
</p>

<%include include_content_bottom.html%>
</div>
</div>
<div class="shadowbottom"><div class="shadowbottomleft"></div><div class="shadowbottomright"></div></div>
<%include include_contentwrapper_bottom.html%>
</div>
<%include include_rightsidebar.html%>
</div>
</div>
<%include include_contentfooter.html%>
<%include include_footer.html%>
</div>
</body>
</html>

Last edited by:

Evoir: May 25, 2007, 8:48 AM
Quote Reply
Re: [brewt] redirect after login and rate? In reply to
Also, Brewt, when I ask GT for help with this, I was told it would cost $300 to implement this. Which seemed odd, because it should just work, no?
Quote Reply
Re: [brewt] redirect after login and rate? In reply to
Can I get any help on this?
Quote Reply
Re: [Evoir] redirect after login and rate? In reply to
Have you checked whether the referring URL is being passed to the login script in the first place?

Also, can you give us your web address where we can see this happening - might help pin it down?

Cheers,
Shaun
Quote Reply
Re: [qango] redirect after login and rate? In reply to
qango, thanks for the response. I'm so confused.
Quote:
Have you checked whether the referring URL is being passed to the login script in the first place?
I have no idea. I posted the default code that I am using in a post above. The reason I am confused is that when I contacted and asked GT for help with this, they referred me to a GT custom coder who said it would cost $300 to implement this. But, now you all are saying this is the default action? A link would be http://www.queerlist.org. It's a live site. I'd appreciate any help you can offer.
Quote Reply
Re: [Evoir] redirect after login and rate? In reply to
Yes, the url is being passed to user.cgi, so that isn't the problem. Do you have any plugins installed that might be doing something to the login process?

Adrian
Quote Reply
Re: [brewt] redirect after login and rate? In reply to
Mel explained that what I am asking for is different than the stock GLinks.
Quote:
This is not the same thing that you want. What this is referring to is when a user logs in. So if someone goes to for example to "rate a link" and you are requiring login to rate a link, it will make the user log in and then redirect them to the rate a link page. What you are wanting is for a user to be redirected to the previous page after a rating success for example and this is not available in the base version of glinks, so yes, you are asking for something completely different.