Gossamer Forum
Quote Reply
Review on Home
Hi,
I want put last 5 review on home page,
witch global ???


Thanks in Advance
Bye From Italy
Quote Reply
Re: [fabio] Review on Home In reply to
Code:
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, 30); $short =~ s/\s\S+?$//; $short .= " ..."; $review->{Review_Contents} = $short;}
$output .= Links::SiteHTML::display ('review_new', $review);
last review if ($i>=3);
$i++;
}
return $output;
}

http://www.gossamer-threads.com/...i?post=195161#195161


http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [Ian] Review on Home In reply to
its possible to show link tags alos with this global?
i trying to run <%Title%>, but it wount to show any.

please help.
Quote Reply
Re: [hmc] Review on Home In reply to
You could just change my $search_db = $DB->table('Reviews'); to my $search_db = $DB->table('Reviews','Links');