Karma/user reputation patch [message #166923] |
Fri, 30 March 2012 10:54 |
trepstrer
Messages: 9 Registered: November 2009
Karma:
|
Junior Member |
add to buddy list ignore all messages by this user
|
|
Hi,
I've created a small patch to add karma feature into current FUDforum 3.0.3. Initially I thought it should be a plugin, but it turned out to be easier to write a patch.
The patch require modification of the database (attached SQL script) and some new messages (also in the patch)
Features:
* full AJAX support (no page reloads)
* use current Rate Topic and Can rate permissions
* users with "can rate" permission can add +1 or -1 to the author of the post
* author can't change karma for own posts
* forum admin can remove karma rating (click on Karma counter next to the user)
Installation:
1. install FUDforum 3.0.3
2. edit attached fudforum_karma.sql to match your table prefix (it's on default fud30_)
3. import fudforum_karma.sql - 'mysql -p <database_name> < fudforum_karma.sql'
* this will add new table karma_rating_track and also add new column to the users table (named karma)
4. apply patch to forum files in web directory (default /var/www/html/fudforum) by 'patch -p0 < fudforum_karma.patch'
5. apply patch to forum data folder (default /var/www/FUDforum) by 'patch -p0 < fudforum_karma_datadir.patch'
6. login to forum administration and rebuild default theme. You should see "Karma: 0" next to user avatar. Works only for default theme.
[Updated on: Fri, 30 March 2012 10:59] Report message to a moderator
|
|
|