Hi everyone,
Due to google weather api going down, i had to switch my website weather widget from google to an other one. I chose Wunderground because of it's great API.
With our module you'll be able to create a block which will query Wunderground for data about the city. You can administer the plugin by choosing the city, the country, the wind speed and temperature settings (ex: celsius or fahrenheit) and the cache duration.
Screenshots are available on the sandbox project : http://drupal.org/sandbox/alpixel/1764012 ( git clone http://git.drupal.org/sandbox/alpixel/1781982.git wunderground_api )
Have fun testing it and i'm up to answer any question you have.
Cheers
Comments
Comment #1
Danny EnglanderManual Review:
Greetings, a few things here that should be mentioned:
http://ventral.org/pareview/httpgitdrupalorgsandboxalpixel1764012git
The issues appear to be a mix of spacing and syntax / code
Comment #2
alpixel CreditAttribution: alpixel commentedChanged most of the things you asked, just missing the coding standard atm.
Comment #3
alpixel CreditAttribution: alpixel commentedCode reviewing : done.
(see : http://f.cl.ly/items/1o3F0p2k3x3e1A2M0W0S/Capture%20d%E2%80%99%C3%A9cran... )
Is there anything left that has to be done in order to fulfill my application ?
Comment #4
michfuer CreditAttribution: michfuer commented1) In admin config I set Wind Unit to MPH and Temperature unit to Fahrenheit, but displays in KPH and Celsius. The values appear correct, but the labels are hardcoded in the block.tpl.php file.
2) In your hook_permission you have "Administer Google weather settings" should probably change to "Administer Wunderground weather settings" or similar.
3) Line 28 of admin.inc you have an extra space before the '!'.
4) In regards to wunderground_block.tpl.php see http://drupal.org/node/930760. "A page callback should return a render array, as should hook_block_view()'s $block['content']. This allows your module and other modules to treat the content as data for as long as possible in the page generation process."
5) Still got quite a few code format errors in PAReview:
http://ventral.org/pareview/httpgitdrupalorgsandboxalpixel1764012git
On the plus side it works, and the block looks great! I think this will be a very nice module for anybody wanting to post weather info on their site :)
Best of luck!
Comment #5
alpixel CreditAttribution: alpixel commentedHuge thank's for the feedbacks.
As of #1 and #5 it's totally normal.
I've hardcoded the label in the tpl in order to let people indicate their own label (some people says kph, others kmh, km/h, kp/h, etc...)
For #5, i've been running the module into the Coder module in "normal" mode and i didn't get any error left. Do i need to review my whole code (like array and line limit stuff, it's kinda a heavy work) ?
I'll solve #2, #3 and #4 tomorrow morning.
And yeah actually i hope this widget will be hopefull. As Google Weather went down, it'll be essential and i hope my plugin will be published really soon.
Comment #6
alpixel CreditAttribution: alpixel commentedJust solved the #2's hook permission.
I also changed the hook_block_view() functionnality in order to use renderable arrays as you asked in your last message (#4).
Comment #7
michfuer CreditAttribution: michfuer commentedPAReview seems to be the standard for checking code formatting issues. All of those errors you see (e.g. indenting, whitespace) will need to be fixed before you can get the green light.
http://ventral.org/pareview/httpgitdrupalorgsandboxalpixel1764012git
Comment #8
alpixel CreditAttribution: alpixel commentedDone.
That was kinda a pain but finally achieved it lol..
Comment #9
sreynen CreditAttribution: sreynen commentedThere's already a module with the same name, and apparently the same purpose here:
http://drupal.org/project/wunderground
I suggest simply requesting to be added as a maintainer to that project, and following up with http://drupal.org/node/251466 if that request doesn't go anywhere. Your version is Drupal 7 and the existing project is Drupal 6, so you could just add your code as the Drupal 7 version of that.
If for some reason you think they need to be separate projects, you'll need to change your module name since two modules with the same name will cause problems.
Comment #10
alpixel CreditAttribution: alpixel commentedActually the module you talk about is not based on wunderground api. It retrieves information from the website but not using the api.
I'll rename mine to wunderground_api.
Comment #11
alpixel CreditAttribution: alpixel commentedProject moved to http://drupal.org/node/1781984
Comment #11.0
alpixel CreditAttribution: alpixel commentedChanged git info.
Comment #12
apaderno