The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Need alittle help with php
How do I do that if the feedback score above 0 the score will be green, and if the feedback score below 0, the score will be red?
thanks for answer here is my code. Code:
<b> <vb:if condition="$vboptions['itrader_postbit_location'] == 'postbit_userinfo_left'"><span class="usertitle"> {vb:rawphrase itrader_feedback_score} <vb:if condition="$show['rateinfolink']"><a title="{vb:rawphrase itrader_total_feedback}"href="{vb:raw vboptions.bburl}/itrader.php?{vb:raw session.sessionurl}u={vb:raw post.userid}"></vb:if>{vb:raw post.itrader_total}<vb:if condition="$show['rateinfolink']"></a></vb:if><vb:if condition="$post['itrader_total']"> ({vb:raw post.itrader_pcnt}%)</vb:if></span> <vb:else /> <vb:if condition="$vboptions['itrader_postbit_location'] == 'postbit_userinfo_right'"><dl class="userinfo_extra"></vb:if> <dt>{vb:rawphrase itrader_feedback_score}</dt><dd><vb:if condition="$show['rateinfolink']"><a title="{vb:rawphrase itrader_total_feedback}" href="{vb:raw vboptions.bburl}/itrader.php?{vb:raw session.sessionurl}u={vb:raw post.userid}"></vb:if>{vb:raw post.itrader_total}<vb:if condition="$show['rateinfolink']"></a></vb:if><vb:if condition="$post['itrader_total']"> ({vb:raw post.itrader_pcnt}%)</vb:if></dd> <vb:if condition="$vboptions['itrader_postbit_location'] == 'postbit_userinfo_right'"></dl></vb:if></b> </vb:if> |
#2
|
||||
|
||||
then general guide would be
Code:
<vb:if condition="$post['itrader_total'] > '0'"> <!-- if itrader total greater than 0 --> <font color="green">{vb:raw post.itrader_total}</font> <vb:elseif condition="$post['itrader_total'] < '0'"> <!-- if itrader total less than 0 --> <font color="red">{vb:raw post.itrader_total}</font> <vb:elseif condition="$post['itrader_total'] == 0"> <!-- if itrader total equals 0 --> <font color="black">{vb:raw post.itrader_total}</font> </vb:if> |
#3
|
|||
|
|||
Great works thanks you :]
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|