The AllForGood module provides a simple interface, in the form of a Drupal block, to automatically retrieve and display search results from the AllForGood volunteer opportunities search engine at http://allforgood.org/ . A link to the sandbox project is here. You should be able to grab my code with "git clone --branch 6.x-1.x forestmonster@git.drupal.org:sandbox/forestmonster/1251324.git allforgood". This project is for Drupal 6, although a Drupal 7 version is in the works. Thanks!

Reviews of other projects
Diceware
Deep Survey
Anonymous File Sharing

Comments

forestmonster’s picture

Priority: Normal » Major

Adjusted priority in accordance with the application review timelines.

jthorson’s picture

Status: Needs review » Needs work

Quick scan looks pretty good.

  • Remove $Id tags - these are a leftover from our CVS days, but are no longer required after we moved to Git.
  • Comment out your unused theme functions, so that they aren't logged in the theme registry
  • Might not be neccessary, but it's probably a good idea to run the returned results through a sanitization function (check_plain or filter_xss) ... treating the external data as 'untrusted'.
jthorson’s picture

Priority: Major » Normal
forestmonster’s picture

Thanks a lot for the review Jeremy -- taking a look at your suggested changes now.

forestmonster’s picture

Status: Needs work » Needs review

Jeremy I made your suggested changes. I already had a pretty safe approach to the HTML returned from AllForGood, running the title through PHP's strip_tags, and the URL through Drupal's check_url, but I appreciated your comment anyway because, of course, Drupal's filter_xss is much cooler than plain ol' strip_tags.

jthorson’s picture

Status: Needs review » Needs work

I'd suggest the theming implementation could still use a bit more cleanup:

/**
 * Implements hook_theme().
 */
function allforgood_theme() {
  return array(
    'allforgood_results' => array(
      'arguments' => array('content' => NULL),
    ),
  );
}

You define a theme hook, but don't have a theme_allforgood_results function ... and I don't see anything that would tie in your tpl.php file.

Otherwise, things generally look pretty good.

forestmonster’s picture

Status: Needs work » Needs review

Thanks Jeremy -- I was actually planning on delaying the full theme implementation. Would that block the module's approval, in your opinion? At this point I'm just playing the "developer, not a designer" card!

klausi’s picture

Status: Needs review » Needs work
  • project page is a little short, see http://drupal.org/node/997024
  • It appears you are working in the "master" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.
  • install file: doc blocks: the closing "*/" should be on a new line. See this for formatting: http://drupal.org/node/1354#files
  • allforgood_help(): indentation errors, the "case" statement should be 2 spaces further to the right.
  • allforgood_help(): no need to wrap the case string in "()"
  • "@param $url": the parameter description on the next line should be indented 2 spaces. Same for @return.
  • "$msg = 'No simplexml_load_string() function present.';": all user facing text should run through t() for translation.
forestmonster’s picture

Assigned: Unassigned » forestmonster

Yeah! Thanks for the comments klausi. I've updated the project page and will address these other issues as well.

misc’s picture

@forestmonster has been contacted to ask if the application is abandoned.

After ten weeks with a status of needs work: the applicant may be contacted by a reviewer to determine whether the application was indeed abandoned. The action taken by the reviewer should be documented in the project application issue.

http://drupal.org/node/894256

forestmonster’s picture

Hmm. Nope, not abandoned, MiSc. I guess I'm surprised... you didn't see my commits with fixes from last week?

misc’s picture

The application has been marked as need work since October. Doing commits on a sandbox project is not the same as wanting a review for full project access. If you want us to review it, you must mark it 'needs review'.

forestmonster’s picture

Status: Needs work » Needs review

MiSc, marking this "Needs review."

forestmonster’s picture

Assigned: forestmonster » Unassigned
Priority: Normal » Major

Yep, I would like a review for this very simple module. I've put it through the online version of the pareview script, and I'm following the application review timelines.

I'm not quite sure what to do to improve our review process. But... thank you for your time anyway. Can we move this forward?

klausi’s picture

The response time for a review is now approaching 4 weeks. Get a review bonus and we will come back to your application sooner.

forestmonster’s picture

Fair enough... Thank you klausi.

mkadin’s picture

Status: Needs review » Needs work

Good stuff, this module looks pretty darn close to perfect to me. PAReview.sh throws no errors and the code seems to be well documented / well organized.

Two small notes:
1) I don't think its proper to have tags inside t(''). See http://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/t/7#c... for how to insert a link into translatable text. You're doing this on line 56 in a Form API '#description'

2) Your module relies on the simple XML extension to PHP and it doesn't mention this on either the project page or in README.txt. If the error is thrown because the user doesn't have the function to parse the XML response. The error reads: 'No simplexml_load_string() function present.' Which wouldn't be very informative for a user who doesn't have this extension on, but doesn't know about php modules / doesn't know that specific one. I'd note that your module requires it in the README or on the project page and update the error message to say that not having that php extension may be the cause of the problem.

Other than that it looks good!

forestmonster’s picture

Status: Needs work » Needs review

Michael, thank you. If these are the most important things to fix, this module must be pretty much ready for final approval.

Line 56 looks okay to me:

[...]
'#description' => t('Enter your AllForGood.org API key here. This is required for use of the API. You may request a key at the <a href="@allforgood-url">allforgood.org site</a>.', array('@allforgood-url' => url('http://www.allforgood.org/docs/api.html', $options = array('fragment' => 'Access')))),
[...]

Since from http://api.drupal.org/api/drupal/includes%21common.inc/function/t/6 :

Here is an example of incorrect usage of t():

  $output .= t('<p>Go to the @contact-page.</p>', array('@contact-page' => l(t('contact page'), 'contact')));

Here is an example of t() used correctly:

  $output .= '<p>'. t('Go to the <a href="@contact-page">contact page</a>.', array('@contact-page' => url('contact'))) .'</p>';

Regarding SimpleXML, when you use Drupal's recommended PHP version, the SimpleXML extension is enabled by default. I've updated the project page, the README file, and the .info file to reflect this, and made the error more descriptive as you recommended.

mkadin’s picture

Status: Needs review » Reviewed & tested by the community

Jease, if I'm going to be nit picky I should at least get it right! ;) I didn't know there was exception for a tags within t('') but it makes sense to me.

I'm marking this RTBC but someone with real git powers will have to come knight thee.

forestmonster’s picture

@mkadin, that's okay -- thank you for your comments.

klausi’s picture

Priority: Major » Normal
Status: Reviewed & tested by the community » Needs work

manual review:

  • "'access arguments' => array('access administration pages'),": this permission is too generic, create your own.
  • _allforgood_get_search_results(): the check for simplexml should not done here, use hook_requirements() for that.
  • _allforgood_block_content(): Generating markup should be done in the theme function only, so that it can be overridden. This function should only prepare the list of items in an array.
forestmonster’s picture

Status: Needs work » Needs review

Thank you for the review Klausi. I made these recommended changes.

forestmonster’s picture

Issue summary: View changes

Download the 6.x-1.x branch, not the master. The "master" branch is empty now in accordance with Klausi's recommendations.

forestmonster’s picture

Priority: Normal » Major
Issue tags: +PAreview: review bonus

Adding a "review bonus" tag after completing three reviews of other projects in the queue, and adjusting priority in accordance with the application review timelines. Thank you.

forestmonster’s picture

klausi’s picture

Priority: Major » Normal
Status: Needs review » Reviewed & tested by the community
Issue tags: -PAreview: review bonus

Cool, looks RTBC to me. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

patrickd’s picture

Status: Reviewed & tested by the community » Fixed

Did a basic functionality check and code looks also good for me.

One point I found is that you maybe should use some other function name for your admin settings as (I can't remember where it was) it could be invoked with something like hook_admin(). Generally forms are suffixed with _form, so maybe you make that small change just to be sure.

Thanks for your contribution and welcome to the community of project contributors on drupal.org!

I've granted you the git vetted user role which will let you promote this to a full project and also create new projects as either sandbox or "full" projects depending on which you feel is best.

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.

As you continue to work on your module, keep in mind: Commit messages - providing history and credit and Release naming conventions.

Thanks to the dedicated reviewer(s) as well.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Updated issue summary, adding review bonus application comments.