This module provides a field type in order to assign a "probability weight" to it.
A probability weight is a float number which indicates a weight... not a fixed weight as many other modules do, but a weight with certain degree of randomness in order to ensure desired content appears in the first places with some probability, but not always. This module allows Views module to sort content in that way.
It's very useful in marketing context, where some products are desired to be promoted, but not always, in order to avoid being annoying.
Many fields can be assigned to any entity type, so you can have not only a unique probability weight per content, but many as desired.
Project page: http://drupal.org/sandbox/grisendo/1791222
Git repo: http://git.drupal.org/sandbox/grisendo/1791222.git
Drupal version: 7.x
Module version: 7.x-1.x
Reviews of other projects (part 1):
- http://drupal.org/node/1784544#comment-6637674
- http://drupal.org/node/1820028#comment-6637376
- http://drupal.org/node/1678248#comment-6640988
Reviews of other projects (part 2):
- http://drupal.org/node/1839230#comment-6726530
- http://drupal.org/node/1839370#comment-6726564
- http://drupal.org/node/1742802#comment-6726694
Reviews of other projects (part 3):
- http://drupal.org/node/1839230#comment-6738138
- http://drupal.org/node/1839370#comment-6738180
- http://drupal.org/node/1841920#comment-6738264
Reviews of other projects (part 4):
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | probabilistic_weight.jpg | 148.28 KB | grisendo |
| #12 | probabilistic_weight_CODER.png | 99.01 KB | carwin |
| #10 | http git.drupal.org sandbox grisendo 1791222.git ventral.png | 251.21 KB | grisendo |
| #3 | http git.drupal.org sandbox grisendo 1791222.git ventral.png | 90.44 KB | grisendo |
Comments
Comment #1
developmenticon commentedPlease include Sandbox Project, Git Repository and drupal version to get review.
Comment #2
zymphonies-dev commentedHI
1) add git repository in summary
git clone http://git.drupal.org/sandbox/grisendo/1791222.git probabilistic_weight2) Please fix "ventral automated code review" errors
http://ventral.org/pareview/httpgitdrupalorgsandboxgrisendo1791222git
3) Attach screenshot in this page
Thanks
Comment #3
grisendo commentedThanks!
Sandbox project: http://drupal.org/sandbox/grisendo/1791222
Git repository: http://git.drupal.org/sandbox/grisendo/1791222.git probabilistic_weight
Drupal version: 7.x
Module version: 7.x-1.x
Ventral report is attached as a picture, and the URL was http://ventral.org/pareview/httpgitdrupalorgsandboxgrisendo1791222git
How could I fix those views-handlers related errors? I can't find other contrib modules (like Webform) with a solution for that.
Comment #4
zymphonies-dev commentedHI,
Still have few more errors. please fix.
Thanks
Comment #5
grisendo commentedI would like to, but I don't know since most of them are related to Views Handlers.
I cannot change option_definition function name since it's a overriden function with that name used in Views, and I need to override it.
How should I proceed with those kinds of errors?
Also, in all Views Handlers, and all modules I know which extends them (as I said before, i.e. Webforms), classes are named like mine: probabilistic_weight_handler_sort_weight, with underscores and lowercase.
Comment #6
zymphonies-dev commentedHI grisendo,
http://drupal.org/coding-standards
please go through this link. you will get brief idea about drupal coding standards
try, you can take your time and fix the issues.
if you are not able to fix. i will help you.
Thanks
Comment #7
grisendo commentedBut I can't change "option_definition" method name to "optionDefinition" or any other, since it's a method that Views has named that way in the class I am extending (views_handler_sort), and I need to override it, it's impossible to give it another name.
Comment #8
zymphonies-dev commentedok cool,
we can check with other reviewers.
Reviewers,
Please review this module.
Thanks
Comment #9
grisendo commentedThanks anyway for your help :)
Comment #10
grisendo commentedI just fixed all errors I can.
Now just 3 errors left, all of them related to Views Handlers.
Just like this: http://drupal.org/node/1546758#comment-5914906
Here is the revision link, and I also attached the new revision screenshot:
http://ventral.org/pareview/httpgitdrupalorgsandboxgrisendo1791222git
Comment #10.0
grisendo commentedGit repo, project page, version, 2 reviews
Comment #11
grisendo commentedPAReview: review bonus
Comment #12
carwin commentedReview
I´ve attached the automated report of Coder's output as a .png file to this comment.
class probabilistic_weight_handler_sort_weight extends views_handler_sort, your declaration of files[] in the .info file is valid.Notes
I also took the time to manually try the module out and it works as described. I would urge you to make your project page the best it can be, but I won't hold up the release of this over something piddly like that.
Result
So, without further ado, I hereby mark this module RTBC.
Comment #13
klausiThank your for your reviews. When finishing your review comment also set the issue status either to "needs work" (you found some problems with the project) or "reviewed & tested by the community" (you found no major flaws).
manual review:
Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #14
grisendo commentedThanks all of you for your reviews!
I made some changes:
I would like to create an awesome explanatory screenshot, but I am not inspired today :(
Comment #15
grisendo commentedOk, I finally decided to make a graphic, since I didn't found any screenshot which could be not explanatory at all.
I have attached here and in the project page: http://drupal.org/sandbox/grisendo/1791222
Comment #16
grisendo commentedComment #16.0
grisendo commentedThird revision, PAReview: review bonus
Comment #17
grisendo commentedReviewed three more projects:
http://drupal.org/node/1839230#comment-6726530
http://drupal.org/node/1839370#comment-6726564
http://drupal.org/node/1742802#comment-6726694
Review access term added.
Comment #17.0
grisendo commentedBonus review
Comment #18
stred commentedI will review it deeper when I'll make it work!
ps: it works now no idea why it didn't...
Comment #19
klausimanual review:
<script>alert('XSS');</script>as help text for the field I get a nasty javascript popup on the form when editing this field. You need to sanitize user provided input in #description. Please read http://drupal.org/node/28984 again.Security issues are blockers, otherwise this looks nearly ready. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #19.0
klausiMisstyping
Comment #20
grisendo commentedNew reviews
http://drupal.org/node/1839230#comment-6738138
http://drupal.org/node/1839370#comment-6738180
http://drupal.org/node/1841920#comment-6738264
Comment #21
grisendo commentedalert('XSS');
as help text for the field I get a nasty javascript popup on the form when editing this field. You need to sanitize user provided input in #description. Please read http://drupal.org/node/28984 again.
Added 3 new reviews, and Review Bonus tag.
Comment #22
klausiPlease don't remove the security tag, we keep that for statistics and to show examples of security problems.
Looks RTBC now. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #22.0
klausiThree new reviews for Bonus Review
Comment #23
grisendo commentedThree new revisions, adding Review Bonus tag.
Comment #24
klausino objections for more than a week, so ...
Thanks for your contribution, grisendo!
I updated your account to let you promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and get involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.
Comment #25.0
(not verified) commentedThree new revisions, bonus review tag