Uutiset:

Wondering if this will always be free?  See why free is better.

Main Menu
Advertisement:

[help] allow karma modify in profile

Aloittaja farhaddad, elokuu 05, 2006, 05:07:30 IP

« edellinen - seuraava »

farhaddad

I need to allow karma modify in profile page (just like in display page)
i've tried to change the code, here's what i did, and i know it's wrong can some one help please

// If karma enabled show the members karma.
if ($modSettings['karmaMode'] == '1')
echo '
<tr>
<td>
<b>', $modSettings['karmaLabel'], ' </b>
</td><td>
', ($context['member']['karma']['good'] - $context['member']['karma']['bad']), '
</td>
</tr>';
elseif ($modSettings['karmaMode'] == '2')
echo '
<tr>
<td>
<b>', $modSettings['karmaLabel'], ' </b>
</td><td>
+', $context['member']['karma']['good'], '/-', $context['member']['karma']['bad'], '
</td>
</tr>';

// Is this user allowed to modify this member's karma?
if ($context['member']['karma']['allow'])
echo '
<tr>
<td>
</td><td>
<a href="', $scripturl, '?action=modifykarma;sa=applaud;uid=', $context['member']['id'], ';profile;u=', $context['current_member'],  '.' . $context['start'], ';sa=summary', ';sesc=', $context['session_id'], '">', $modSettings['karmaApplaudLabel'], '</a>
<a href="', $scripturl, '?action=modifykarma;sa=smite;uid=', $context['member']['id'], ';profile;u=', $context['current_member'],  '.' . $context['start'], ';sa=summary', ';sesc=', $context['session_id'], '">', $modSettings['karmaSmiteLabel'], '</a>

</td>
</tr>';



original code in display.theme

/ Is karma display enabled?  Total or +/-?
if ($modSettings['karmaMode'] == '1')
echo '
', $modSettings['karmaLabel'], ' ', $message['member']['karma']['good'] - $message['member']['karma']['bad'], '<br />';
elseif ($modSettings['karmaMode'] == '2')
echo '

', $modSettings['karmaLabel'], ' +', $message['member']['karma']['good'], '/-', $message['member']['karma']['bad'], '<br />';

// Is this user allowed to modify this member's karma?
if ($message['member']['karma']['allow'])
echo '
<a href="', $scripturl, '?action=modifykarma;sa=applaud;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.' . $context['start'], ';m=', $message['id'], ';sesc=', $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'], ';sesc=', $context['session_id'], '">', $modSettings['karmaSmiteLabel'], '</a><br />';



thank you

farhaddad

okay i'm using bump again i guess !

i need help

Tristan Perry

This is already a default feature. Just enable it via permissions if you haven't already. I think you can edit karma by going to:

Profile >> Forum profile information >> (Scroll down) karma.


PsychoWolf

I would like to know too, nobody an idea ?
No Support over E-Mail, ICQ or PM for MKPortal !
Visit for English Support mkportal.it

Kein Support über E-Mail, ICQ oder PN für das MKPortal !
Besucht für deutschen Support mkportal-support.de


Advertisement: