Gossamer Forum
Quote Reply
Top 100 2.2.1 > 3.0.4
Hi, I've been using this global here. I'm in the process of upgrading to 3.0.4 and while the global seems to function ok. I got problems with new, updated, and popular all showing up (that I know how to change but am wondering why they do all appear) what I can't figured out is the numbering which I would like to have appear. The ol's and li's do appear where they should be when viewing the source code. Could this be css related?

top_100 =>
Code:

sub {
# Displays the top 100 links in descending order.
my $tags = shift;
my $table = $DB->table('Links');
$table->select_options ('ORDER BY Hits DESC', 'LIMIT 100');
my $sth = $table->select;
my @output;
while (my $link = $sth->fetchrow_hashref) {
push (@output, $link);
}
return { top100_loop => \@output };
}

COOL.HTML (from 2.2.1) This works!

<%top_100%>
<%body_font%>
<ol><%loop top100_loop%>
<li>
<%-- <b><a href="<%URL%>"><%Title%></a></b><br> --%>
<b><%body_font%><a href="<%db_cgi_url%>/jump.cgi?ID=<%ID%>"><%Title%></a></font></b><br>
<%if Description%>
<%body_font%><%Description%></font><br>
<%endif%>
<%if URL%>
<font face="Verdana,Helvetica" size="2" color="#008000"><small><%URL%></small></font><br>
<%endif%>
<small>(Added: <%Add_Date%> Hits: <%Hits%> Rating: <%Rating%> Votes: <%Votes%>)</small>
<%if isValidated eq 'Yes'%>
<small>&nbsp; <a href="<%db_cgi_url%>/rate.cgi?ID=<%ID%>">Rate It</a>
&nbsp; <a href="<%db_cgi_url%>/review.cgi?ID=<%ID%>&add_review=1">Review It</a></small><br><br>
<%endif%>
</li>
<%endloop%></ol>

COOL.HTML DEFAULT (from 3.0.4)

<%loop link_results_loop~%>
<p class="category"><%Links::Utils::format_title($title_loop, separator => $category_separator, no_escape_separator => $no_escape_category_separator, include_home => 0, link_type => 1)%></p>
<%include link.html%>
<%~endloop%>

COOL.HTML MODIFIED (from 3.0.4)

<%top_100%>
<ol><%-- <%loop link_results_loop~%>--%><%loop top100_loop~%><li>
<%-- <p class="category"><%Links::Utils::format_title($title_loop, separator => $category_separator, no_escape_separator => $no_escape_category_separator, include_home => 0, link_type => 1)%></p> --%>
<%include link.html%> WORKS! - ALSO TESTED WITH CONTENTS (modified) FROM LINK.HTML
<%-- <b><%Title%>: <%Hits%></b> --%> TESTED
</li><%~endloop%></ol>

Sincerely,

Rob Wesley
Aboriginal Connections (Indigenous Peoples Worldwide)
robwesley@aboriginalconnections.com
Web Directory | Forums

Last edited by:

wesley: Dec 19, 2005, 9:59 PM
Subject Author Views Date
Thread Top 100 2.2.1 > 3.0.4 wesley 3485 Dec 19, 2005, 9:54 PM
Thread Re: [wesley] Top 100 2.2.1 > 3.0.4
Andy 3385 Dec 20, 2005, 1:12 AM
Thread Re: [Andy] Top 100 2.2.1 > 3.0.4
wesley 3378 Dec 20, 2005, 3:07 PM
Thread Re: [wesley] Top 100 2.2.1 > 3.0.4
Andy 3363 Dec 21, 2005, 1:17 AM
Thread Re: [Andy] Top 100 2.2.1 > 3.0.4
wesley 3392 Dec 21, 2005, 11:01 AM
Post Re: [wesley] Top 100 2.2.1 > 3.0.4
Andy 3331 Dec 22, 2005, 1:24 AM