Gossamer Forum
Home : Products : Gossamer Links : Discussions :

randon plugin on subcategories pages

Quote Reply
randon plugin on subcategories pages
I am using the following Global to display a random link in the rightsidebar (SQL Links 3.2+)

Now this Global works on homepage and on the detailed pages of the links but not when displaying the subcategories!

sub {
my $db = $DB->table('Links');
my $total = $db->count ( 'isValidated' => 'Yes' );
my $rand = int( rand($total) );
$db->select_options ("LIMIT $rand, 1");
my $link = $db->select->fetchrow_hashref;
my $html = Links::SiteHTML::display('link', $link);
return $html;
}


what is wrong with it?

Thanks
Antoine
Subject Author Views Date
Thread randon plugin on subcategories pages antoined 3928 Sep 5, 2008, 11:54 AM
Thread Re: [antoined] randon plugin on subcategories pages
Andy 3859 Sep 5, 2008, 12:13 PM
Thread Re: [Andy] randon plugin on subcategories pages
antoined 3832 Sep 5, 2008, 12:22 PM
Thread Re: [antoined] randon plugin on subcategories pages
Andy 3835 Sep 5, 2008, 12:42 PM
Post Re: [Andy] randon plugin on subcategories pages
Andy 3839 Sep 7, 2008, 4:04 AM