Gossamer Forum
Quote Reply
New Reviews by Category
Is there a way to show new/latest reviews by category? So as I drill down through the categories the reviews are displayed just for that category and it's children.

Currently I'm using this global to show new reviews for the whole database:

sub {
# Displays the newest links on the home page.
my ($output, $sth, $review);
my $search_db = $DB->table('Reviews');
$search_db->select_options ('ORDER BY Review_Date DESC');
$sth = $search_db->query_sth ( { Review_Validated => 'Yes' });
my $i=1;
review: while ($review = $sth->fetchrow_hashref) {
my $desc = $review->{Review_Contents};
unless (length $desc <= 30) {my $short = substr ($desc, 0, 200); $short =~ s/\s\S+?$//; $short .= " ..."; $review->{Review_Contents} = $short;}
$output .= Links::SiteHTML::display ('review_new', $review);
last review if ($i>=3);
$i++;
}
return $output;
}
Subject Author Views Date
Thread New Reviews by Category pshadow 2698 Oct 1, 2005, 12:44 PM
Thread Re: [pshadow] New Reviews by Category
pshadow 2588 Oct 1, 2005, 5:57 PM
Thread Re: [pshadow] New Reviews by Category
rascal 2412 Jun 23, 2006, 10:29 PM
Post Re: [rascal] New Reviews by Category
rascal 2383 Jun 24, 2006, 11:46 AM