Gossamer Forum
Quote Reply
Last link on home page
I'm using this to show last 8 links on homepage:

sub {
# Displays the newest links on the home page.
my ($output,$sth,$link);
my $search_db = $DB->table('Links');
$search_db->select_options ('ORDER BY ADD_DATE DESC Limit 8');
$sth = $search_db->select ( { isNew => 'Yes'});
while ($link = $sth->fetchrow_hashref) {
$link->{Title} =~ s,^(.{20}).*$,$1...,;
$output .= Links::SiteHTML::display ('link1', $link);
}
return $output;
}

but it show also the unvalidated links why ???

Thanks


Thanks in Advance
Bye From Italy
Quote Reply
Re: [fabio] Last link on home page In reply to
As long as you don't have any paid links that can expire while they are still new (I guess this is unlikely unless you are paying per week) you just need to add this:

$sth = $search_db->select ( { isNew => 'Yes', isValidated => 'Yes'});
Quote Reply
Re: [afinlr] Last link on home page In reply to
Thanks afinlr


Thanks in Advance
Bye From Italy