Advertisement:

Help me please with karma

Aloittaja vorarg, syyskuu 26, 2007, 06:14:11 AP

« edellinen - seuraava »

vorarg

How can I make it so you need 15 karma instead of posts to modify karma?

Kindred

you would need a mod to do this. 

However, it does not look like anyone has created such a mod yet.




--moving to mod request board.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

vorarg

Ok, thanks for the move..
Can someone please make this mod for me??

Rudolf

You can do it with a few manual changes.
1. Load.php
Koodi (Search for) [Valitse]
$user_info['groups'] = array_unique($user_info['groups']);
Koodi (Add after) [Valitse]
$user_info['karma'] = array(
'good' => $user_settings['karmaGood'],
'bad' => $user_settings['karmaBad'],
'allow' => false, //you can't edit your own karma
'allow_edit' => $user_settings['karmaGood'] - $user_settings['karmaBad'] > 15
);



Koodi (Search for) [Valitse]
'allow' => !$user_info['is_guest'] && $user_info['posts'] >= $modSettings['karmaMinPosts'] && allowedTo('karma_edit') && !empty($modSettings['karmaMode']) && $ID_MEMBER != $user
Koodi (Replace with) [Valitse]
'allow' => !$user_info['is_guest'] && $user_info['karma']['allow_edit'] && $user_info['posts'] >= $modSettings['karmaMinPosts'] && allowedTo('karma_edit') && !empty($modSettings['karmaMode']) && $ID_MEMBER != $user

2. Karma.php
Koodi (Search for) [Valitse]
fatal_lang_error('smf61', false)
Koodi (Add after) [Valitse]
//You need a minimum karma to be able to edit karma
if (!$user_info['karma']['allow_edit'])
fatal_lang_error('karma_allow_edit');


3. Errors.english.php or (Errors.your_language.php)
Koodi (Search) [Valitse]
?>
Koodi (Add before) [Valitse]
$txt['karma_allow_edit'] = 'You need 15 karma points (total positive) to be able to edit other people\'s karma.';

DONE.
Replace 15 with the minimum number you want. This will count the total positive karma regardless of the type you have selected.
Maybe someone can make it in a mod, add an option and put it in the admin section. For that you need to modify a couple of more files, although they are all really small changes.
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

vorarg

Oh no!
Now I can't see my [Rep++] Button :(
Any Fix for that please?

Thank you for actually helping BTW.

Rudolf

I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

vorarg

#6
Its my add karma button, I fixed it though, thank you very much for your help :)

Also, how do I make it so I start with 10 karma?

Advertisement: