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 =>
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> <a href="<%db_cgi_url%>/rate.cgi?ID=<%ID%>">Rate It</a>
<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
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> <a href="<%db_cgi_url%>/rate.cgi?ID=<%ID%>">Rate It</a>
<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