Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Re: [minesite] Priority Links by Category ?

Quote Reply
Re: [minesite] Priority Links by Category ? In reply to
What I was trying to achieve was to be able to display the Priority / Premium listed sites Logo / Graphic per category. This will do it:[ Modified $premium global ] Graphic column being "Logo"

sub {

# Displays the isPriority listed links logo per category on the category home page.

my $id = shift;

my $db = $DB->table ('Links','CatLinks');

$db->select_options ('ORDER BY isPriority DESC', 'LIMIT 10');

my $sth = $db->select ( { isPriority => 'Yes'}, { 'CatLinks.CategoryID' => $id}, ['Links.ID', 'Links.Logo', 'Links.Title', , 'Links.URL'], { isValidated => 'Yes'} );

my $premium;

while (my ($id,$logo,$name,$url) = $sth->fetchrow_array) {

$premium .= "<a href='http://www.your_site.com/cgi-bin/jump.cgi?ID=$id' target='_blank'><img src='$logo' border='0'></a><br>";

}

return $premium;

}





Regards

minesite
Subject Author Views Date
Thread Priority Links by Category ? minesite 3016 Apr 7, 2002, 1:22 AM
Thread Re: [minesite] Priority Links by Category ?
minesite 2873 Apr 10, 2002, 5:34 PM
Thread Re: [minesite] Priority Links by Category ?
pugdog 2832 Apr 11, 2002, 6:54 PM
Thread Re: [pugdog] Priority Links by Category ?
minesite 2833 Apr 11, 2002, 11:36 PM
Post Re: [minesite] Priority Links by Category ?
minesite 2795 Apr 13, 2002, 3:35 PM