SMF Community Helpers > Mod Development
[MOD]Karma Per Message
nend:
It is fully working on my site. :D
I'll go head and write up a mod for it later on today.
nend:
Last of the code for the template
/Themes/default/Display.template.php
Find
--- Code: --- // What about splitting it off the rest of the topic?
if ($context['can_split'] && !empty($context['real_num_replies']))
echo '
<li class="split_button"><a href="', $scripturl, '?action=splittopics;topic=', $context['current_topic'], '.0;at=', $message['id'], '">', $txt['split'], '</a></li>';
--- End code ---
Add After
--- Code: --- // Karma Per Post
if ($message['member']['karma']['allow'])
echo '
<li style="background: url(', $settings['images_url'], '/post/thumbup.gif) no-repeat 0 0;"><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'], '(', $message['karma']['good'],')</a></li>';
else
echo '
<li style="background: url(', $settings['images_url'], '/post/thumbup.gif) no-repeat 0 0;"><span style="padding-left:20px;display:block;height:20px;line-height:18px;float:left;">', $modSettings['karmaApplaudLabel'], 's(', $message['karma']['good'],')</span></li>';
--- End code ---
All the code is listed in this topic, just put it together in a package and install it and done or you can do it manually. ;D
tMicky:
nice, waiting for the mod :).
nend:
Didn't know anyone was interested. Will request this transfer to the Mod Development board and get something put together and set it in its paces to get approved. ;)
nend:
Here is the first test. Don't plan on adding much to it and it will really work off the existing karma system so new permissions or languages required, just a few columns added, source code edit and one template edit.
Will tell me what you think, it may be ready already.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version