Advertisement:

Author Topic: karma only positive  (Read 963 times)

Offline goldenstudios

  • Jr. Member
  • **
  • Posts: 102
karma only positive
« 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?

Offline Looking

  • SMF Hero
  • ******
  • Posts: 2,475
  • SMF Customization
    • jeanborde on Facebook
    • SMF Custom Themes & Custom Coding
Re: karma only positive
« Reply #1 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. 


Offline goldenstudios

  • Jr. Member
  • **
  • Posts: 102
Re: karma only positive
« Reply #3 on: July 01, 2020, 02:04:34 AM »
But now work with 2.0.17

Offline Doug Heffernan

  • Full Member
  • ***
  • Posts: 568
    • An Unofficial King of Queens Forum
Re: karma only positive
« Reply #4 on: July 01, 2020, 02:20:26 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.


Offline a10

  • Charter Member
  • Sr. Member
  • *
  • Posts: 988
Re: karma only positive
« Reply #5 on: July 01, 2020, 06:28:05 AM »
Try leaving the smite label field empty :O)
2.0.17, ssl, php 7.3.19, 10.3.21-MariaDB
Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.

Offline Looking

  • SMF Hero
  • ******
  • Posts: 2,475
  • SMF Customization
    • jeanborde on Facebook
    • SMF Custom Themes & Custom Coding
Re: karma only positive
« Reply #6 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.


Offline goldenstudios

  • Jr. Member
  • **
  • Posts: 102
Re: karma only positive
« Reply #8 on: July 01, 2020, 01:53:02 PM »
thanks i used this
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>';