Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Redirect users after adding new resource

Quote Reply
Redirect users after adding new resource
Using the posting at:

http://gossamer-threads.com/...orum.cgi?post=133381

I have been successful in generating a referring URL but this only works if the user has already logged on.

If the member has to register, or is not logged in, then the login script becomes the referer. How can I pass the URL from Login to Add Resource?

Thanks in advance!

--

Kriis

--

Kriis
Quote Reply
Re: [kriis] Redirect users after adding new resource In reply to
you'd need to pass in a separate tag to hold each url.

One to hold the original URL one to hold the links referrer URL (add).

If the user is logged in, they would be the same, but if the user is not logged in, the Outside_Referrer would hold the users current page, and the URL tag would hold the 'add' value.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Redirect users after adding new resource In reply to
Thanks for the response!

That is what I was trying but the tag from login is showing as unknown when the add screen loads.

On the login page I have:

<input type="hidden" name="ref3" value="<%referer%>">

<%referer%> is a Global set as:

sub {
$ENV{'HTTP_REFERER'}
}

When the login page is loaded after clicking on add resource, the referer is correctly displayed as the category page.

On the add page is the code:

<input type="hidden" name="ref2" value="<%ref3%>">

But this is what I get:

<input type="hidden" name="ref2" value="Unknown Tag: 'ref3'">

When I pass <%ref2%> to <%ref%> on the success page there is no problem but I can't seem to get the tag to pass from login to add.

How come and how can I fix it?

--

Kriis
Quote Reply
Re: [kriis] Redirect users after adding new resource In reply to
PugDog is there really no way to do this?

--

Kriis
Quote Reply
Re: [kriis] Redirect users after adding new resource In reply to
It looks like you are just getting your tags and field names mixed up.

You are using referer, ref2, ref3 and getting in a mess :)

Last edited by:

RedRum: Feb 24, 2002, 2:34 AM
Quote Reply
Re: [RedRum] Redirect users after adding new resource In reply to
Well the thing is that it doesn't matter what tag I use on the login page, it turns up Unknown on the Add page. There doesn't seem to be a way to pass the tag from user.cgi to add.cgi.

--

Kriis

Last edited by:

kriis: Feb 24, 2002, 8:35 AM
Quote Reply
Re: [kriis] Redirect users after adding new resource In reply to
You'd put the referer tag into the login template:

<input type="hidden" name="referer2" value="<%referer%>">

.....then after logging in you can use <%referer2%> to redirect, maybe using a meta-refresh.

Is that what you mean?
Quote Reply
Re: [RedRum] Redirect users after adding new resource In reply to
Meta-Refresh or build it into a hyperlink, yeah exactly.

I saw the post mentioned at the top and it works brilliantly, but only if the user is already logged in. If they have to login the <%referer%> URL becomes that of the login screen.

Of course the part I can't figure out is the good part. How do I pass the referer URL from the login screen to the add resource screen without it becoming an Unknown tag? (Its enough to grind my teeth to powder!Unsure)

--

Kriis