This module provides the ability for users who play fantasy football on MyFantasyLeague.com to configure their league on their Drupal site, so they can pull their league information into their Drupal site. It provides blocks and pages that display league standings, weekly results, and live scores from their league. MyFantasyLeague provides a public API to get the data from.

It is admittedly a small niche market, but there is currently no similar module on Drupal.org. People who play on MyFantasyLeague.com might like the ability to pull their league info into their Drupal site.

When installing, you need to configure the league ID and year number on the configuration page (admin/config/system/myfantasyleague). You can enter league ID: 25316, and year: 2011. That will give you some league data so you can see how it works.

Module page: http://drupal.org/sandbox/bdlangton/1279738
Git: git clone --branch 7.x-1.x bdlangton@git.drupal.org:sandbox/bdlangton/1279738.git myfantasyleague
Drupal version: 7

Comments

bdlangton’s picture

Priority: Normal » Major

Raising the priority since it has been two weeks without a response.

klausi’s picture

Priority: Major » Normal
Status: Needs review » Needs work
  • only list files in the info file that contain classes or interfaces
  • "// delete all variables set by this module": Comments should start capitalized and end with a "."
  • myfantasyleague_block_configure(): this function does no do anything, why do you need it?
  • same for myfantasyleague_block_save()
  • myfantasyleague_block_view(): remove "break;" statements after "return" statements, this is unreachable code
  • "for ($i = 0; $i < count($league['divisions']); $i++)": why don't you use foreach() here? I find it easier to read. Applies also for the other nested for() loop in there. And in many other places.
  • Casting: "(int)$franchise->h2hw,": Put a space between the (type) and the variable. Please run coder to check your code style: http://drupal.org/project/coder
  • "@param unknown_type $form": this does not provide any information at all. Either create a proper documentation or remove it.
  • as I understand it you can connect only one league globally on the site, right? Did you consider to allow a per-user configuration so that each user could connect to separate leagues?
bdlangton’s picture

Status: Needs work » Needs review

Thanks for the advice. I made the required fixes and also took your advice to change the for loops to foreach loops.

Yes, there is only one global league in the module. I was thinking mostly of users just running their own Drupal site and wanting to put their league data on their site. I could see allowing per-user leagues being a big benefit to the module. I will work on adding that functionality next.

Please check the module again. Thanks!

sreynen’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me. You might want to add some checks for bad connections to myfantasyleague.com, rather than assuming data is coming back. Displaying a simple error message like "Unable to connect to myfantasyleague.com. Try again later." could save you a lot of support requests when that happens.

greggles’s picture

Status: Reviewed & tested by the community » Fixed

I created an issue for some security items, but they are not specifically exploitable and shouldn't block the application: #1313356: access callbacks, filter external data.

Thanks for your contribution, bdlangton! 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 minde: Commit messages - providing history and credit and Release naming conventions.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Added text to let the tester know a league ID and year number to enter when installing the module so that they can see the module in action.