Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hey guys, while working on a recent project, I found the need to add some functionality to the userpoints_votingapi module. Essentially, I needed to attribute certain votes to specific userpoints categories. I accomplished this by setting VotingAPI tags on the individual votes that correlated to the userpoints categories that I needed to attribute the points to. I made a patch to update the module, in case others might find this useful.
Comment | File | Size | Author |
---|---|---|---|
#5 | use_votingapi_tags_for_categories-2511600-5.diff | 9.22 KB | omegamonk |
Comments
Comment #1
omegamonk CreditAttribution: omegamonk at Achieve Internet commentedUpdating the patch to a proper patch name. Sorry about that.
Comment #2
mvlabat CreditAttribution: mvlabat as a volunteer commentedThank you for your contribution!
Your patch opened my eyes to a whole bunch of coding style issues. :)
I'm sorry about that, but could you, please, remake your patch using the latest dev version? It is now quite difficult to sort out what new your patch actually brings. Thank you again :)
Comment #3
omegamonk CreditAttribution: omegamonk at Achieve Internet commentedNo problem. Glad I could contribute the changes back. :) The patch is updated now. Thanks for your work on the module too! :)
Comment #4
omegamonk CreditAttribution: omegamonk at Achieve Internet commentedThere was one issue with my last patch. Uploaded the fixed version.
Comment #5
omegamonk CreditAttribution: omegamonk at Achieve Internet commentedI'm going to throw one more update in there. During some additional testing, I discovered that the delete queries didn't take the tid into account, when removing transactions. I updated the *can_delete() function to add the tid as an argument and updated all four queries to use the tid as a condition, as well. Sorry about throwing another update at you.