Thanks the following works great.
But can I change it to use a certain template we have: link_short.html and not the r_listing?
sub {
my $db = $DB->table('Links');
my $time = time;
my $cond = GT::SQL::Condition->new('ExpiryDate','>', $time, 'ExpiryDate', '<', 2147483647);
my $c = $db->count($cond);
my $r = rand($c);
$db->select_options("Limit $r,1");
my $row = $db->select($cond)->fetchrow_hashref;
return unless(defined $row);
my $r_listing = qq|<a href="$row->{URL}">$row->{Title}</a><br>$row->{Description}|;
return $r_listing;
}
Regards
KaTaBd
Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
But can I change it to use a certain template we have: link_short.html and not the r_listing?
sub {
my $db = $DB->table('Links');
my $time = time;
my $cond = GT::SQL::Condition->new('ExpiryDate','>', $time, 'ExpiryDate', '<', 2147483647);
my $c = $db->count($cond);
my $r = rand($c);
$db->select_options("Limit $r,1");
my $row = $db->select($cond)->fetchrow_hashref;
return unless(defined $row);
my $r_listing = qq|<a href="$row->{URL}">$row->{Title}</a><br>$row->{Description}|;
return $r_listing;
}
Regards
KaTaBd
Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory