Gossamer Forum
Quote Reply
Need help with global >>
Hello

I've put together a global to display the most popular links selected within a defined category. It works great except for one problem. The links being displayed are returning the actual URL instead of the reference to the link through the jump.cgi

I'm hoping someone could help in getting this to display the jump.cgi call ....

sub {
my $id = shift;
my $db = $DB->table ('Links','CatLinks');
$db->select_options ('ORDER BY Hits DESC', 'LIMIT 30');
my $sth = $db->select ( { 'CatLinks.CategoryID' => $id}, ['Links.ID', 'Links.Title', , 'Links.URL'], { isValidated => 'Yes', has_price => 'Yes'} );
my $popularcategory;
while (my ($id,$name,$url) = $sth->fetchrow_array) {
$popularcategory .= "<a href='$url'>$name</a><br>"; }
return $popularcategory; }

called with <%popular (4)%> to display popular links in category id 4, or <%popular ($ID)%> to display popular links in category <%ID%>.

Thanks for any help getting this fixed up!
Subject Author Views Date
Thread Need help with global >> Jonze 1900 Apr 28, 2003, 10:34 AM
Thread Re: [Jonze] Need help with global >>
afinlr 1818 Apr 28, 2003, 11:04 AM
Post Re: [afinlr] Need help with global >>
Jonze 1804 Apr 28, 2003, 5:18 PM