Topic: Karma (pun_karma)
Here is description of the extension.
Download links:
Or you can download pun_karma with help of pun_repository extension.
Feel free to report any bugs.
You are not logged in. Please login or register.
PunBB Forums → Supported extensions → Karma (pun_karma)
Here is description of the extension.
Download links:
Or you can download pun_karma with help of pun_repository extension.
Feel free to report any bugs.
Great...we were awaiting this release for quite a while.
Works perfectly.
Can i replace the + and - Karma buttons with images?
thanks
I've had this in use for many many months. is this a new version or something?
Great...we were awaiting this release for quite a while.
Works perfectly.
Can i replace the + and - Karma buttons with images?
It is planned in the next pun_karma release.
I've had this in use for many many months. is this a new version or something?
It is the first official release of extension. I suppose you use the extension "user_karma". It was the base for pun_karma. The major changes from user_karma:
Table "user_karma" was renamed to "pun_karma"
Added a new field "karma" to table "posts"
Added SEF-support
Added posibility to disable the down mark to posts
Added posibility to set the number of minutes users have to wait before voting for a post (two options for down and up mark)
Added protection from CSRF attacks.
If you want to migrate to pun_karma extension, do the following:
Make a backup of table "<DB_PREFIX>user_karma"
Disable the extension "user_karma"
Rename the "user_karma" table to "pun_karma"
Run this script:
<?php
if (!defined('FORUM_ROOT'))
define('FORUM_ROOT', './');
require FORUM_ROOT.'include/common.php';
$forum_db->add_field('posts', 'karma', 'INT(10)', TRUE);
$pun_karma_query = array(
'SELECT' => 'post_id, SUM(mark) AS sum_mark',
'FROM' => 'pun_karma',
'GROUP BY' => 'post_id'
);
$pun_karma_res = $forum_db->query_build($pun_karma_query) or error(__FILE__, __LINE__);
while ($cur_karma = $forum_db->fetch_assoc($pun_karma_res))
{
$pun_karma_query = array(
'UPDATE' => 'posts',
'SET' => 'karma = '.$cur_karma['sum_mark'],
'WHERE' => 'id = '.$cur_karma['post_id']
);
$forum_db->query_build($pun_karma_query) or error(__FILE__, __LINE__);
}
echo 'Done.';
?>
The new version of pun_karma 1.1 has been released.
Changes from previous version:
Added icons instead of +, -, X characters
Added calculating of users karma.
Has anyone here migrated from old karma to new karma? Was it easy?
How do you "run" the above script?
Here the script for migration from user_karma to pun_karma 1.1. Other instructions are the same.
<?php
if (!defined('FORUM_ROOT'))
define('FORUM_ROOT', './');
require FORUM_ROOT.'include/common.php';
@set_time_limit(0);
$forum_db->add_field('posts', 'karma', 'INT(10)', TRUE);
$pun_karma_query = array(
'SELECT' => 'post_id, SUM(mark) AS sum_mark',
'FROM' => 'pun_karma',
'GROUP BY' => 'post_id'
);
$pun_karma_res = $forum_db->query_build($pun_karma_query) or error(__FILE__, __LINE__);
while ($cur_karma = $forum_db->fetch_assoc($pun_karma_res))
{
$pun_karma_query = array(
'UPDATE' => 'posts',
'SET' => 'karma = '.$cur_karma['sum_mark'],
'WHERE' => 'id = '.$cur_karma['post_id']
);
$forum_db->query_build($pun_karma_query) or error(__FILE__, __LINE__);
}
$forum_db->add_field('users', 'karma', 'INT(10)', TRUE);
$pun_karma_query = array(
'SELECT' => 'poster_id, SUM(mark) AS user_karma',
'FROM' => $forum_db->prefix.'posts AS p, '.$forum_db->prefix.'pun_karma AS pk',
'WHERE' => 'p.id = pk.post_id',
'GROUP BY' => 'poster_id',
'PARAMS' => array(
'NO_PREFIX' => true
)
);
$pun_karma_res = $forum_db->query_build($pun_karma_query) or error(__FILE__, __LINE__);
if ($forum_db->num_rows($pun_karma_res) > 0)
{
while ($cur_karma = $forum_db->fetch_assoc($pun_karma_res))
{
$pun_karma_update_query = array(
'UPDATE' => 'users',
'SET' => 'karma = '.$cur_karma['user_karma'],
'WHERE' => 'id = '.$cur_karma['poster_id']
);
$forum_db->query_build($pun_karma_update_query) or error(__FILE__, __LINE__);
}
}
echo 'Done.';
?>
How do you "run" the above script?
Copy/paste this script to the file "<FORUM_ROOT>/migration_user_karma_to_pun_karma.php"
Request the page "<FORUM_URL>/migration_user_karma_to_pun_karma.php"
Remove the file "<FORUM_ROOT>/migration_user_karma_to_pun_karma.php".
Excellent work Slavok. This is a fantastic addon!
Some users have requested a feature possibly in thier profile where they can view which of their posts were rated and who rated them.
Could you possibly add this on in a new version update? This would make an already great extension even better.
Done. Thanks
Any idea why I'd get this error in Version v1.1.1.
Notice: Undefined index: post_karma in /home/.../viewtopic.php(325) : eval()'d code on line 10
Notice: Undefined index: user_karma in /home/.../viewtopic.php(486) : eval()'d code on line 10
other extensions installed
PunBB Repository Version v1.2.3.
guest_read_permissions Version v1.0.
Changes Copyright Footer Version v1.0.
Update to 1.1.2
Fix error described on http://punbb.informer.com/forums/topic/ … deratephp/
lang/Lithuanian
<?php
/**
* Lithuanian language file for pun_karma extension.
*
* If any new strings are added please email them to me and I'll happily
* translate them.
*
* @author Artūras 'arturaz' Šlajus <x11@arturaz.net>
* @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
* @package pun_karma
*/
if (!defined('FORUM')) die();
$lang_pun_karma = array(
'User Karma' => 'Vartotojo karma:',
'Minus mark cancel' => 'Karmos mažinimą uždraudė forumo administracija.',
'Vote error' => 'Tu negali balsuoti už savo žinutę',
'Already voted' => 'Tu jau balsavai už šią žinutę.',
'Cancel error' => 'Negali atšaukti savo karmos paskyrimo žinutei, už kurią nebalsavai.',
'Karma features' => 'Pun karma savybės',
'Karma legend' => 'Pun karma parinktys',
'Disable minus' => 'Uždrausti mažinti karmą',
'Disable minus info'=> 'Pažymėk, jeigu nori neleisti vartotojams mažinti kitų žmonių karmos.',
'Plus interval' => 'Karmos didinimo intervalas',
'Plus interval info'=> 'Laiko tarpas minutėmis, kuris turi praeiti tarp dviejų karmos padidinimų.',
'Minus interval' => 'Karmos mažinimo intervalas',
'Minus interval info'=> 'Laiko tarpas minutėmis, kuris turi praeiti tarp dviejų karmos sumažinimų.',
'Plus interval rest' => 'Turi praeiti bent %s minučių tarp karmos padidinimų.',
'Minus interval rest'=> 'Turi praeiti bent %s minučių tarp karmos sumžainimų.',
'Alt cancel' => 'Atšaukti',
'Alt thumbs up' => 'Padidinti',
'Alt thumbs down' => 'Sumažinti'
);
?>
Excellent extension..
Is there any way one can remove just the - (negative) part of it?
Reason: just want members to have the option to thumbs up a post, not down!
I would like to add so everyone can see who's "rated" the post. Can anybody help me?
I can't even find where i edit the "post_options"
Thx in advance!
Any updates for punbb 1.4.2?
I have found a problem where the thumbup and thumbdown only show up in a post. I dont see it in other posts. Any idea why?
Hi Slavok
I was wondering what license this was released under (if any)?
Cheers
Propably GNU GPL, like PunBB.
Ah yes, just found in the source..
/**
* Adds karma/reputation to posts.
*
* @copyright (C) 2008-2009 PunBB
* @license [url]http://www.gnu.org/licenses/gpl.html[/url] GPL version 2 or higher
* @package pun_karma
*/
Will be this extension officialy updated to 1.4 and moved to extensions section?
Is there way to make it work on 1.4.2 ?
PunBB Forums → Supported extensions → Karma (pun_karma)
Powered by PunBB, supported by Informer Technologies, Inc.