Closed (fixed)
Project:
User points Nodes and Comments
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
9 Dec 2010 at 18:31 UTC
Updated:
22 Feb 2011 at 11:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
BenK commentedWhen we bring over userpoints_revision, we also need to make the following fixes:
I tried out the latest patch (http://drupal.org/node/869770#comment-3280332) and I'm getting the following errors on the Userpoints settings page (admin/config/people/userpoints/settings):
A. At the top of the page I'm getting the following notice:
Notice: Trying to get property of non-object in userpoints_revision_userpoints() (line 89 of /Users/benkaplan/git/drupal-dev/sites/all/modules/userpoints_contrib-DRUPAL-6--1/userpoints_revision/userpoints_revision.module).
B. In the "POINTS FOR CREATING NODE REVISIONS" settings area, the content type names are not being shown. This is probably related to the above notice. Basically, the field labels are being listed as "Kudos for creating a revision of a" (with the content type name missing). Because I have seven different content types on my dev site, I have 7 incomplete field labels. I also have seven instances of the notice shown in A.
C. The settings are using the old fieldset method instead of the new vertical tabs.
D. I'm wondering if we should move the per content type settings to the individual content type edit page (like we did for Userpoints Nodes and Comments) and just have global settings on this page.
E. Not sure about the "Award points for revisions by the node author" label. Shouldn't points be awarded even if someone other than the node author (who has permission) is making revisions? That is how it would be in my use case. I'm not sure if this setting is meant to enable functionality for the entire module or if it is meant to toggle whether the node author can receive points.
Once we get A and B fixed (so that I can set points per content type), I'll be able to do more testing. I'll likely be using this in production sometime soon.
--Ben
Comment #2
berdirNote done yet, but a first step to properly integrate this into the userpoints_nc project.
- Renamed to userpoints_nc_revision
- Integrated onto the settings vertical tabs of userpoints_nc. I'm not 100% sure if this a good idea as there are a lot of settings in that group now. Both generic and per content type. Feedback is welcome.
- Also updated the operation/description handling to the 7.x standards.
- The module tried to detect changes in the revision and has given the points only if the body length differed by 20 or if it found 20 different characters (by going trough one by one). Because body is now a field and might or might not exist and because there could many other fields which are changed, I decided to remove this feature for now. Our flood_control idea is probably a better way to stop user from cheating the points system anyway.
A. & B. & D. Moved the content type specific settings to the content type form.
C. Moved into the Content and comments vertical tab for now
E. This confused me too first, it actually means the following: The module always gives the defined amount of points to users which are *not* the node author. This settings also enables it for the node author. Not sure if we should keep the setting, remove it or simply enable it by default.. Added a description for now...
Uploading the module as a tar.gz, I can't create patches with new directory anymore, strange errors...
Comment #3
berdirFixed a typo that caused a fatal error.
Comment #4
berdirFixed a typo that caused a fatal error.
Comment #5
BenK commentedAs discussed in IRC, I'm getting the following error message when saving a node:
PHP Fatal error: Call to undefined function dpm() in /Users/benkaplan/git/drupal-rc1/sites/all/modules/userpoints_nc-DRUPAL-7--1/userpoints_nc_revision/userpoints_nc_revision.module on line 13
Looks like a residual debug call.
--Ben
Comment #6
berdirRemoved debug call
Comment #7
jcarlson34 commentedThanks for working on this guys. Subscribing...
Comment #8
BenK commentedJust completed testing. The functionality of this module is working very well. Points are being awarded for revisions as expected. And since we're postponing the "determine what is an eligible revision" feature, there is not much left to do. Here's what I've got:
1. As discussed in IRC, split out the revision-related settings to its own vertical tab on both the global settings and content-type settings pages. Label this new vertical tab "!Points for revisions"
2. On both the global settings and content type settings pages, the word "points" is hard-coded in the label "Award points for revisions by the content author". So that this reflects points branding, replace "points" with "!points". Also, make this setting appear beneath the other two revision settings (which will improve usability and workflow) as the last setting on the page.
3. On the global settings page, change the description of the content author setting. It currently reads: "By default, only users which are not the content author are given !points for new revisions. Only if checked are content authors awarded too. This can be overridden for each content type." Change this to: "By default, the content author is not eligible to earn !points for new revisions (only other users who submit revisions can earn !points). But if this option is checked, the content author can earn !points, too. This can be overridden for each content type."
4. For the content author setting description on the content type edit page, change it to: "If unchecked, the content author is not eligible to earn !points for new revisions (only other users who submit revisions can earn !points). But if this option is checked, the content author can earn !points, too." It is a slightly revised version of what appears on the global settings page.
5. On the content type settings page, the labels and descriptions for both the points and category are incorrect. It looks like you may have copied these from the global settings page, but there should be some differences. On this page, the label "Default !points for a new revision" should be "!Points for a new revision" (since these aren't defaults on this page). And the description should be changed to: "Set the number of !points to be awarded when a user adds a new revision."
Likewise, the "Default !points category for new content" label should be changed to: "!Points category for a new revision". The description should be changed to: "Choose the category of !points to be used when a user adds a new revision."
6. The automated description currently uses the following format: "New revision of %title." To better match the syntax of other up_nc automated descriptions (which usually start with a past tense verb), use this format instead: "Revised %title."
--Ben
Comment #9
berdir1. Changed. Named it "Content revisions" on the global settings, that works imho nice together with "Content visits".
2-6. Changed.
Comment #10
berdirComment #11
BenK commentedJust completed testing. There's not much stuff left so hopefully this will be the last go-around:
1. "Default !points category for a new revision" is appearing on the wrong tab on the global settings page. It should be appearing on the "Content revisions" tab. (And yes, I like your suggestion for the tab name.)
2. The "Award !points for revisions by the content author" setting is still appearing above the other two settings (on both the global settings and content type page). Make this setting the third one listed so that the order from top to bottom is: Points, category, content author option. Make this change on both the global settings and content type page.
5. The "!Points category for new content" label still needs to be changed to: "!Points category for a new revision". It is incorrectly being labeled as content instead of as a revision.
7. NEW: Add simple summaries to the vertical tabs.
Comment #12
BenK commentedBumping this so I don't lose track of it...
Comment #13
berdirThis better be good! ;)
1-4 Fixed.
7. Added, very similar to userpoints_nc
8. NEW: Added enabled checkbox to global and content type settings.
Comment #14
berdirComment #15
BenK commentedThis is looking and working great!
There's just one small string change that we already discussed in IRC:
At the content type level, the description for the Enabled setting reads: "If checked, kudos can be awarded for creating or commenting upon content of this type."
Instead, this should be:
"If checked, !points are awarded for new revisions of content of this type."
Other than that, this is RTBC! :-)
--Ben
Comment #16
berdirCommited!