2014-12-28, 11:32 PM
Hello again,
I wanted to add easier reputation for the posts and placed the button under the posts message with the reputation of that post counter. Code:
[php]
Don't worry about the PHP Code inside the postbit template, because it's working good, I've installed the PHP rendering in templates on my forum.
The problem is, although I'm using the $post['reputation'] variable on that, it isnt the POST reputation, it has the value of total reputation of the user who wrote this posts. That means, when the user for example has only 1 reputation point, we can see all his posts marked have 1 reputation point.
Is there any way I can fix it?
Thanks in advance.
I wanted to add easier reputation for the posts and placed the button under the posts message with the reputation of that post counter. Code:
[php]
<div><span style="background-color:<?php if($post['reputation'] >0) { echo '#2BCF2B;'; } else if($post['reputation'] ==0) { echo '#d5dde5;'; } else if($post['reputation'] <0) { echo '#DE2626;'; }?>font-size:0.8em;padding:5px;5px;-moz-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;color:#000;text-decoration:none;z-index:5000; float:right;">{$post['reputation']}</span><span style="float:right; line-height:2;">{$post['button_rep']}</span>
</div>
Don't worry about the PHP Code inside the postbit template, because it's working good, I've installed the PHP rendering in templates on my forum.
The problem is, although I'm using the $post['reputation'] variable on that, it isnt the POST reputation, it has the value of total reputation of the user who wrote this posts. That means, when the user for example has only 1 reputation point, we can see all his posts marked have 1 reputation point.
Is there any way I can fix it?
Thanks in advance.