I
I use the following global to display the links from a category in the detailed page
sub {
my $tags = shift;
my ($cat_id, $cat_name) = each %{$DB->table('Links')->get_categories($tags->{ID})};
my $link_db = $DB->table('Links','CatLinks');
$link_db->select_options("ORDER BY $CFG->{build_sort_order_category}");
my $sth = $link_db->select({ CategoryID => $cat_id });
my $output = '';
while (my $link = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display('link', $link);
}
return $output;
}
It works fine but I would like 3 more things :
- I only want to display the last five links added of the specified category
- I just want to display the validated links
- In the last links, I don't want to see the link of the detailed link page
Txs for your help
regards
FMP
I use the following global to display the links from a category in the detailed page
sub {
my $tags = shift;
my ($cat_id, $cat_name) = each %{$DB->table('Links')->get_categories($tags->{ID})};
my $link_db = $DB->table('Links','CatLinks');
$link_db->select_options("ORDER BY $CFG->{build_sort_order_category}");
my $sth = $link_db->select({ CategoryID => $cat_id });
my $output = '';
while (my $link = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display('link', $link);
}
return $output;
}
It works fine but I would like 3 more things :
- I only want to display the last five links added of the specified category
- I just want to display the validated links
- In the last links, I don't want to see the link of the detailed link page
Txs for your help
regards
FMP