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

What does jump.cgi actually DO?

Quote Reply
What does jump.cgi actually DO?
Does anybody know if jump.cgi?ID=xxx is supposed to just redirect to the URL of a detail page or a preset field in your database table?
Quote Reply
Re: [scorpioncapital] What does jump.cgi actually DO? In reply to
primarily it jumps the user to the url for that link. but, it also counts click throughs too for that link. one good thing about using it is that you can basically do anything after the user clicks by using plugins and custom code.

r
Quote Reply
Re: [ryel01] What does jump.cgi actually DO? In reply to
so the URL is the url field in your link? I ask because in my system jump.cgi takes the user to the address in a URL field associated with my link and I'm wondering how in the world it "knows" to use that field to jump to - probably it's specified somewhere...
Quote Reply
Re: [scorpioncapital] What does jump.cgi actually DO? In reply to
yip, it uses the URL associated with the link.

When the link calls jump.cgi?ID=25 for eg, it looks up the database for link with ID number 25 and then redirects the user to the URL for that link.

r
Quote Reply
Re: [scorpioncapital] What does jump.cgi actually DO? In reply to
To be more exact;

Code:
my $table_name = $IN->param( 'DB' ) || 'Links';

...and;

Code:
# Jump to a URL, bump the hit counter.
else {
$goto = $rec->{URL};

my $ip = $ENV{REMOTE_HOST} || $ENV{REMOTE_ADDR} || 'None';
my $click_db = $DB->table ('ClickTrack');
my $rows = $click_db->count ( { LinkID => $id, IP => $ip, ClickType => 'Hits' } );
if (! $rows) {
$db->update ( { Hits => \"Hits + 1" }, { ID => $id }, { GT_SQL_SKIP_INDEX => 1 } );
$click_db->insert ( { LinkID => $id, IP => $ip, ClickType => 'Hits', Created => \"NOW()"} );
}

You can see this in admin/Links/Users/Jump.pm.

jump.cgi can do loads of things... i.e show an image, show a file, choose a random link, jump to a custom URL you want..and more. The only thing it doesn't seem to do is jump to the detailed page, whilst incrementing the hit counter. pugdogs 'detailed_page' plugin does this for you.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] What does jump.cgi actually DO? In reply to
How do you make it jump to a custom URL you want using jump.cgi?

OR

given you have a URL in a field called 'myURL' for a link, how can jump.cgi be made to jump to that URL and therefore use it as a way to mask affiliate ID's?
Quote Reply
Re: [scorpioncapital] What does jump.cgi actually DO? In reply to
You would have to modify Jump.pm I think.

Code:
$goto = $rec->{URL};

to...

Code:
if ($IN->param('Field')) {
$goto = $rec->{$IN->param('Field')};
} else {
$goto = $rec->{URL};
}

... and then call it with something like;

jump.cgi?ID=1234&Field=NewField (or leave the Field= bit off if you want to jump to the URL bit).

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] What does jump.cgi actually DO? In reply to
So the field named 'URL' in a Link record is a 'LSQL special field' used by jump?
Quote Reply
Re: [scorpioncapital] What does jump.cgi actually DO? In reply to
No, its not special, but it is required if you want to use jump.cgi to redirect to a site....

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!