Hi,
Sure.
Just change:
my $table = $DB->table('Links');
$table->select_options ('ORDER BY ID DESC', "LIMIT $_[0]");
my $sth = $table->select( { isNew => 'Yes', isValidated => 'Yes' }) || die $GT::SQL::error;
my @output;
while (my $hit = $sth->fetchrow_hashref) {
if ($hit->{isNew} eq "Yes") { $hit->{isNew} = 1; } else { $hit->{isNew} = 0; }
if ($hit->{isPopular} eq "Yes") { $hit->{isPopular} = 1; } else { $hit->{isPopular} = 0; }
if ($hit->{isChanged} eq "Yes") { $hit->{isChanged} = 1; } else { $hit->{isChanged} = 0; }
push (@output, $hit);
}
return { Latest_Links_Loop => \@output };
}
..to:
my $table = $DB->table('Links');
$table->select_options ('ORDER BY ID DESC', "LIMIT $_[0]");
my $sth = $table->select( { isNew => 'Yes', isValidated => 'Yes' }) || die $GT::SQL::error;
my @output;
while (my $hit = $sth->fetchrow_hashref) {
if ($hit->{isNew} eq "Yes") { $hit->{isNew} = 1; } else { $hit->{isNew} = 0; }
if ($hit->{isPopular} eq "Yes") { $hit->{isPopular} = 1; } else { $hit->{isPopular} = 0; }
if ($hit->{isChanged} eq "Yes") { $hit->{isChanged} = 1; } else { $hit->{isChanged} = 0; }
if ($CFG->{build_detailed}) {
$hit->{detailed_url} = $CFG->{build_root_url} . "/" . $DB->table('Links')->detailed_url( $hit->{ID} );
}
push (@output, $hit);
}
return { Latest_Links_Loop => \@output };
}
Cheers
Andy (mod)
andy@ultranerds.co.uk
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!
Sure.
Just change:
Code:
sub Latest_New_Links { my $table = $DB->table('Links');
$table->select_options ('ORDER BY ID DESC', "LIMIT $_[0]");
my $sth = $table->select( { isNew => 'Yes', isValidated => 'Yes' }) || die $GT::SQL::error;
my @output;
while (my $hit = $sth->fetchrow_hashref) {
if ($hit->{isNew} eq "Yes") { $hit->{isNew} = 1; } else { $hit->{isNew} = 0; }
if ($hit->{isPopular} eq "Yes") { $hit->{isPopular} = 1; } else { $hit->{isPopular} = 0; }
if ($hit->{isChanged} eq "Yes") { $hit->{isChanged} = 1; } else { $hit->{isChanged} = 0; }
push (@output, $hit);
}
return { Latest_Links_Loop => \@output };
}
..to:
Code:
sub Latest_New_Links { my $table = $DB->table('Links');
$table->select_options ('ORDER BY ID DESC', "LIMIT $_[0]");
my $sth = $table->select( { isNew => 'Yes', isValidated => 'Yes' }) || die $GT::SQL::error;
my @output;
while (my $hit = $sth->fetchrow_hashref) {
if ($hit->{isNew} eq "Yes") { $hit->{isNew} = 1; } else { $hit->{isNew} = 0; }
if ($hit->{isPopular} eq "Yes") { $hit->{isPopular} = 1; } else { $hit->{isPopular} = 0; }
if ($hit->{isChanged} eq "Yes") { $hit->{isChanged} = 1; } else { $hit->{isChanged} = 0; }
if ($CFG->{build_detailed}) {
$hit->{detailed_url} = $CFG->{build_root_url} . "/" . $DB->table('Links')->detailed_url( $hit->{ID} );
}
push (@output, $hit);
}
return { Latest_Links_Loop => \@output };
}
Cheers
Andy (mod)
andy@ultranerds.co.uk
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!