Home : Products : Gossamer Links : Discussions :

Products: Gossamer Links: Discussions: Re: [DogTags] Detailed page as default URL?: Edit Log

Here is the list of edits for this post
Re: [DogTags] Detailed page as default URL?
I tried to copy the ClickTrack code from one section of Jump.pm to the Detailed section of Jump.pm. However, the Hits field is not changing.

The Detailed stuff went from this:

Code:
# Redirect to a detailed page if requested.
if ($CFG->{build_detailed} and $IN->param('Detailed')) {
$goto = $CFG->{build_detail_url} . '/' . $id . $CFG->{build_extension};
}
($goto =~ m,^\w+://,) or ($goto = "http://$goto");
if ($goto) {
print $IN->redirect ($goto);
}

To the following:

Code:
# Redirect to a detailed page if requested.
if ($CFG->{build_detailed} and $IN->param('Detailed')) {
$goto = $CFG->{build_detail_url} . '/' . $id . $CFG->{build_extension};

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()"} );
}


}
($goto =~ m,^\w+://,) or ($goto = "http://$goto");
if ($goto) {
print $IN->redirect ($goto);
}

Could it be that I have the hit stuff in the wrong location? There are no errors so far.

Thanks.

DogTags

------------------------------------------

Last edited by:

DogTags: Oct 28, 2001, 8:31 AM

Edit Log: