FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Plugins and Code Hacks » Karma/user reputation patch (patch to allow rate users based on their posts and create user karma)  () 2 Votes
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Karma/user reputation patch [message #166923] Fri, 30 March 2012 14:54 Go to next message
trepstrer is currently offline  trepstrer   Czech Republic
Messages: 9
Registered: November 2009
Karma: 2
Junior Member
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 14:59]

Report message to a moderator

Re: Karma/user reputation patch [message #166952 is a reply to message #166923] Sat, 07 April 2012 01:36 Go to previous messageGo to next message
Anonymous
In looking for

Τhanks!
Re: Karma/user reputation patch [message #166964 is a reply to message #166952] Tue, 10 April 2012 12:49 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Would be great if we could integrate this into FUDforum.
However, you've copyrighted it!?!
Re: Karma/user reputation patch [message #166967 is a reply to message #166964] Tue, 10 April 2012 12:58 Go to previous messageGo to next message
trepstrer is currently offline  trepstrer   Czech Republic
Messages: 9
Registered: November 2009
Karma: 2
Junior Member
Only the new files I created. However, it's still under GPL so feel free to use it or modify it.
Re: Karma/user reputation patch [message #167057 is a reply to message #166967] Thu, 19 April 2012 13:24 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
I've applied your patch, but cannot see any up and down rating links/buttons. CSS declarations for "a.up" and "a.down" are never used. Can you please post the missing code as well?
Re: Karma/user reputation patch [message #167058 is a reply to message #167057] Thu, 19 April 2012 13:34 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Sorry, it is actually working! I've missed the "Rate author of the post: +1 -1" links.
Re: Karma/user reputation patch [message #167059 is a reply to message #167057] Thu, 19 April 2012 13:34 Go to previous messageGo to next message
trepstrer is currently offline  trepstrer   United States
Messages: 9
Registered: November 2009
Karma: 2
Junior Member
Everything is already in the patch. Look into patched thm/default/tmpl/drawmsg.tmpl.
Re: Karma/user reputation patch [message #167066 is a reply to message #167059] Fri, 20 April 2012 18:42 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
The Karma/user reputation patch was committed and will be part of FUDforum 3.0.4. To enable it, navigate to the Global Settings Manager and change "Karma" from "no" to "yes".
Re: Karma/user reputation patch [message #167800 is a reply to message #166923] Sat, 29 September 2012 20:49 Go to previous messageGo to next message
gooner is currently offline  gooner
Messages: 1
Registered: September 2012
Karma: 0
Junior Member
hi!
I have a question about mod

I check enable on the Karma in settings..ok, I see +1 -1 in every message..but i can't see quantity of Karma in message and under user avatar

can you help me, please?
Re : Re: Karma/user reputation patch [message #168122 is a reply to message #167066] Mon, 04 February 2013 00:02 Go to previous messageGo to next message
LucZC is currently offline  LucZC
Messages: 4
Registered: February 2013
Location: France
Karma: 0
Junior Member
Thanks for the inclusion of this patch in the code base.

This may be a good basis to implement a future REDDIT-like comment ranking mechanism, that I will describe later in FUDforum Suggestions.
Re: Karma/user reputation patch [message #168220 is a reply to message #166923] Wed, 06 March 2013 17:41 Go to previous messageGo to next message
trepstrer is currently offline  trepstrer   United States
Messages: 9
Registered: November 2009
Karma: 2
Junior Member
I have discovered that users were to able vote repeatedly for the same message under certain conditions.
Attached is a patch which will fix that and allows only one vote per message per user.

[Updated on: Wed, 06 March 2013 17:41]

Report message to a moderator

Re: Karma/user reputation patch [message #168481 is a reply to message #167066] Mon, 06 May 2013 02:45 Go to previous messageGo to next message
littleking is currently offline  littleking   United States
Messages: 187
Registered: January 2007
Karma: 2
Senior Member
naudefj wrote on Fri, 20 April 2012 14:42
The Karma/user reputation patch was committed and will be part of FUDforum 3.0.4. To enable it, navigate to the Global Settings Manager and change "Karma" from "no" to "yes".


in my 3.0.4 my karma shows up, but does not seem to do anything when clicking the +1 or -1, the +1 and -1 disappear, but nothing gets added to the users karma rating

[Updated on: Mon, 06 May 2013 03:47]

Report message to a moderator

Re: Karma/user reputation patch [message #168483 is a reply to message #168481] Tue, 07 May 2013 06:14 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
I've just +1'ed you and it's working just fine on this forum.
Re: Karma/user reputation patch [message #168485 is a reply to message #168483] Tue, 07 May 2013 11:49 Go to previous messageGo to next message
littleking is currently offline  littleking   United States
Messages: 187
Registered: January 2007
Karma: 2
Senior Member
think you can take a look at encoreclassifieds.com/forum/
Re: Karma/user reputation patch [message #187573 is a reply to message #168485] Thu, 13 September 2018 15:01 Go to previous message
naudefj is currently offline  naudefj   United States
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Patch was applied @ https://sourceforge.net/p/fudforum/code/6198
Thank you Petr!
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: How would i change the Id of a whole thread ?
Next Topic: Make the » in the Pager jump to the very end ?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 10:20:42 GMT 2024

Total time taken to generate the page: 0.05946 seconds