Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Top 10 Resources (by Rating) -- with at least 10 votes

Quote Reply
Top 10 Resources (by Rating) -- with at least 10 votes
I was just checking out the online demo, and noticed that in the Top 10 Resources (by Rating) -- section, the links show up as normal links, not as database links, meaning they won't be tracked by the software for click-thrus... was this intentional or a bug?

------------------
Quote Reply
Re: Top 10 Resources (by Rating) -- with at least 10 votes In reply to
Neither intentional (I don't think) nor a bug, but it certainly can be modified to go through the jump.cgi script (and I have done so in my script).
Quote Reply
Re: Top 10 Resources (by Rating) -- with at least 10 votes In reply to
is it a simple enough fix that you could post? I think I would like to do that to mine before I make it available on my site...
Quote Reply
Re: Top 10 Resources (by Rating) -- with at least 10 votes In reply to
Sure thing. The changes need to be made in sub build_rate_page of nph-build.cgi. Just change this:

Quote:
foreach (sort { $b <=> $a } @top_votes) {
$seen{$_}++;
%link = &array_to_hash ($seen{$_} - 1, @{$top_votes{$_}});
$top_votes .= qq~<tr><td align=center>$link{'Rating'}</td><td align=center>$link{'Votes'}</td><td><a href="$link{'URL'}">$link{'Title'}</a></td></tr>\n~;
}
foreach (sort { $b <=> $a } @top_rate) {
$seen{$_}++;
%link = &array_to_hash ($seen{$_} - 1, @{$top_rate{$_}});
$top_rated .= qq~<tr><td align=center>$link{'Rating'}</td><td align=center>$link{'Votes'}</td><td><a href="$link{'URL'}">$link{'Title'}</a></td></tr>\n~;
}

To this:

Quote:
foreach (sort { $b <=> $a } @top_votes) {
$seen{$_}++;
%link = &array_to_hash ($seen{$_} - 1, @{$top_votes{$_}});
$top_votes .= qq~<tr><td align=center>$link{'Rating'}</td><td align=center>$link{'Votes'}</td><td><a href="$build_jump_url?ID=$link{'ID'}">$link{'Title'}</a></td></tr>\n~;
}
foreach (sort { $b <=> $a } @top_rate) {
$seen{$_}++;
%link = &array_to_hash ($seen{$_} - 1, @{$top_rate{$_}});
$top_rated .= qq~<tr><td align=center>$link{'Rating'}</td><td align=center>$link{'Votes'}</td><td><a href="$build_jump_url?ID=$link{'ID'}">$link{'Title'}</a></td></tr>\n~;
}

I hope this helps.

[This message has been edited by Bobsie (edited March 10, 1999).]