Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Nathaniel on August 13, 2008, 10:45:32 AM

Title: Limit Karma
Post by: Nathaniel on August 13, 2008, 10:45:32 AM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1308)

Limit Karma Mod 1.4 by Nathaniel
Overview
This Mod allows you to restrict that amount of Karma that MemberGroups can give per Post/PM.

Settings are found in the Admin panel:
For SMF 1.1.x: "Features and Options" section -> "Karma" tab.
For SMF 2: "Configuration" drop down menu -> 'Features and Options' -> 'Karma' Tab.

For SMF 2, please remember that you must enable Karma from the admin section under "Configuration" -> "Features and Options", before the settings for this mod will appear.

SMF Version Support
This mod is officially supported for SMF 2.0 final and above only. Below is a list of available versions of this mod and the previous versions of SMF that they supported. Use them at your own risk. The mod author will not be supporting or upgrading this mod in any way for versions of SMF below 2.0 final.

Version 1.03: SMF 1.1.x and SMF 2 RC2 or below.
Version 1.4: SMF 2 RC4 and above.

Donate
If this mod has helped you, then feel free to support the developer by Donating (https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=VCFQ7MJNVXLLA&lc=AU&item_name=Donation&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted). Any amount of money is welcome.

Themes/Templates
This mod has very few edits to the SMF template files. Even so, you won't get the full functionality of the mod if you don't make these edits. These edits are for your 'PersonalMessage.template.php' and 'Display.template.php' template files, if your custom theme doesn't have these files then it should work automatically.

These edits are only necessary if you don't want people to be able to see the 'Add Karma' links for each Post/PM when they have reached their limit for that Post/PM.

For SMF 1.1.x and SMF 2:
Code ("Find (Display.template.php)") Select
         // Is this user allowed to modify this member's karma?
         if ($message['member']['karma']['allow'])


Code ("Replace") Select
         // Is this user allowed to modify this member's karma?
         if ($message['member']['karma']['allow'] && empty($message['limitkarma']))


Code ("Find (PersonalMessage.template.php)") Select
            // Is this user allowed to modify this member's karma?
            if ($message['member']['karma']['allow'])


Code ("Replace") Select
            // Is this user allowed to modify this member's karma?
            if ($message['member']['karma']['allow'] && empty($message['limitkarma']))


If you have any issues or questions, regarding those template edits for your custom theme, then you can ask for support in the support topic for this mod. (http://www.simplemachines.org/community/index.php?topic=255346.0)

Version Changes
v1.4 - 07 November 2010
Updated for SMF 2 RC4.

v1.03 - 20 November 2009
Added support for SMF 2 RC2.

v1.02 - 18 August 2009
Updated mod for SMF 1.1.10 compatibility - Added a workaround for the SMF version bug.

v1.01 - 14 Augest 2008
Minor bug-fix with new members.

v1.0 - 30 July 2008
Original Mod release.
Title: Re: Limit Karma
Post by: jepot5 on August 13, 2008, 11:59:35 PM
gonna try it out... sweet

EDIT: looks very nice, but can it be modded more to make it work with the karma description mod?

I'm getting this with both installed
Fatal error: Call to undefined function is_limitedbykarma() in /home2/jepot12/public_html/Sources/Display.php on line 905
Title: Re: Limit Karma
Post by: ccbtimewiz on August 14, 2008, 12:11:44 AM
Great mod, works well.
Title: Re: Limit Karma
Post by: Nathaniel on August 14, 2008, 03:14:07 AM
@ccbtimewiz,
Actually it has a really small bug. :P

I am going to make a new version of this mod shortly so that the bug is fixed. ;)
Title: Re: Limit Karma
Post by: jepot5 on August 14, 2008, 04:38:09 AM
can you also make it compatible with the karma desc mod?
Title: Re: Limit Karma
Post by: Nathaniel on August 14, 2008, 04:56:14 AM
@jepot5,
Hmm, I will have a look at it, and see if that is possible. ;)
Title: Re: Limit Karma
Post by: Nathaniel on August 14, 2008, 06:47:22 AM
I have now updated the mod to version 1.01. Like I said, there was a really small bug that needed fixing, thank you to the customization team for pointing it out.

Version 1.01 Changes:
Minor bug-fix with new members.

@jepot5,
In terms of fixing the compatibility issues with the Karma Description Mod, its unlikely that it will ever happen as a part of this mod, because the Karma Description Mod changes the Karma system far too much, I will however have a look at writing a small tutorial showing the edits which can be made to fix the issue, this will probably happen when I get some more free time... ;)
Title: Re: Limit Karma
Post by: jepot5 on August 15, 2008, 12:08:16 AM
OK thanks
I think the Karma Desc mod has way too many errors, I can never uninstall it now

Can u incorporate a feature with this mod where you can add a comment to karma?
Title: Re: Limit Karma
Post by: Nathaniel on August 15, 2008, 02:01:47 AM
@jepot5,
This mod is a fairly simple one, its only designed to Limit Karma. If I have a look at features such as Adding comments to Karma, then that would have to be a different mod, because its not really related to the core functionality of this mod, which is to Limit Karma. If you want a mod that has that feature then you could ask in the Mod Requests Board (http://www.simplemachines.org/community/index.php?board=79.0), or you could always ask somebody to update/fix the Karma Desc mod, you could do this in the support thread for that mod, or you could make a new topic.
Title: Re: Limit Karma
Post by: jepot5 on August 15, 2008, 04:29:37 AM
ok, thanks for the help, this mod would be helpful
Title: Re: Limit Karma
Post by: Nathaniel on November 19, 2009, 06:37:56 PM
v1.03 - 20 November 2009
Added support for SMF 2 RC2.
Title: Re: Limit Karma
Post by: akbora on January 10, 2010, 10:18:45 PM
Unfortunately I am sending a new post but doesn't increase karma point?

I settled karma on, and limit karma per post 1.
Title: Re: Limit Karma
Post by: Nathaniel on November 07, 2010, 05:31:49 AM
v1.4 - 07 November 2010
Updated for SMF 2 RC4.
Title: Re: Limit Karma
Post by: big red on December 24, 2010, 11:11:51 PM
Quote from: Nathaniel on November 07, 2010, 05:31:49 AM
v1.4 - 07 November 2010
Updated for SMF 2 RC4.

    Thank You for the Mod  :D

  There is one more thing i need and hope you would know how to do it.

     With your mod, i can limit a member to 1 vote/post. I would like to limit the "post" to be able to only receive "1 vote" period. Once a member gives a post a point, no other member can give another.

     Thanks
Title: Re: Limit Karma
Post by: Kcurek on October 21, 2012, 03:00:59 PM
Hi, please tell me whether this mod works correctly with SMF 2.0.2, because I'm not sure whether I can install it.
Thanks.