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

Hide Rating and Votes Unless Greater Than 0

Quote Reply
Hide Rating and Votes Unless Greater Than 0
I'm kind an idiot when it comes to things like this, but I want to make it so that the Rating and Votes do not display unless they are greater than 0.00. This of course would mean someone would have to vote before it would show up. I have tried creating to globals, one called 'beenvoted' and 'beenrated' and included some like the following to make it work:

Quote:


sub {

my ($rec) = @_;

if ($rec->{'Rating'} eq '0.00') { return ; }
else {'Rating: <%Rating%>'; }
}


and then on the links.html template I have (Added: <%Add_Date%> <%beenrated%> <%beenvoted%>)

It will show (Added: Thu Apr 03 2003) if there are no votes or ratings (which is what I want), but if there are votes or ratings it shows (Added: Thu Apr 03 2003 Rating: Votes: )

Can anyone help me fix this? Thanks!
Subject Author Views Date
Thread Hide Rating and Votes Unless Greater Than 0 eclipse 2942 Apr 5, 2003, 10:20 AM
Post Re: [eclipse] Hide Rating and Votes Unless Greater Than 0
Paul 2858 Apr 5, 2003, 10:35 AM
Thread Re: [eclipse] Hide Rating and Votes Unless Greater Than 0
Andy 2861 Apr 5, 2003, 10:37 AM
Post Re: [Andy] Hide Rating and Votes Unless Greater Than 0
carfac 2853 Apr 5, 2003, 12:21 PM
Post Re: [eclipse] Hide Rating and Votes Unless Greater Than 0
eclipse 2856 Apr 5, 2003, 6:30 PM