I tried to do it in the templates.
Quote:
<if condition="$post[votenum]!=0">
<if condition="$rateave = $post[votetotal]/$post[votenum]"></if>
$rateave
</if>
|
It's okey.However the result is not good looking.
Example if the votetotal is 11,the votenum is 3.It will print 3.6666666666667 .
I just want to get the value 3.67 or 4.
--------------- Added [DATE]1245564040[/DATE] at [TIME]1245564040[/TIME] ---------------
Quote:
<if condition="$post[votenum]!=0">
<if condition="$rateave = $post[votetotal]/$post[votenum]"></if>
<if condition="$rateave >0 && $rateave < 1.5"><if condition="$rateave1=1"></if></if>
<if condition="$rateave >=1.5 && rateave< 2.5"><if condition="$rateave1=2"></if></if>
<if condition="$rateave >=2.5 && rateave<3.5 "><if condition="$rateave1=3"></if></if>
<if condition="$rateave >=3.5 &&rateave<4.5"><if condition="$rateave1=4"></if></if>
<if condition="$rateave >=4.5 "><if condition="$rateave1=5"></if></if>
$rateave1
</if>
|
Because the maximum rated score is 5 (5 star)I tried to use this and it works.
However,if i want to use the plugin,how can i do that?
Thanks.