Author Topic: Item request: Decrease Karma  (Read 7807 times)

Offline D

Item request: Decrease Karma
« on: November 09, 2007, 12:37:27 am »
Ok, so just to be different, my forum does karma backwards.  Low karma is good and good karma is bad.  Is there any way I can get an item to let a user decrease their karma?

Offline spearfish

Re: Item request: Decrease Karma
« Reply #1 on: May 19, 2008, 10:46:19 am »
Hmm.... seems nice and simple.  If you have any knowledge of a text editor + ftp program....

Edit /Sources/shop/items/IncreaseKarma.php

Change:

Code: [Select]
class item_IncreaseKarma extends itemTemplateto
Code: [Select]
class item_DecreaseKarma extends itemTemplate
and....

Code: [Select]
db_query("

UPDATE {$db_prefix}members

SET karmaGood = karmaGood + {$item_info[1]}

WHERE ID_MEMBER = {$ID_MEMBER}", __FILE__, __LINE__);

return 'Successfully increased your Karma by ' . $item_info[1] . '!';

to

Code: [Select]
db_query("

UPDATE {$db_prefix}members

SET karmaBad = karmaBad + {$item_info[1]}

WHERE ID_MEMBER = {$ID_MEMBER}", __FILE__, __LINE__);

return 'Successfully decreased your Karma by ' . $item_info[1] . '!';

~~~

Then save that as DecreseKarma.php and upload it to where all the other items live.  I'm not going to bother to make a package for this because there's probably not that great of a demand.... Sorry.

Offline sontoloyo

Re: Item request: Decrease Karma
« Reply #2 on: April 28, 2011, 09:23:57 pm »
How about a "KARMA BOMB" item to decrease somebody else karma by x points ???