MyBB Community Forums

Full Version: Issue with reputation colour
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I'm trying to make the amount of reputation and the amount of likes using the thanks/likes plugin in the postbit show as green or red depending on positive or negative but I can't seem to find the right class?

I've tried <span class=repbox {total_class}> but the html doesn't format the {total_class} function in the postbit inside inspect element it just shows repbox (blank)

Any ideas where I'm going wrong? Annoyingly it works fine on the member profile pages.

If someone can suggest how to fix I'd much appreciate it. If you want a test account just let me know, willing to pay if needs be.
Reputation
Postbit Templates>>postbit_reputation_formatted
<strong class="{$reputation_class}">{$reputation}</strong>

css
.reputation_positive{color: green;}
.reputation_negative{color: red;}
.reputation_neutral{color: white;}


For Thank you plugin you will need Template Conditionals - Download

postbit or postbit_classic
Find this
{$post['thanked_count']}
replace with this
<if $post['thanked_count'] > 0 then><strong style="color:green;">{$post['thanked_count']}</strong><else>{$post['thanked_count']}</if>


If it doesnt works for likes then go
AdminCP>>Configurations>>Languages>>Edit>>thx.lang.php>>thx_thanked_count
and delete the <a href...
leave there only this {1}

PM me if you need more help on this
(2021-01-13, 02:43 PM)Mastersly Wrote: [ -> ]Reputation
Postbit Templates>>postbit_reputation_formatted
<strong class="{$reputation_class}">{$reputation}</strong>

css
.reputation_positive{color: green;}
.reputation_negative{color: red;}
.reputation_neutral{color: white;}


For Thank you plugin you will need Template Conditionals - Download

postbit or postbit_classic
Find this
{$post['thanked_count']}
replace with this
<if $post['thanked_count'] > 0 then><strong style="color:green;">{$post['thanked_count']}</strong><else>{$post['thanked_count']}</if>


If it doesnt works for likes then go
AdminCP>>Configurations>>Languages>>Edit>>thx.lang.php>>thx_thanked_count
and delete the <a href...
leave there only this {1}

PM me if you need more help on this


Sent you a PM mate.

@Mastersly

In the postbit, when I use ($reputation} it doesn't show a number. I'm sure the variable I have to use is: {$post['reputation']} (which is what im using atm but this isn't working with the styling)

But in members_profile template I'm using the ($reputation} variable and it displays the number fine with the correct formatting, any idea what im doing wrong?