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

Re: [aquaman] Latest links on home page

Quote Reply
Re: [aquaman] Latest links on home page In reply to
Try this code:
Code:
sub {
my $cat_id = shift;
my $all_ids = $DB->table('Category')->children($cat_id);
push @$all_ids, $cat_id;
my $link_db = $DB->table('Links','CatLinks','Category');
$link_db->select_options ("ORDER BY Add_Date DESC LIMIT 5");
my $condition = GT::SQL::Condition->new(
'isValidated','=','Yes',
'isNew','=','Yes',
'CategoryID', 'IN', \@$all_ids
);
my $sth = $link_db->select($condition);
my $output;
while (my $link = $sth->fetchrow_hashref) {
$link->{detailed_url} = "$CFG->{build_detail_url}/$link->{'ID'}$CFG->{build_extension}";
$output .= Links::SiteHTML::display ('link_homenew', $link);
}
return $output;
}

Just added the detailed_url tag, and did some code style changes.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Subject Author Views Date
Thread Latest links on home page aquaman 5118 Jul 27, 2005, 11:40 AM
Thread Re: [aquaman] Latest links on home page
aquaman 5029 Jul 29, 2005, 2:15 AM
Post Re: [aquaman] Latest links on home page
afinlr 4981 Jul 29, 2005, 1:47 PM
Post Re: [aquaman] Latest links on home page
webmaster33 4981 Jul 29, 2005, 5:27 PM
Thread Re: [aquaman] Latest links on home page
webmaster33 4974 Jul 31, 2005, 12:20 PM
Thread Re: [webmaster33] Latest links on home page
BLOOD 4814 Jan 10, 2006, 2:46 AM
Thread Re: [BLOOD] Latest links on home page
webmaster33 4753 Jan 15, 2006, 8:58 AM
Post Re: [webmaster33] Latest links on home page
BLOOD 4769 Jan 15, 2006, 9:09 AM
Thread Re: [webmaster33] Latest links on home page
Payooo 4797 Jan 11, 2006, 9:14 PM
Post Re: [Payooo] Latest links on home page
webmaster33 4769 Jan 15, 2006, 8:57 AM