Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Go to Appropriate Page after Signup for Reviews

Quote Reply
Go to Appropriate Page after Signup for Reviews
Hi-

Does anyone know if it's possible to have a user get redirected back to the page where they wanted to complete their action after signup as a user?

What I mean, is if a visitor wants to write a review, they are instructed to signup first before they can add the review. After they signup, they are basically left at the page that says tells them they have successfully signed up. Then they need to once again find the link where they want to add the review. It would be great if they could be automatically logged in after signup as a user, and then directed to the add review page for the link they were originally trying to review.

So, the visitor would click on the Add Review for a specific link, then be told to signup if they aren't already a registered user, then after signup they would automatically go to the page where they could add their review for that specific link. I really want to make it as fast and easy as possible for new users to add reviews. Does anyone know if something like this would be possible?

Or, alternatively, is there any way that guests could add reviews without needing to signup as users?

--Frank
Quote Reply
Re: [FrankM] Go to Appropriate Page after Signup for Reviews In reply to
You could replace your signup_success.html with something like this:

Code:
<html>

<head>
<script language="javascript">
alert("You have sucessfully logged in");
history.go(-2);
</script>
<title><%site_title%>: Logged in</title>
</head>
<body>

</body>
</html>

Klaus

http://www.ameinfo.com
Quote Reply
Re: [klauslovgreen] Go to Appropriate Page after Signup for Reviews In reply to
Thanks Klaus, I'll give that a try, I appreciate your help. Also, I just noticed that you don't need to require the reviewer to be a registered user by setting user_review_required to "No".

--Frank
Quote Reply
Re: [klauslovgreen] Go to Appropriate Page after Signup for Reviews In reply to
Klaus:

Interesting thought - I wonder if this will work with the Community Plugin? I'll have to experiment.

Regards,



Clint.
--------------------------
http://AffiliatesDirectory.com
The Affiliate Programs Directory
Quote Reply
Re: [Clint] Go to Appropriate Page after Signup for Reviews In reply to
It does work with Community too.

Sometimes you might want just to go back to the previous page then use -1

The original idea was not mine sadly - Paul came up with it at some point for me as I primarily use it when users are adding links to the MyLinks plugin

Klaus

http://www.ameinfo.com
Quote Reply
Re: [FrankM] Go to Appropriate Page after Signup for Reviews In reply to
Hi,

I just tried a few Links 2.11+ sites, and they both handled redirection after login properly, for add, modify, rate and review.

Perhaps you are missing the line in your login.html

<%if url%>
<p>You must first login before you can access that.</p>
<input type="hidden" name="url" value="<%url%>">
<%endif%>

Or, if you have that line, perhaps, you might make a change to User::Login.pm

Code:
sub login_user {
# --------------------------------------------------------
# Logs a user in, and creates a session ID.
#
my $username = $IN->param('Username') || shift;
my $password = $IN->param('Password') || shift;
my $goto = shift || 'login_success';

$goto should maybe have the same courtesy as the other
variables, and be:

my $goto = $IN->param('url') || 'login_success';

It makes it more specific, but might miss legacy "goto" fields. "shift" should only be used on internal routines, where you _know_ what is being passed in, and where it should be in the array.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Go to Appropriate Page after Signup for Reviews In reply to
Thanks Pugdog. I also use Links SQL 2.1.1. Actually you're right, it will redirect properly if you already have a user name and password, and login after clicking on the Add Review link. But, if you aren't already a user, then you still need to go to the signup form, and then can sign up and then log in, but in this case you won't get back to the review form for the link you were originally trying to review. I'm not sure if your code change for Login.pm would address this (?)

I know it's a relatively small point and users can simply use the back button on their browser (or the very helpful javascript modification posted by Klaus can also be used). It's often hard to get people to write reviews, so I just wanted to make it as convenient and straightforward as possible for them to do so. Right now, I'm simply not limiting reviews to users, and letting guests add their reviews, so that nothing slows them down.

--Frank
Quote Reply
Re: [FrankM] Go to Appropriate Page after Signup for Reviews In reply to
I moved my sign up form onto the same page as the login - anything to remove barriers to people signing up! - and the redirection does work on my site.

I'm not sure about this but I would assume that you just need to make sure that you have

<input type="hidden" name="url" value="<%url%>">

somewhere in your signup form and on the link to your signup form from the login page add

<%if url%>&url=<%url%><%endif%>
Quote Reply
Re: [afinlr] Go to Appropriate Page after Signup for Reviews In reply to
Great Idea! I'll try that. Thanks very much.

--Frank
Quote Reply
Re: [afinlr] Go to Appropriate Page after Signup for Reviews In reply to
Hi,

You beat me to that suggestion :) It's one page too deep, and I don't think anything but Username and Email and Error are passed on. It would be a code change to pass the $IN hash, as $input which I'm not sure why it's not done, since while most passed in data would be *completely* ignored, even on a hack attempt, it would still be able to pick off the data that was *not* -- such as custom fields or 'url'.

But, for me, since I have the validate by email option set, returning to the original page is sort of moot. I'd have to carry that through to the email........ Hmmmm...... <G>

Not passing along $input in Login.pm is another inconsistency in Links, that maybe Alex/GT will address down the road.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.