PDA

View Full Version : Reputation points in postbit


yuriy
01-10-2007, 05:49 PM
Hey everyone, ANOTHER HELP is needed lol, I'm a n00b at vB for NOW!, I was with that stupid php-nuke for couple of years, until I found vB can be better than that crap, anyways this is what I want:

When a user has 0 reps I will change this to be on register get no points, and as you can see in the image below it shows Reputation: 0 in red color and when theres a rep above 0 it shows Reputation: 15 in green color, I currently have this in my post bit:


<if condition="$show['reputation']"><div><if condition="$show['reppower']"></if>
<table width="120" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="48" height="20" align="left" background="images/reputation/pointrep.gif"><span class="smallfont">Reputaion: $post[reputation]</span></td>
</tr>
</table></if>


I have no idea how to get this to work I want it to, please help, Thank you so much guys! vBulletin's help is much faster then nukes :\ Thanks again everyone! :)

:eek: Almost forgot :) check the image below if you didn't understand what I was trying to say :p

magnus
01-11-2007, 11:25 AM
When a user has 0 reps I will change this to be on register get no points, and as you can see in the image below it shows Reputation: 0 in red color and when theres a rep above 0 it shows Reputation: 15 in green color, I currently have this in my post bit:

AFAIK, this can be done with simple conditionals.

ie.
<span style="color: <if condition="$post['reputation'] > 0">green<else />red</if>">$post[reputation]</span>

Something like that should work..

yuriy
01-11-2007, 01:18 PM
How about this, here is my code I modified yours:

<span class="smallfont">Reputation: </span><span class="smallfont" style="color: <if condition="$post['reputation'] > 0">green<else />red</if>"><b>$post[reputation]</b></span>

How would I go about lets say um, if 0 its red, if above 0 its green, if above 1,000 its yellow, if above 2,000 its orange, and so on.. can someone help me get this? please