Hi,
I added the global rate_img, then copy & pasted this...
sub {
#Rating as Images
my $rec = shift;
my $image = shift;
if ($rec->{'Rating'} eg '0.00') { return ; }
elsif ($rec->{'Votes'} < '10') { $image = 'rating1.gif'; }
elsif ($rec->{'Rating'} le '1.50') { $image = 'rating1.gif'; }
elsif ($rec->{'Rating'} le '2.50') { $image = 'rating2.gif'; }
elsif ($rec->{'Rating'} le '3.50') { $image = 'rating3.gif'; }
elsif ($rec->{'Rating'} le '4.50') { $image = 'rating4.gif'; }
elsif ($rec->{'Rating'} le '5.50') { $image = 'rating5.gif'; }
elsif ($rec->{'Rating'} le '6.50') { $image = 'rating6.gif'; }
elsif ($rec->{'Rating'} le '7.50') { $image = 'rating7.gif'; }
elsif ($rec->{'Rating'} le '8.50') { $image = 'rating8.gif'; }
elsif ($rec->{'Rating'} le '9.50') { $image = 'rating9.gif'; }
elsif ($rec->{'Rating'} le '10.00') { $image = 'rating10.gif'; }
else { $image = 'rating1.gif'; }
return qq|<a href="$Links::CFG->{db_cgi_url}/rate.cgi?ID=$rec->{'ID'}">
<img src="$Links::CFG->{build_images_url}/$image" border="0" alt="Rate It!" align="absmiddle"></a>|;
}
As instructed on this page,
http://gossamer-threads.com/scripts/resources/Attach/791-rateimage.html
but I keep getting this error...
A fatal error has occured:
Can't use string ("") as a subroutine ref while "strict refs" in use at user44/public_html/cgi-bin/links/cgi/admin/Links.pm line 287.
Anyone know why?
Thanks!
I added the global rate_img, then copy & pasted this...
sub {
#Rating as Images
my $rec = shift;
my $image = shift;
if ($rec->{'Rating'} eg '0.00') { return ; }
elsif ($rec->{'Votes'} < '10') { $image = 'rating1.gif'; }
elsif ($rec->{'Rating'} le '1.50') { $image = 'rating1.gif'; }
elsif ($rec->{'Rating'} le '2.50') { $image = 'rating2.gif'; }
elsif ($rec->{'Rating'} le '3.50') { $image = 'rating3.gif'; }
elsif ($rec->{'Rating'} le '4.50') { $image = 'rating4.gif'; }
elsif ($rec->{'Rating'} le '5.50') { $image = 'rating5.gif'; }
elsif ($rec->{'Rating'} le '6.50') { $image = 'rating6.gif'; }
elsif ($rec->{'Rating'} le '7.50') { $image = 'rating7.gif'; }
elsif ($rec->{'Rating'} le '8.50') { $image = 'rating8.gif'; }
elsif ($rec->{'Rating'} le '9.50') { $image = 'rating9.gif'; }
elsif ($rec->{'Rating'} le '10.00') { $image = 'rating10.gif'; }
else { $image = 'rating1.gif'; }
return qq|<a href="$Links::CFG->{db_cgi_url}/rate.cgi?ID=$rec->{'ID'}">
<img src="$Links::CFG->{build_images_url}/$image" border="0" alt="Rate It!" align="absmiddle"></a>|;
}
As instructed on this page,
http://gossamer-threads.com/scripts/resources/Attach/791-rateimage.html
but I keep getting this error...
A fatal error has occured:
Can't use string ("") as a subroutine ref while "strict refs" in use at user44/public_html/cgi-bin/links/cgi/admin/Links.pm line 287.
Anyone know why?
Thanks!