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

Re: [kzap] Hotscripts type of new listings ?

Quote Reply
Re: [kzap] Hotscripts type of new listings ? In reply to
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
Subject Author Views Date
Thread Hotscripts type of new listings ? incik 5295 Jul 28, 2002, 7:44 PM
Thread Re: [incik] Hotscripts type of new listings ?
Ian 5144 Jul 31, 2002, 1:33 PM
Thread Re: [Ian] Hotscripts type of new listings ?
incik 5119 Aug 6, 2002, 9:42 PM
Thread Re: [incik] Hotscripts type of new listings ?
xpert 5058 Sep 9, 2002, 4:54 PM
Thread Re: [xpert] Hotscripts type of new listings ?
webmaster33 5025 Sep 10, 2002, 3:38 AM
Thread Re: [webmaster33] Hotscripts type of new listings ?
blakeb 4923 Mar 3, 2003, 7:38 PM
Thread Re: [blakeb] Hotscripts type of new listings ?
kzap 4675 Oct 3, 2003, 11:12 PM
Thread Re: [kzap] Hotscripts type of new listings ?
afinlr 4691 Oct 4, 2003, 7:24 AM
Thread Re: [afinlr] Hotscripts type of new listings ?
kzap 4655 Oct 5, 2003, 12:03 AM
Thread Re: [kzap] Hotscripts type of new listings ?
afinlr 4634 Oct 5, 2003, 5:51 AM
Post Re: [afinlr] Hotscripts type of new listings ?
kzap 4622 Oct 5, 2003, 12:24 PM