Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [ManuGermany] display new links of a specific category?

Quote Reply
Re: [ManuGermany] display new links of a specific category? In reply to
   
Hi,

since the upgrade to Links3x the code below (and posted earlier in this thread) doesn't work any more.

I'll just get an error and detaild pages weren't build.

I can't work out what the problem since the LinksUpgrade is.

Does anyone here in the forum has a clue?



get_cat_id:

Code:

sub {
my $tags = shift;
my $id = $tags->{'ID'};
my $db = $DB->table ('Category','CatLinks');
$db->select_options('LIMIT 1');
my $catid = $db->select ( { LinkID => $id }, ['ID'] )->fetchrow_array;
return $catid;
}



related_links:

Code:

sub {
my $cat = shift;
my $LinkID= shift;
my $all_ids = $DB->table('Category')->children($cat);
push @$all_ids, $cat;
my $db_obj = $DB->table('Links','CatLinks','Category');
$db_obj->select_options ('ORDER BY Add_Date DESC Limit 4');
my $sth = $db_obj->select (['Links.*'], GT::SQL::Condition->new(
['CategoryID', 'IN', $all_ids],
['Links.ID', '!=', $LinkID, 'isValidated', '=', 'Yes', 'isNew', '=', 'Yes'])
);
my $output = qq~<br>~;
while (my $link = $sth->fetchrow_hashref) {
$link->{'category_url'} = $CFG->{build_root_url}."/".$link->{'Full_Name'}."/";
$link->{'detailed_url'} = "$CFG->{build_detail_url}/$link->{'ID'}$CFG->{build_extension}";
$output .= qq~<CENTER><TABLE WIDTH="80%" BORDER="0" CELLSPACING="0" CELLPADDING="2">~;
$output .= Links::SiteHTML::display('link', $link);
$output .= qq~</TABLE></CENTER>~;
}
return $output;
}




And on the detailed.html:

Code:
<%related_links($get_cat_id, $ID)%>
[/code]
Regards,
Manu

