This module allows you to embed a Hubble Space Telescope image each day of the year. The image changes daily.

it extracts the picture from here http://hubblesite.org/gallery/album/pr2005029e

you can set pictures dimensions, if you want to be linkable to gallery and you can also set to show image title and/or description, also automatically extracted from Hubble's website.

I created my first module,
http://drupal.org/sandbox/SanduCiprian/1394732

http://drupalcode.org/sandbox/SanduCiprian/1394732.git/commit/1ee3cea5f4...

Manual reviews of other projects:

Comments

patrickd’s picture

Status: Needs review » Needs work

welcome

It appears you are working in the "master" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.
Review of the master branch:

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. Go and review some other project applications, so we can get back to yours sooner.

Your README.txt is not very informative, please read the documentation about writing good readme's: http://drupal.org/node/7765, http://drupal.org/node/161085

You're using a package in your info file:
package = hubble_telescope_daily_image
As this defines in which group your module will be shown at the modules page and your module has no other related modules you should remove this. Removing it will move your module to the "other" group.

The module description is not very informative for so many words. Please think about changing it to a shorter one simply describing what it does.
Embed a new, stunning Hubble Space Telescope image each day of the year. The image changes daily.

Your code indenting is kind of.. "unstructured".. please work on your coding style so other developers can read it without struggling with this. Please have a deep look at the Drupal coding standards!

t($info['name'] . 'Width'),

Please read the API documentation about using the t() function! http://api.drupal.org/api/drupal/includes--bootstrap.inc/function/t/7

You're using variables without deleting them by variable_del() in a hook_uninstall() in a .install file (Read the documentation about this at api.drupal.org)

if ($delta == 0) {
In general it seems to me that you're not really understanding the Block API. Please have a look at the block example in the example module (http://drupal.org/project/examples)

if ($titleset){
	
	$output = '<h2>'.$title.'</h2>';

}
	$link =  variable_get('hubble_telescope_daily_image_link', FALSE); 
  
if ($link) {
	
	$output .= "<a href='$gallery_url'><img src='$imagine' height='$height' width='$width'></a>";
  
  }
  
else 
	
	$output .= "<img src='$imagine' height='$height' width='$width'>";
 
 $captionset =  variable_get('hubble_telescope_daily_image_caption', FALSE); 

if ($captionset){
 
  $output .= $caption;
  
}

Please learn about writing secure code (http://drupal.org/writing-secure-code) and how to use the Theme API (http://drupal.org/node/722174)

As you see you still have to learn how to use Drupal's API the right way, but don't worrie about this!
Please think about reading a good Drupal Development book or online documentations about writing modules. Have a look at other modules to learn how they work.

regards

sanduciprian’s picture

Thank you for your review!

I'm new at this, but i want to learn.

It is my first module, I will study more and maybe i will improve my skill.

Thank you again!

misc’s picture

@SanduCiprian has been contacted to ask if the application is abandoned.

After ten weeks with a status of needs work: the applicant may be contacted by a reviewer to determine whether the application was indeed abandoned. The action taken by the reviewer should be documented in the project application issue.

http://drupal.org/node/894256

sanduciprian’s picture

yes I abandoned it

misc’s picture

Status: Needs work » Closed (won't fix)
sanduciprian’s picture

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

I did some work, need a review

Thanks!

sanduciprian’s picture

Title: Hubble Telescope Daily Image » [d7] Hubble Telescope Daily Image
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.

joshi.rohit100’s picture

It appears that your height and width settings for image are not working. Also I got the notice for undefined variable "$height" at line 143. Please chk this.

sanduciprian’s picture

Title: [d7] Hubble Telescope Daily Image » [D7] Hubble Telescope Daily Image

I checked and it is nothing wrong.

It works fine

ayesh’s picture

Status: Needs review » Needs work

Hi,
I did a manual review on the 7.x branch and there are some security concerns in it.

See theme_hubble_telescope_daily_image_theme().

You load the contents of a remote URL directly, and then using it without any sanitation.
$output .= '<h2>' . $title . '</h2>';
<a href='$gallery_url'><img src='$imagine' height='$element[height]' width='$element[width]'></a>
<img src='$imagine' height='$height' width='$width'>

Above snippets can produce security issues if the target URL has malicious code.
You can use check_plain() and drupal_attributes() to sanitize the text.

sanduciprian’s picture

@Ayesh

I did some changes and commited them.

ayesh’s picture

Cool. Looks ok to me now. Lets wait for few other reviews.

sanduciprian’s picture

Status: Needs work » Needs review
kscheirer’s picture

Status: Needs review » Needs work
Master Branch
It appears you are working in the "master" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.

You have a significant number of style issues reported here: http://pareview.sh/pareview/httpgitdrupalorgsandboxsanduciprian1394732git.
Could you use theme('image') in your theme function to render the image instead of direct <img src=> tags?
How about integrating with core's Image styles? That would be a much easier way to control rendering instead of using height/width.

Otherwise this looks ok. Please clean up the style issues and remove the master branch.

----
Top Shelf Modules - Crafted, Curated, Contributed.

sanduciprian’s picture

I cleaned up all the style issue and deleted the master branch.

If i use theme_image or theme_image_style I have to add some major touches because the image is external. It's not saved in the public folder.

Maybe in the future I will add these features.

sanduciprian’s picture

Status: Needs work » Needs review
kscheirer’s picture

Status: Needs review » Reviewed & tested by the community

Looks much better, thanks for making those fixes.

----
Top Shelf Modules - Crafted, Curated, Contributed.

kscheirer’s picture

Issue summary: View changes

more information

sanduciprian’s picture

Issue tags: +PAreview: review bonus

Added PAReview: review bonus tag

sanduciprian’s picture

Issue summary: View changes

Reviews of other projects:

klausi’s picture

Issue tags: -PAreview: review bonus

Removing review bonus tag, you have not done all manual reviews, you just posted the output of an automated review tool. Make sure to read through the source code of the other projects, as requested on the review bonus page.

I also removed the automated reviews from the issue summary.

kscheirer’s picture

Status: Reviewed & tested by the community » Fixed

It's been a month without any problems reported, so I'm promoting this myself as per https://drupal.org/node/1125818.

Thanks for your contribution, SanduCiprian!

I updated your account to let you 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 get 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.

----
Top Shelf Modules - Crafted, Curated, Contributed.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

removed automated reviews.