Home : Products : Gossamer Links : Discussions :

Products: Gossamer Links: Discussions: Re: [nir] Duplication link at new link page: Edit Log

Here is the list of edits for this post
Re: [nir] Duplication link at new link page

Try this:

sub {
# Displays the Last X new links.
my $new_nr = shift;
my $search_db = $DB->table('Links');

$search_db->select_options ("ORDER BY Add_Date DESC Limit $new_nr");

my $sth = $search_db->select ( { isNew => 'Yes', isValidated => 'Yes' });

my $seen;
my $output;
while (my $link = $sth->fetchrow_hashref) {
if ($seen->{$link->{ID})) { next }
$link->{'category_url'} = $CFG->{build_root_url}."/".$link->{'Full_Name'}."/";
$link->{'detailed_url'} = "$CFG->{build_detail_url}/$link->{'ID'}$CFG->{build_extension}";
$output .= Links::SiteHTML::display ('link', $link);
$seen->{$link->{ID}} = 1;
return $output;

(bits in red are new code)


Andy (mod)
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!

Last edited by:

Andy: Sep 5, 2007, 7:13 AM

Edit Log: