Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Change Karma Display in KarmaLeaderBoard from Decimal to Integer
![r0obert](https://secure.gravatar.com/avatar/6ffe1e38e0eee7d84c8203a6f56549e3/?default=https%3A%2F%2Fvanillicon.com%2Fd09e9b1525220d182a16998a0d64fd69_100.png&rating=g&size=100)
vanilla v2.1.3, bootstrap and the latest versions of KarmaBank & KarmaLeaderboard
I have managed to change how karma is displayed in the KarmaBank by adding this line to locale.php:
$Definition['KarmaBank.NumberFormat'] = '%d';
It is working perfectly, but KarmaLeaderBoard still shows decimals, eg. 100.00 instead of 100.
Any ideas?
0
Comments
Frankly @r0obert , I was going to have this plugin deleted since it is old and since I don't use Karma plugin and I never received any donations for the plugin.![>:) >:)](https://open.vanillaforums.com/plugins/emojiextender/emoji/little/naughty.png)
but you could try in class.karmaleaderboardmodule.php
change
to
but I am no longer supporting it, just so you know.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Thanks for your answer and I'm sorry to hear that but I can't find
$KarmaName = Gdn_Format::Text($Name);
in class.karmaleaderboardmodule.php
This is what I have:
Thanks again!
Ah, I have totally different code in my altered version.
that no longer looks like yours ![:) :)](https://open.vanillaforums.com/plugins/emojiextender/emoji/little/smile.png)
try putting
$Balance = sprintf(T('KarmaBank.NumberFormat',"%01.2f"),$Balance) ;
above line 50 in what you displayed
logically I would try that.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
@peregrine You're amazing, it worked!
Check your PayPal (#KarmaLeaderboard), it's not much though, thanks again!
thanks. got it. much appreciated.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.