Vanilla open source was terminated 1 January 2025 by Higher Logic. See this announcement for more information.
[Solved] KarmaBank and I Like This: consecutive "Likes" not being counted

Hi @x00 and others. I've installed "I Like This" and KarmaBank to create a basic reputation system for my forum. Here's what happens:
- Logged in as User A, I Like a post by User B. The number of Likes associated with the post increases by 1.
- User B's Karma balance only increases when I log in as User B and/or reload a page. I presume this is related to some caching process.
I can repeat 1 and 2 as many times as I like and it works fine. But here is where the problem lies:
- Logged in as User A, I Like a post by User B. The number of Likes associated with the post increases by 1.
- Logged in as User A, I Like a different post by User B. The number of Likes associated with that post increases by 1.
- User B refreshes the page but his Karma only increases by 1.
Is there a way for me to fix this? Is it a simple rules issue? I'm currently using diffequals with values of 1.0 and 1.0.
Regards,
Quiff
0
Comments
OK, it seems like I've fixed it with a hack. I replaced the line
$KarmaBank->Transaction($Type,$Rule->Amount,$Value,$RuleID);
With
$LikeAmount = $Value - $TallyValue; $KarmaBank->Transaction($Type,$LikeAmount,$Value,$RuleID);
no don't that. Try changing
to
that way other things won't get broken
grep is your friend.
Thank you, that works.
EDIT - Problem Solved
I solved it - your solution does work. Thank you @x00! I must've typed something incorrectly in my first attempt.