Ebird Near is a module for adding data to a site using cck location fields. It adds information about recent bird sightings from a location using the API from Ebird.org. The location fields must be fields added through cck (location fields added through location module's built in fields will not work). It adds two form controls asking the user how many days back and how many miles away from the node's location to search the database for bird sightings. There is a link to a live site using the module (with instructions) on the project page.

Project Page:
http://drupal.org/sandbox/jbcbirder/1161468

Comments

arcaneadam’s picture

Status: Needs review » Needs work

Just taking a look at the code and not even getting to testing yet, you still have a ways to go before it looks like a viable module.

There is a lot of wasted space and empty code that doesn't need to be there. This code would also just flat out break on any node view due to the faulty use of variable_get. Your implementation of the ajax call to Ebird is not done in a correct way either. You should be using hook_menu and making a call to Drupal defined path that would then use drupal_http_request.

I'm going to set this to needs work. When you feel like you've got a completed module, feel free to update this back to needs review.

jbcbirder’s picture

Thanks a bunch for looking at my module. I am working on this though I don't have much time to devote to it (it works on my example site and that is the main reason I wrote it). I think I have fixed everything (the easy stuff) except the part where I have to re-write it to do the AJAX call from a menu instead of in the javascript. I'm having a little trouble with that part.

jbcbirder’s picture

Do you know of any code examples that do this sort of thing (using hook_menu and making a call to Drupal defined path that uses drupal_http_request) that I could look at ? I have been unable to locate anything that works this way. I looked at the examples module in Drupal 7 and it has some ajax calls but they don't work currently for some reason with my D7 installation, and I don't remember seeing an example there that calls an external website this way.

misc’s picture

The applicant has been contacted to ask if the application is abandoned.

misc’s picture

Status: Needs work » Closed (won't fix)

The application has been closed. If you would like to reopen it, you are free to do so.
See http://drupal.org/node/894256