Gossamer Forum
Home : Products : Links 2.0 : Customization :

Top Rating Modification?

Quote Reply
Top Rating Modification?
I was wondering how I can modify my most popular sites to mirror the format of http://www.praize.com/engine/Ratings/ I like the lay out of it so I was wondering if it's possible and if so how?
Quote Reply
Re: [LordStryfe] Top Rating Modification? In reply to
Their source code looks like so:

<div class="crumb"><a href="http://www.praize.com/engine/index.html">Home</a> &gt; <span class="lasttitle">Top Rated Links</span></div>
<h2>Top Rated Links</h2>
<h3 class="noseparator">Top 10 by rating (10 or more votes)</h3>
<table class="ftable">
<tr>
<th class="ftablecol">Rating</th>
<th class="ftablecol">Votes</th>
<th>Link</th>
</tr>
<tr>
<td class="ftablecol">10.00</td>
<td class="ftablecol">23</td>
<td><a href="http://www.praize.com/engine/info/Don_Love_Ministries_L1510.html">Don Love Ministries</a></td>
</tr>

You need to make changes in nph-build.cgi, sub buils_rate_page, which in stock form looks like this:

$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~;

Change it to this:

$top_votes .= qq~<tr><td class="ftablecol">$link{'Rating'}</td><td class="ftablecol" >$link{'Votes'}</td><td><a href="$link{'URL'}">$link{'Title'}</a></td></tr>\n~;

Do the same for the top_rated code (in the same sub routine).

Then change the rate-top.html template. This is the original:

<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>

New:

<h3 class="noseparator">Top 10 by rating (10 or more votes)</h3>
<table class="ftable">
<tr>
<th class="ftablecol">Rating</th>
<th class="ftablecol">Votes</th>
<th>Link</th>
</tr>
<%top_rated%>
</table>

Then you need to "borrow" their CSS (http://www.praize.com/...c/luna/luna_core.css) and add this to your CSS file:

.ftable {
margin-top: 5px;
border-bottom: 3px solid #bbbfa1;
border-collapse: collapse;
width: 100%;
/* ie5-5.5 don't inherit the font style properly */
font-size: 11px;
}

.ftable th {
background: #bbbfa1;
text-align: left;
}
.ftable th, .ftable td {
padding: 3px 5px;
}
.ftablecol {
border-right: 1px solid #bbbfa1;
}

#content h3 {
margin: 25px 0px 0px 0px;
padding: 5px 0px 0px 0px;
border-bottom: 1px dotted #bbbfa1;
}
#content h3.noseparator {
border-bottom: none;
}

Well, that's most of it, but I'm sure you will need to make adjustments...


Leonard
aka PerlFlunkie