Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Top 5 Links display HELP HELP

Quote Reply
Top 5 Links display HELP HELP
Hi all.

Last time we did find 1 global tag that do display top 5 links but we acidentally deleted the code already, now we can not find it back. PLEASE anyone help us.

something like:

<%top_links%>
<%loop top_links_loop%>

&nbsp;&nbsp;&nbsp;-&nbsp doing something

<%endloop%>


Thanks very much.
Quote Reply
Re: [KieuAnh] Top 5 Links display HELP HELP In reply to
Just a case of searching the forum Wink


Code:
sub {
my $tags = shift;
my $table = $DB->table('Links');
$table->select_options ('ORDER BY Hits DESC', 'LIMIT 5');
my $sth = $table->select;
my @output;
while (my $link = $sth->fetchrow_hashref) {
push (@output, $link);
}
return { top5_loop => \@output };
}

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Top 5 Links display HELP HELP In reply to
It's wonderfull Andy. You're the man.

Thanks so so so much