Closed (fixed)
Project:
User Points Contributed modules
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
8 Oct 2010 at 03:56 UTC
Updated:
4 Mar 2011 at 04:31 UTC
Jump to comment: Most recent file
Comments
Comment #1
gilgabar commentedHere is a patch that rewrites the module to allow per flag type points. It includes separate points and categories for the flagging user and flagged content author (or flagged user if it is a user flag). It also includes the daily threshold and moderation options per flag type.
Comment #3
gilgabar commentedMaybe the testbot will like this better.
Comment #4
mr.j commentedThanks gilgabar - will try it out and let you know how it goes.
Comment #5
lobo235 commentedThanks for the patch, gilgabar. I have userpoints_contrib-6.x-1.0-beta1 and the patch from #3 applied without any issues and I was able to test it with a few different flags that we use. After applying the patch I had to clear the cache to get the settings page to show the Flag settings section correctly but after that it worked like a charm. Great work!
Comment #6
berdirThere should be a space before $Id$ but it doesn't matter as it will be removed anyway once we migrated to git (and that is soon!)
We usually don't indicate the term depth when displaying them in userpoints. You should also use the userpoints_get_categories() helper function.
- In Drupal 6, the operation is publicly shown. So it should probably use one or two "propper" words. In D7, that has changed. Is $flag->name the user facing name or is there something else that could be used instead?
- This needs to use @content_type/id.
Very nice work on this patch, will commit once you did a re-roll of the few minor things above.
Powered by Dreditor.
Comment #7
gilgabar commentedThanks for the review Berdir. Rerolled patch fixes the space, implements userpoints_get_categories(), replaces $flag->name with $flag-title to be more human readable in the operation field as well as in the points settings form, and updates the text replacement with '@'.
The categories snippet is straight from userpoints_nc, so it looks like that should be patched as well.
Comment #9
gilgabar commentedPatch path was relative to userpoints_flag instead of userpoints_contrib.
Comment #10
BenK commentedSubscribing
Comment #11
berdirOnly did some brief testing, but this a huge improvement, thanks for the fast re-roll.
I was thinking about an upgrade path but that doesn't make much sense, chances are that all sites will want to re-visit their settings anyway. So all that could possibly be done is print a warning that the settings need to be re-visited, probably with a link point to those.
You're welcome to write a patch for that but I went ahead and commited this.
Comment #12
BenK commentedIs there any way to incorporate this patch into the D7 port of userpoints_flag that is underway on the following thread?
http://drupal.org/node/871116
--Ben
Comment #13
madeinfr commentedThis patch works very well and saves my Web site.
All my congratulations !