Shopping Portal Shop-Netz.de® | Partnerprogramme | Flugreisen & Billigflüge | KESTERMEDIA e.K. | European Affiliate Marketing Forum.
Subject Author Views Date
Thread display new links of a specific category? antoined 14983 Oct 9, 2004, 9:17 AM
Thread Re: [antoined] display new links of a specific category?
antoined 14271 Oct 12, 2004, 10:43 AM
Thread Re: [antoined] display new links of a specific category?
Andy 14385 Oct 12, 2004, 12:08 PM
Thread Re: [Andy] display new links of a specific category?
antoined 14295 Oct 12, 2004, 2:10 PM
Thread Re: [antoined] display new links of a specific category?
Andy 14537 Oct 13, 2004, 1:29 AM
Thread Re: [Andy] display new links of a specific category?
VishalT 14316 Oct 13, 2004, 9:34 AM
Post Re: [NeedScripts.Com] display new links of a specific category?
Andy 14210 Oct 13, 2004, 9:43 AM
Thread Re: [NeedScripts.Com] display new links of a specific category?
afinlr 14412 Oct 13, 2004, 5:20 PM
Thread Re: [afinlr] display new links of a specific category?
nir 14431 Oct 14, 2004, 2:21 AM
Post Re: [nir] display new links of a specific category?
afinlr 14215 Oct 14, 2004, 11:35 AM
Thread Re: [afinlr] display new links of a specific category?
nir 14353 Nov 1, 2004, 3:31 AM
Thread Re: [nir] display new links of a specific category?
Andy 14364 Nov 1, 2004, 3:49 AM
Thread Re: [Andy] display new links of a specific category?
nir 14224 Nov 1, 2004, 4:56 AM
Thread Re: [nir] display new links of a specific category?
Andy 14200 Nov 1, 2004, 5:17 AM
Thread Re: [Andy] display new links of a specific category?
nir 14145 Nov 1, 2004, 5:30 AM
Thread Re: [nir] display new links of a specific category?
Andy 14288 Nov 1, 2004, 5:51 AM
Thread Re: [Andy] display new links of a specific category?
nir 14106 Nov 1, 2004, 6:21 AM
Post Re: [nir] display new links of a specific category?
Andy 14145 Nov 1, 2004, 6:29 AM
Post Re: [nir] display new links of a specific category?
afinlr 14167 Nov 1, 2004, 6:20 AM
Post Re: [afinlr] display new links of a specific category?
VishalT 14158 Nov 1, 2004, 3:52 AM
Thread Re: [afinlr] display new links of a specific category?
webmaster33 14096 Jul 29, 2005, 5:14 PM
Thread Re: [webmaster33] display new links of a specific category?
afinlr 13989 Jul 30, 2005, 2:22 PM
Thread Re: [afinlr] display new links of a specific category?
webmaster33 14140 Jul 31, 2005, 11:46 AM
Thread Re: [webmaster33] display new links of a specific category?
pugdog 14069 Aug 1, 2005, 9:27 AM
Post Re: [pugdog] display new links of a specific category?
webmaster33 14019 Aug 1, 2005, 9:39 AM
Thread Re: [webmaster33] display new links of a specific category?
Teambldr 12270 Aug 2, 2005, 11:49 PM
Post Re: [Teambldr] display new links of a specific category?
webmaster33 12132 Aug 3, 2005, 1:13 AM
Thread Re: [Teambldr] display new links of a specific category?
webmaster33 12493 Aug 3, 2005, 1:34 AM
Thread Re: [webmaster33] display new links of a specific category?
Teambldr 12799 Aug 3, 2005, 10:40 AM
Post Re: [Teambldr] display new links of a specific category?
webmaster33 12179 Aug 3, 2005, 11:39 AM
Thread Re: [webmaster33] display new links of a specific category?
ManuGermany 12172 Aug 5, 2005, 3:20 AM
Thread Re: [ManuGermany] display new links of a specific category?
webmaster33 12245 Aug 5, 2005, 5:48 AM
Thread Re: [webmaster33] display new links of a specific category?
ManuGermany 12181 Aug 5, 2005, 8:47 AM
Thread Re: [ManuGermany] display new links of a specific category?
webmaster33 12216 Aug 5, 2005, 10:06 AM
Thread Re: [webmaster33] display new links of a specific category?
ManuGermany 12306 Aug 5, 2005, 10:14 AM
Post Re: [ManuGermany] display new links of a specific category?
webmaster33 12137 Aug 5, 2005, 11:24 AM
Thread Re: [ManuGermany] display new links of a specific category?
webmaster33 12204 Aug 5, 2005, 11:47 AM
Thread Re: [webmaster33] display new links of a specific category?
ManuGermany 12156 Aug 6, 2005, 4:51 AM
Post Re: [ManuGermany] display new links of a specific category?
nir 12127 Aug 15, 2005, 5:12 AM
Post Re: [ManuGermany] display new links of a specific category?
ManuGermany 11941 Dec 14, 2006, 4:03 AM
Thread Re: [webmaster33] display new links of a specific category?
Mark2 12043 Mar 6, 2006, 8:15 AM
Thread Re: [Mark2] display new links of a specific category?
webmaster33 12104 Mar 6, 2006, 10:54 AM
Thread Re: [webmaster33] display new links of a specific category?
Mark2 11903 Mar 6, 2006, 12:32 PM
Thread Re: [Mark2] display new links of a specific category?
webmaster33 11943 Mar 6, 2006, 1:01 PM
Thread Re: [webmaster33] display new links of a specific category?
Mark2 12022 Mar 6, 2006, 2:22 PM
Thread Re: [Mark2] display new links of a specific category?
webmaster33 12055 Mar 6, 2006, 3:34 PM
Post Re: [webmaster33] display new links of a specific category?
Mark2 11957 Mar 7, 2006, 7:33 AM
Post Re: [Mark2] display new links of a specific category?
Mark2 11941 Mar 7, 2006, 10:45 AM