News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

karma only positive

Started by goldenstudios, June 30, 2020, 06:46:01 PM

Previous topic - Next topic

goldenstudios

use 2.0.17 how can you remove negative karma and leave only positive karma?
how can he only vote positive?

Looking

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. 


goldenstudios


Doug Heffernan

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.


a10

Try leaving the smite label field empty :O)
2.0.19, php 8.0.23, MariaDB 10.5.15. Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.

Looking

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.


goldenstudios

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>';


Advertisement: