invite_og_plugin
Name:
invite_og_plugin

Description:
Enables users to use the invite plugin to invite friends directly to their groups. This is done by hooking into the invite form, providing a selectbox with organic groups and invite friends directly into this groups.

Drupal Core Version:
7.x

Sandbox:
http://drupal.org/sandbox/killerpoke/1441644

Clone Git Repo:
git clone http://git.drupal.org/sandbox/killerpoke/1441644.git invite_og_plugin

Reviews of other projects
http://drupal.org/node/1615222#comment-6386280
http://drupal.org/node/1663576#comment-6386074
http://drupal.org/node/1666230#comment-6381866

I know this is a realy small project, but some people in the issue-queue of my sandbox said I should submit this as a real module.

You may also be interested in this issue, where this sandbox-project started:
http://drupal.org/node/1440384

thank you!

Comments

SebCorbin’s picture

Status: Needs review » Needs work

Ran automatic review, found code style errors (please configure your IDE to trim whitespace at end of lines)
See http://ventral.org/pareview/httpgitdrupalorgsandboxkillerpoke1441644git-7x

Otherwise it looks good to me

killerpoke’s picture

Status: Needs work » Needs review

thank you for your comment!

I'v fixed the formating errors you found. Any other issues found?

best,
killerpoke

patrickd’s picture

As installation and usage instructions are quite important for us to review, please take a moment to make your project page follow the tips for a great project page. Also make sure your README.txt follows the guidelines for in-project documentation.

We do really need more hands in the application queue and highly recommend to get a review bonus so we can come back to your application sooner.

saltednut’s picture

Tested module in sandbox environment and it is working for the prescribed use case.

Notes:

Please include a link to your git repo to make review easier.

git clone http://git.drupal.org/sandbox/killerpoke/1441644.git invite_og_plugin

README.txt has some unnecessary spaces during line breaks and and the end of a few lines, probably from your IDE.

I also suggest expanding your project page and perhaps including a working demo/screenshots.

killerpoke’s picture

thank you for your review!
I will commit all changes later this week and expand the project description.

Btw. I'm finaly switching from Coda to Sublime Text 2, so my IDE will not spam the files with spaces :)

killerpoke’s picture

I'v updated the README.txt as well as the project page. Any other suggestions?

thank you!

stevebab’s picture

Any word on the approval of this wonderful project?

anwar_max’s picture

Manual Review:

The module & code looks sound.

Automated Review:

Please try to resolve below issue.
FILE: ...al-7-pareview/sites/all/modules/pareview_temp/test_candidate/README.txt
--------------------------------------------------------------------------------
FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
14 | ERROR | Files must end in a single new line character
--------------------------------------------------------------------------------

killerpoke’s picture

@anwar_max I can't reproduce this error, the README.txt does ends with a single line. Have you checked my code?

I have created a secound branch to work with the new OG 7.x-2.x Beta. http://drupal.org/project/1441644/git-instructions

Are there any other suggestions?

thanks!
killerpoke

saltednut’s picture

I've found this error to actually go away by deleting the last line on README.txt in the past. This was using Vim.

Might be a PAReview bug or something we are doing wrong?

killerpoke, please do some project reviews and list them in the Issue Summary. You can then tag this with 'PAReview: review bonus' for every 3 you do. This will expedite the process of getting you full project access.

Milena’s picture

Status: Needs review » Needs work

Remove all files from master branch and set default branch to your desired one. What's more there is no need to create two branches for 7.x before your module becomes full module. Consider making it one 7.x-1.x branch.

.module file

define('INVITE_OG_PLUGIN_GROUP_PERMISSION', "invite");
You have two types of parenthisis. Use one consistent method. There is no need to use "" (php parses such strings to find if there are any variables inside).

You do not need to document hook functions so well. It is known what parameters they have, but it is not a bug. I'm just sharing some thoughts.

If you alter only one form you should use hook_FORM_ID_alter rather than form_alter.

You are using $_POST, but as long as in invite_save drupal_write_record is called it probably is safe against the SQL injection.
But users can fake $_POST request, I believe you should use drupal_token function to check if there is no way of sending fake requests. Please look into http://drupalscout.com/tags/csrf.

Please place full stop at the end of each sentence in your comments.

'#required' => FALSE, is a default property. You do not need to place it, but it is not a bug.

You need not to split conditions in your if clausule into separate lines. 80 character limit applies only to comments.

I'm sending it back to needs work because of that tokens in hook_invite_send(). Although I'm not experienced in reviewing applications so if anyone thinks that it should not be needs work, please, feel free to change.

killerpoke’s picture

Status: Needs work » Needs review

thank you for your review.

I implemented your suggestions for the define-statement and comments, however I couldn't be see how to do the following:

  • I have to branches to address the two branches of organic group. I don't know, if this is the right way to do this, but as you can see in my issue queue (http://drupal.org/node/1469348) there is the need to have two versions.
  • "invite_og_plugin_invite_send" is called after the invite module check the token and all of it. I would prefer to dont use the values from the global $_POST-Array, but that isn't posible by the invite-hook-implementation.

thank you for reviewing!

Milena’s picture

Status: Needs review » Reviewed & tested by the community

Thank you for your explanation and sorry I did not check that out.
Other issues are not RTBC blocker, so I'm changing status.

Milena’s picture

Issue summary: View changes

Added the git clone repo command

killerpoke’s picture

Issue tags: +PAreview: review bonus

PAReview: review bonus

klausi’s picture

Assigned: Unassigned » klausi
klausi’s picture

Assigned: klausi » Unassigned
Status: Reviewed & tested by the community » Fixed

There is still a master branch, make sure to set the correct default branch: http://drupal.org/node/1659588 . Then remove the master branch, see also step 6 and 7 in http://drupal.org/node/1127732

manual review:

  1. 7.x is not a good branch name, please rename it to 7.x-1.x
  2. invite_og_plugin_form_invite_form_alter(): do not document hook parameters as they are known anyway, see http://drupal.org/node/1354#hookimpl
  3. You should only document function parameters if you add a description. Otherwise it does not make sense as I can read the parameter names form the function signature anyway.
  4. invite_og_plugin_invite_send(): I think you should use your own form submit callback instead of accessing $_POST here.

Although you should defintively fix that I see no security issues or other blockers here.

Thanks for your contribution, killerpoke!

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.

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

added reviews for bonus-program