This is a very simple Drupal 7 module that allows theme regions to be rendered as blocks. This would then allow for that region (and any of the blocks it contains) to be placed in another region on the site.

http://drupal.org/sandbox/jnettik/1998746

git clone --branch 7.x-1.x jnettik@git.drupal.org:sandbox/jnettik/1998746.git

Review of other projects:

Comments

lchang’s picture

Status: Needs review » Needs work

Hi, jnettik

Please provide a README.txt.

brice_gato’s picture

Hello @jnettik,

You should set a default branch. Here is the documentation link http://drupal.org/node/1659588
Take a look on Ventral pareview also, you have some erros and missed file as @lchang said.
Visit this link http://ventral.org/pareview/httpgitdrupalorgsandboxjnettik1998746git

jnettik’s picture

Hello,

Thank you both for your feedback. I have added documentation, cleaned up code to use Drupal standards better and also made a small bug fix.

Let me know if there is anything else that I need to do.

brice_gato’s picture

I just tested your module again and everything is fine for me. Another opinion but that is only my opinion is to make manageable the cache system of your blocks (screen 'admin/structure/region-blocks') by adding a select field for each region (DRUPAL_NO_CACHE, DRUPAL_CACHE_CUSTOM, DRUPAL_CACHE_PER_ROLE, DRUPAL_CACHE_PER_USER, DRUPAL_CACHE_PER_PAGE) now you stuck on DRUPAL_NO_CACHE.
This can be useful for some of administrators but as i said is my opinion!!

A small detail you still have a few minor errors in your README.txt
http://ventral.org/pareview/httpgitdrupalorgsandboxjnettik1998746git

jnettik’s picture

Status: Needs work » Needs review

Not a bad suggestion. I opted to create a default setting on the config page for the module, then allow for that to be overridden on each block's config page.

I also fixed my line lengths in the README.

brice_gato’s picture

Great job!

Make again a committ of your files because I still have some errors!

FILE: /var/www/drupal-7-pareview/pareview_temp/region_blocks.admin.inc
--------------------------------------------------------------------------------
FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
13 | ERROR | If the line declaring an array spans longer than 80 characters,
| | each element should be broken into its own line
--------------------------------------------------------------------------------

FILE: /var/www/drupal-7-pareview/pareview_temp/region_blocks.module
--------------------------------------------------------------------------------
FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
68 | ERROR | If the line declaring an array spans longer than 80 characters,
| | each element should be broken into its own line
--------------------------------------------------------------------------------

jnettik’s picture

Ok those arrays have been broken up.

PA robot’s picture

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

eriknewby’s picture

Status: Needs review » Needs work

Cool. Thanks for your contribution!
Here are some points after a manual code review (and installation):

1. Your project page should follow some of the standard guides. http://drupal.org/node/997024
2. region_block.info: Would be nice to have a link to the configuration page from the module page (configuration='path/to/region-blocks')
3. region_blocks_config(): line 16, it is unclear to me how 'DRUPAL_CACHE_CUSTOM' works. Maybe add something to the README?
4. region_blocks_uninstall(): line 17, Shouldn't $isset actually be $is_set according to the foreach just above?

jnettik’s picture

Status: Needs work » Needs review

Thank you for your feedback. Those updates/fixes have been made.

thmnhat’s picture

Hi jnettik

Automated review:
http://ventral.org/pareview/httpgitdrupalorgsandboxjnettik1998746git

FILE: /var/www/drupal-7-pareview/pareview_temp/region_blocks.admin.inc
--------------------------------------------------------------------------------
FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
2 | ERROR | Additional whitespace found at start of file
--------------------------------------------------------------------------------



Manual review:
Your $cache_options

  $cache_options = array(
    'DRUPAL_NO_CACHE',
    'DRUPAL_CACHE_CUSTOM',
    'DRUPAL_CACHE_PER_ROLE',
    'DRUPAL_CACHE_PER_USER',
    'DRUPAL_CACHE_PER_PAGE',
  );

then you run drupal_map_assoc($cache_options), the result is

  array(
    'DRUPAL_NO_CACHE' => 'DRUPAL_NO_CACHE',
    'DRUPAL_CACHE_CUSTOM' => 'DRUPAL_CACHE_CUSTOM',
    'DRUPAL_CACHE_PER_ROLE' => 'DRUPAL_CACHE_PER_ROLE',
    'DRUPAL_CACHE_PER_USER' => 'DRUPAL_CACHE_PER_USER',
    'DRUPAL_CACHE_PER_PAGE' => 'DRUPAL_CACHE_PER_PAGE',
  );

The expected options list is

  $cache_options = array(
    DRUPAL_NO_CACHE => 'DRUPAL_NO_CACHE',
    DRUPAL_CACHE_CUSTOM => 'DRUPAL_CACHE_CUSTOM',
    DRUPAL_CACHE_PER_ROLE => 'DRUPAL_CACHE_PER_ROLE',
    DRUPAL_CACHE_PER_USER => 'DRUPAL_CACHE_PER_USER',
    DRUPAL_CACHE_PER_PAGE => 'DRUPAL_CACHE_PER_PAGE',
  );

That's all. Thank you for your contribution.

thmnhat’s picture

Status: Needs review » Needs work
jnettik’s picture

Status: Needs work » Needs review

Thank you for the feedback. I've made those changes and fixed the extra whitespace issue.

brice_gato’s picture

Status: Needs review » Reviewed & tested by the community

Hello,
LINE 111 of region_blocks.module : seems useless!
Now your work looks reviewed & tested by the community to me.

jnettik’s picture

Issue summary: View changes

Added project review

jnettik’s picture

Issue summary: View changes

Added another manual review.

jnettik’s picture

Issue tags: +PAreview: review bonus

Like 111 has been removed.

klausi’s picture

Status: Reviewed & tested by the community » Fixed

manual review:

  • region_blocks_block_view(): do not call render() here, you can return just a render array for rendering later.

but that is not a blockers, so ...

Thanks for your contribution, jnettik!

I updated your account so you can 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 stay 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 third project review.