Home : Products : Gossamer Links : Development, Plugins and Globals :

Products: Gossamer Links: Development, Plugins and Globals: Re: [kzap] Hotscripts type of new listings ?: Edit Log

Here is the list of edits for this post
Re: [kzap] Hotscripts type of new listings ?
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)&nbsp;~;
}
return $output;
}

Last edited by:

afinlr: Oct 4, 2003, 7:39 AM

Edit Log: