Gossamer Forum
Home : Products : Links 2.0 : Installation -- Unix :

Problem with Top Sites - Please Help

Quote Reply
Problem with Top Sites - Please Help
My search engine works flawless with the exception of the Top sites page. I have it setup to take the top 10 sites only.

My code looks like this in my template:

<!-- CHANGE START -->

<p><strong>Top 10 Resources (by Rating) -- with at least 10 votes</strong></p>

<div class=margin>
<table border=0>
<tr><th><strong>Rating</strong></th><th><strong># Votes</strong></th><th align=left><strong>Resource</strong></th></tr>

<%top_rated%>

</table>
</div>

<p><strong>Top 10 Resources (by Votes) -- with at least 10 votes</strong></p>
<div class=margin>
<table border=0>
<tr><th><strong>Rating</strong></th><th><strong># Votes</strong></th><th align=left><strong>Resource</strong></th></tr>

<%top_votes%>

</table>
</div>

<!-- CHANGE END -->

My search engine is at http://www.hitemup.com/search/

The <%top_rated%> and <%top_votes%>
dont' seem to return anything when the template gets built. Any ideas on what's wrong ?
Quote Reply
Re: Problem with Top Sites - Please Help In reply to
hi,

look for this in nph-build.cgi and modify it how you like. Wink

Quote:
$top_rated = ''; $top_votes = '';

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~;
}
open (RATE, ">$build_ratings_path/$build_index") or &cgierr ("unable to open top rated page: $build_ratings_path/$build_index. Reason: $!");
print "\tVote Range: $top_votes[0] .. $top_votes[$#top_votes]\n";
print "\tRate Range: $top_rate[0] .. $top_rate[$#top_rate]\n";
print RATE &site_html_ratings;
close RATE;

------------------
ciao
Nicky
mse.nicky.net
www.nicky.net/forum german forum for GT Links



[This message has been edited by Nicky (edited December 09, 1999).]
Quote Reply
Re: Problem with Top Sites - Please Help In reply to
Thanks for the reply but the problem is, it doesn't list any top sites at all. I don't need to edit it, I need it to work. Any ideas ?
Quote Reply
Re: Problem with Top Sites - Please Help In reply to
Hello there!

Have tried customizing the rates and hits of the sites using admin.cgi so that it will be included in your top sites? There is a minimum number of votes or sites hits before it will show up in the top sites.