Description

This simple module allows to display weather information about hungarian regions. The region can be set on the Koponyeg weather block configuration page. There are some other weather modules, but non of them are specified for hungarian regions and also non of them use the köpönyeg.hu API.

Koponyeg weather block

sandbox: http://drupal.org/sandbox/k.dani/1462574
git: git clone --branch 7.x-1.x http://git.drupal.org/sandbox/k.dani/1462574.git koponyeg

The module has been developed only for Drupal 7, but if there are any claims, I can create a Drupal 6 version too.

In the near future, I would like extend the module with the following features:
- more block can be created like in menu_block module
- themable output for the weather block

CommentFileSizeAuthor
Screen shot 2012-03-07 at 11.36.24 AM.png31.54 KBk.dani

Comments

themeprofessional’s picture

Status: Needs work » Needs review

Leave only README in the master branch

See http://drupal.org/node/1127732

themeprofessional’s picture

Status: Needs review » Needs work

FILE: ...7-pareview/sites/all/modules/pareview_temp/test_candidate/koponyeg.info
--------------------------------------------------------------------------------
FOUND 2 ERROR(S) AFFECTING 2 LINE(S)
--------------------------------------------------------------------------------
6 | ERROR | It's only necessary to declare files[] if they declare a class or
| | interface.
8 | ERROR | Files must end in a single new line character
--------------------------------------------------------------------------------

FILE: ...pareview/sites/all/modules/pareview_temp/test_candidate/koponyeg.module
--------------------------------------------------------------------------------
FOUND 22 ERROR(S) AFFECTING 11 LINE(S)
--------------------------------------------------------------------------------
13 | ERROR | Expected a valid @return data type, but found type
13 | ERROR | Missing comment for @return statement
29 | ERROR | Last parameter comment requires a blank newline after it
29 | ERROR | Expected a valid @param data type, but found type
29 | ERROR | Missing comment for param "$delta" at position 1
30 | ERROR | Expected a valid @return data type, but found type
30 | ERROR | Missing comment for @return statement
48 | ERROR | Expected a valid @param data type, but found type
48 | ERROR | Missing comment for param "$delta" at position 1
52 | ERROR | Expected "if (...) {\n"; found "if (...) {\n"
79 | ERROR | Last parameter comment requires a blank newline after it
79 | ERROR | Expected a valid @param data type, but found type
79 | ERROR | Missing comment for param "$region" at position 1
80 | ERROR | Expected a valid @return data type, but found type
80 | ERROR | Missing comment for @return statement
86 | ERROR | A cast statement must be followed by a single space
95 | ERROR | Last parameter comment requires a blank newline after it
95 | ERROR | Expected a valid @param data type, but found type
95 | ERROR | Missing comment for param "$id" at position 1
96 | ERROR | Expected a valid @return data type, but found type
96 | ERROR | Missing comment for @return statement
113 | ERROR | Files must end in a single new line character
--------------------------------------------------------------------------------

themeprofessional’s picture

Status: Needs review » Needs work

Manual review: Your module doesn't check 'allow_url_fopen' and dose have any error handle function

patrickd’s picture

@themeprofessional
please don't post such automated reviews into issues, it's quite demotivating for applicants to hit this "wall of errors"
rather attach a txt-file containing the report, or a direct link to it.

generally putting code into <code> tag's makes it lot more readable

and it's really not necessary to put each issue you find into a single comment ;-)

k.dani’s picture

Status: Needs work » Needs review

I try to fix all of the error that you reported. Please review the code and let me know, if something still not good.

anilbhatt’s picture

Manual Review:
1. Please create .install file, because you are using variable_set inside your module. Write hook_uninstall inside it.
2. I have install your module and configure it with block and place it in region but nothing shown?
3. Line 84 should be should be declare before line 79 (if condition).
4. Your module is same like http://drupal.org/project/weather, how this module is different?
5. You module is too short, even it add a single block, why don't you submit this as a patch or sub-module of http://drupal.org/project/weather.
6. if ($data->code == 200) { else of this condition return a blank string, instead of this you should give user a friendly message.

Automatic Review:
http://ventral.org/pareview/httpgitdrupalorgsandboxkdani1462574git follow this link to see errors.

anilbhatt’s picture

Status: Needs review » Needs work
k.dani’s picture

Status: Needs work » Needs review

Hi anilbhatt!

Thanks for reviewing my module. I try to answer all of your comments:

1. the install file has been created and the uninstall hook has been implemented.
2. I don't know, why is this happened, it works right in my local enviroment. Please try this newer version and send me a feedback, if the problem persists.
3. Fixed
4. This module is different, because the source of the data is different from the weather module and specified for hungarian regions. In this regards, the google weather module is just a duplicate too.
5. The module supports now unlimited weather block creating, and the near future, the themable output will be implemented too. Koponyeg.hu has the opportunity to embed weather forecast and snow report addons, so there is the possibility to improve this module in the future.
6. When no data is get, the block get a default and translatable 'No incoming data.' content. If the request returns error, this will be added to the log.

The errors of the automatic review have been fixed.

Best wishes,
Daniel

aaronelborg’s picture

I installed it on my local box and everything seems to work as advertised. To be honest, I've learned a few things from looking at your code. Anilbhatt's suggestions look to have been implemented. Nice work!

aaronelborg’s picture

Status: Needs review » Reviewed & tested by the community

I wanted to change the status to RTBC in my post above but, apparently, that's not possible with an edited comment?

.......doing it now in this one.

k.dani’s picture

Hi Aaron!

Thank you for taking the time to review my module. I'm glad you liked the code, I tried to get the most out of it.

Best,
Daniel

patrickd’s picture

Assigned: Unassigned » patrickd
patrickd’s picture

Status: Reviewed & tested by the community » Fixed
  1. Please take a moment to make your project page follow the tips for a great project page. Also create a README.txt that follows the guidelines for in-project documentation.
  2. Add your configuration page as "configure = " key to the .info
  3. 'cache' => DRUPAL_NO_CACHE, - no caching? I don't think the weather will be different on each page request. you should put a permanent cache here (until next cache clear / cron run).
  4. Your indenting is not correct in .admin.inc line 58-67.
  5. All comments should end with . / ? / !

After all, I'm pretty sure you know the API and I see no further major problems with this module (but you should really do some caching, requesting the data from the external service on every block view really hurts performance, please take care of this).

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.

k.dani’s picture

Hi patrickd!

Thanks for reviewing my module. I'm really happy to join the community. Your suggestions are correct, I will take on advice.

Best wishes,
Daniel

Status: Fixed » Closed (fixed)

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

avpaderno’s picture

Title: Koponyeg » [D7] Koponyeg
Issue summary: View changes