Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: goldenstudios on June 30, 2020, 06:46:01 PM

Title: karma only positive
Post by: goldenstudios on June 30, 2020, 06:46:01 PM
use 2.0.17 how can you remove negative karma and leave only positive karma?
how can he only vote positive?
Title: Re: karma only positive
Post by: Looking on June 30, 2020, 09:55:26 PM
What I did was edited the code to take away the ability to give a negative or see the option. Maybe someone may have a step by step procedure for it but I would not do it unless you really know what you are doing because it is part of the core features. 
Title: Re: karma only positive
Post by: Doug Heffernan on July 01, 2020, 01:35:40 AM
Check this mod out:

https://custom.simplemachines.org/mods/index.php?mod=817
Title: Re: karma only positive
Post by: goldenstudios on July 01, 2020, 02:04:34 AM
But now work with 2.0.17
Title: Re: karma only positive
Post by: Doug Heffernan on July 01, 2020, 02:20:26 AM
Quote from: goldenstudios on July 01, 2020, 02:04:34 AM
But now work with 2.0.17

Sorry about that. I thought that this was in 1.1. section.

You can ask its author if they can upgrade it.

Title: Re: karma only positive
Post by: a10 on July 01, 2020, 06:28:05 AM
Try leaving the smite label field empty :O)
Title: Re: karma only positive
Post by: Looking on July 01, 2020, 11:32:01 AM
It was years ago since I touched karma  but you may want to see if someone can still give you negative karma by putting the link in the URL even if the link is not visible or left empty. I think that was my case hence I did a code edit.
Title: Re: karma only positive
Post by: shadav on July 01, 2020, 01:17:52 PM
these topics may help you

https://www.simplemachines.org/community/index.php?topic=539324.0
https://www.simplemachines.org/community/index.php?topic=433588.0
Title: Re: karma only positive
Post by: goldenstudios on July 01, 2020, 01:53:02 PM
thanks i used this
Quote from: Antechinus on August 30, 2015, 03:50:16 AM
Nope. It's easy enough. I don't think there is an admin option to disable it as such (AFAIK the whole karma system is either on or off) but removing the smite option from the template is straightforward.

Code (Find this in Display.template.php) Select
// Is this user allowed to modify this member's karma?
if ($message['member']['karma']['allow'])
echo '
<li class="karma_allow">
<a href="', $scripturl, '?action=modifykarma;sa=applaud;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.' . $context['start'], ';m=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $modSettings['karmaApplaudLabel'], '</a>
<a href="', $scripturl, '?action=modifykarma;sa=smite;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';m=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $modSettings['karmaSmiteLabel'], '</a>
</li>';


Code (Change it to this) Select
// Is this user allowed to modify this member's karma?
if ($message['member']['karma']['allow'])
echo '
<li class="karma_allow">
<a href="', $scripturl, '?action=modifykarma;sa=applaud;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.' . $context['start'], ';m=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $modSettings['karmaApplaudLabel'], '</a>
</li>';