Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Aiheen aloitti: farhaddad - elokuu 05, 2006, 05:07:30 IP

Otsikko: [help] allow karma modify in profile
Kirjoitti: farhaddad - elokuu 05, 2006, 05:07:30 IP
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
Otsikko: bump !
Kirjoitti: farhaddad - elokuu 11, 2006, 12:35:35 AP
okay i'm using bump again i guess !

i need help
Otsikko: Re: [help] allow karma modify in profile
Kirjoitti: Tristan Perry - elokuu 12, 2006, 07:53:59 AP
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.
Otsikko: Re: [help] allow karma modify in profile
Kirjoitti: farhaddad - elokuu 26, 2006, 01:24:35 IP
again  :-[
Otsikko: Re: [help] allow karma modify in profile
Kirjoitti: PsychoWolf - syyskuu 04, 2006, 02:36:05 IP
I would like to know too, nobody an idea ?