Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Minor jump.cgi mod for internal jumps

Quote Reply
Minor jump.cgi mod for internal jumps
If you've wanted to jump to local pages, and you have some scripts that can't be easily edited to use <%if%> etc in the templates, you can edit the bottom of jump.pm to be:

Code:

($goto =~ m,^\w+://,) or ($goto = "http://$goto");
if ($goto eq 'http://' ) {
print $IN->redirect ("$CFG->{'db_cgi_url'}/detail_page.cgi?ID=$id" );
} elsif ($goto){
print $IN->redirect ($goto);
}
else {


What you do is change the ending if/else construct to add the elsif, and put the first test for the null "http://" or whatever you use.

That way, if jump.cgi is called, and the URL is just an internal reference, with a detail page, or long description, the call won't return an error.

If your scripts use the template parser, you can do the test in the templates, but I've hit a few cases where hard coding this behaviour saves a lot of editing templates.

And, if you eventually edit the templates, no foul, or harm done.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Subject Author Views Date
Thread Minor jump.cgi mod for internal jumps pugdog 10686 Feb 2, 2005, 12:49 PM
Thread Re: [pugdog] Minor jump.cgi mod for internal jumps
MJB 10259 Jun 4, 2009, 1:37 PM
Thread Re: [MJB] Minor jump.cgi mod for internal jumps
Andy 10254 Jun 4, 2009, 11:31 PM
Thread Re: [Andy] Minor jump.cgi mod for internal jumps
MJB 10223 Jun 5, 2009, 2:31 AM
Thread Re: [MJB] Minor jump.cgi mod for internal jumps
Andy 10262 Jun 5, 2009, 2:34 AM
Thread Re: [Andy] Minor jump.cgi mod for internal jumps
MJB 10220 Jun 5, 2009, 2:41 AM
Thread Re: [MJB] Minor jump.cgi mod for internal jumps
Andy 10248 Jun 5, 2009, 2:48 AM
Thread Re: [Andy] Minor jump.cgi mod for internal jumps
MJB 10214 Jun 5, 2009, 3:02 AM
Thread Re: [MJB] Minor jump.cgi mod for internal jumps
Andy 10260 Jun 5, 2009, 3:07 AM
Thread Re: [Andy] Minor jump.cgi mod for internal jumps
MJB 9998 Aug 4, 2009, 5:34 AM
Thread Re: [MJB] Minor jump.cgi mod for internal jumps
Andy 9985 Aug 4, 2009, 5:37 AM
Thread Re: [Andy] Minor jump.cgi mod for internal jumps
MJB 9997 Aug 4, 2009, 6:06 AM
Thread Re: [MJB] Minor jump.cgi mod for internal jumps
Andy 10015 Aug 4, 2009, 6:32 AM
Thread Re: [Andy] Minor jump.cgi mod for internal jumps
MJB 9970 Aug 4, 2009, 6:45 AM
Post Re: [MJB] Minor jump.cgi mod for internal jumps
Andy 9980 Aug 4, 2009, 6:48 AM