View Full Version : good/bad rep change
Shinobi
09-01-2004, 04:08 PM
Im talking about the rep thing that comes with 3.0.3 here:
is there any way to make the text of the rep meter change depending on whether its good or bad. For instance:
Is a users rep is 15 the postbit says Good Rep: (and then the green bars)
but if they have a negative rep of -15 the postbit says: Bad Rep: (and then the red bars)
i dont know much about php but isnt there a place where u can do and if else statement and make it write out different words depending on if the rep is below or above 0
Reeve of shinra
09-01-2004, 04:15 PM
You can use and if / else statement in the postbit template. Check the documentation on vbulletin.com for the structure and syntax.
Shinobi
09-01-2004, 05:17 PM
i cant find it in the postbit_legacy. It doesnt write anything directly, its all stuff like $reppower. I lookd there, i looked in all the reputation templates, and i looked in reputation.php, but i cant find it anywhere, HELP ME!! IM CONFUSED!!
I figured out that this code is what writes it out.
$post[reputationdisplay]
but i have no idea where thats defined
Shinobi
09-15-2004, 05:34 AM
BUMP NO JUTSU!!
*thread goes back to top*
Shinobi
09-22-2004, 08:02 AM
awwww man does nobody know?? I dont know php, but this seems like a small thing right??
Paul M
09-22-2004, 11:16 AM
In the postbit_legacy template find ;
<if condition="$show['reputation']">Reputation: $post[reputationdisplay]</if>
and replace with ;
<if condition="$show['reputation']"><if condition="$post['reputation'] < 0">Bad Rep : $post[reputationdisplay]<else />Good Rep : $post[reputationdisplay]</if></if>
:D
Shinobi
09-23-2004, 05:25 AM
i wish it were that easy, this is what my legacy has:
<if condition="$show['reputation']"><div><if condition="$show['reppower']">$vbphrase[reppower]: $post[reppower]</if>$post[reputationdisplay]</div></if>
Paul M
09-24-2004, 10:35 AM
i wish it were that easy, this is what my legacy has:
<if condition="$show['reputation']"><div><if condition="$show['reppower']">$vbphrase[reppower]: $post[reppower]</if>$post[reputationdisplay]</div></if>
Try replacing that code with this ;
<if condition="$show['reputation']">
<div>
<if condition="$post['reputation'] < 0">
Bad Rep : <if condition="$show['reppower']">$vbphrase[reppower] : $post[reppower]</if> $post[reputationdisplay]
<else />
Good Rep : <if condition="$show['reppower']">$vbphrase[reppower] : $post[reppower]</if> $post[reputationdisplay]
</if>
</div>
</if>
:cool:
Shinobi
09-25-2004, 06:07 AM
actually thats the rep that came with my 3.0.3 i just turned it on., also heres what happened when i replaced my code with urs:
http://www.shinobi-online.com/showthread.php?p=19#post19
rhymeline
06-27-2005, 02:46 AM
thanks.. that worked for me....
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.