Think this should work for all new links - takes a little modification to show new links per date:
sub {
my $output;
my $cat_db = $DB->table('Category');
$cat_db->select_options('ORDER BY Full_Name');
my $sth = $cat_db->select ( {'FatherID' => 0}, ['ID','Full_Name','Name'] );
while (my ($id,$cat,$heading) = $sth->fetchrow_array) {
my $all_ids = $DB->table('Category')->children($id);
my $link_db = $DB->table('Links','CatLinks');
my $condition = GT::SQL::Condition->new( 'isValidated','=','Yes','isNew','=','Yes','CategoryID', 'IN', $all_ids);
my $count = $link_db->count($condition);
my $url = $cat_db->as_url($cat);
$output .= qq~<a href="$CFG->{build_root_url}/$url">$heading</a> ($count) ~;
}
return $output;
}
sub {
my $output;
my $cat_db = $DB->table('Category');
$cat_db->select_options('ORDER BY Full_Name');
my $sth = $cat_db->select ( {'FatherID' => 0}, ['ID','Full_Name','Name'] );
while (my ($id,$cat,$heading) = $sth->fetchrow_array) {
my $all_ids = $DB->table('Category')->children($id);
my $link_db = $DB->table('Links','CatLinks');
my $condition = GT::SQL::Condition->new( 'isValidated','=','Yes','isNew','=','Yes','CategoryID', 'IN', $all_ids);
my $count = $link_db->count($condition);
my $url = $cat_db->as_url($cat);
$output .= qq~<a href="$CFG->{build_root_url}/$url">$heading</a> ($count) ~;
}
return $output;
}