CommentFileSizeAuthor
#24 simplelogin.zip17.88 KBThirstySix
#12 Image-ext.png32.15 KBlhuria94
#3 simplelogin.zip16.92 KBThirstySix
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

satheeshkumar.six created an issue. See original summary.

ThirstySix’s picture

Status: Active » Needs review
ThirstySix’s picture

Title: Simplelogin » [D7]Simplelogin
FileSize
16.92 KB
PA robot’s picture

Status: Needs review » Needs work

Git clone command for the sandbox is missing in the issue summary, please add it.

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.

ThirstySix’s picture

Title: [D7]Simplelogin » [D7] Simplelogin
Status: Needs work » Needs review

Git Clone Page: http://git.drupal.org/sandbox/satheeshkumarr/2640316.git simplelogin
Git Clone: git clone --branch 7.x-1.x satheeshkumarr@git.drupal.org:sandbox/satheeshkumarr/2640316.git simplelogin
Git Files Page: http://cgit.drupalcode.org/sandbox-satheeshkumarr-2640316/tree/
Project Page: https://www.drupal.org/sandbox/satheeshkumarr/2640316

ThirstySix’s picture

atul4drupal’s picture

Hello satheeshkumar.six,

I ran your code against auto code sniffer at 'http://pareview.sh'. It gave 2 errors of which I think you should resolve the following :

File - css/simplelogin.css
error - 231 | ERROR | [ ] Style definitions must end with a semicolon

ThirstySix’s picture

Fixed issues as per the suggestions from pareview.

Pareview results:
http://pareview.sh/pareview/httpgitdrupalorgsandboxsatheeshkumarr2640316git

jaffaralia’s picture

Fix the below issues:

  1. You are using variable_get function in your module variable_get('simplelogin_fid', '') on line no.173. Create .install file and use variable_del('simplelogin_fid'); on hook_uninstall function
  2. After I download your module on git. Your module folder look like 2640316. Please change your module folder name.
  3. Describe detail about your module on module page.
lhuria94’s picture

Hi @satheeshkumar.six

There needs to be a validation message for Image upload if the uploaded extension is wrong.
For example: The selected file "apache2.conf" cannot be uploaded. Only files with the following extensions are allowed: png, gif, jpg, jpeg.

Currently it always seems to display the success message.

And @jaffaralia Regarding changing folder name, Is not it all sandbox modules behave like this?

Thanks

ThirstySix’s picture

Hi,

@jaffaralia .install file created for variable_del('simplelogin_fid') on hook_uninstall function.
and @lhuria94 currently it displays only "The configuration options have been saved.". The Image is not a mandatory field on the configuration field.

lhuria94’s picture

FileSize
32.15 KB

@satheeshkumar.six,

Even not mandatory, its good to have a message for wrong extensions.
See attached for reference.

Thanks

ThirstySix’s picture

Hi @Ihuria94,

Goto "admin/config/simplelogin/loginbg". It's working fine & also not showing the wrong extension's message.
Check my module page: http://cgit.drupalcode.org/sandbox-satheeshkumarr-2640316/tree/simplelog... in simplelogin_background_form(). I mentioned title named as "Background Image". but your screenshot shows title is named as "Image" and File must be less than 256MB, description text. I didn't restrict the file size and all. Get the latest files from the sandbox.

Thanks,

lhuria94’s picture

@satheeshkumar.six,

I just added a standard way of using file upload validation. That was not a screenshot of your module. I am asking you to implement like that if someone try to upload wrong extension.

For example: If someone tried to upload doc file, then it gives a error message that the file is of wrong extension.

Let me know if you need any clarity in this.

Thanks

Rahul Seth’s picture

Automated Review

I ran your code against auto code sniffer at 'http://pareview.sh/pareview/httpgitdrupalorgsandboxsatheeshkumarr2640316git'.

Review of the 7.x-1.x branch (commit 8894019):

Coder Sniffer has found some issues with your code (please check the Drupal coding standards).
FILE: /var/www/drupal-7-pareview/pareview_temp/simplelogin.install
--------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------
6 | ERROR | [ ] There must be no blank lines after the function comment
10 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------

Time: 170ms; Memory: 7.75Mb

No automated test cases were found, did you consider writing Simpletests or PHPUnit tests? This is not a requirement but encouraged for professional software development.

Note that perfect adherence to Drupal Coding Standard is NOT a reason to block an application, except for total disregard of them. However, modules should follow them as closely as possible.

Manual Review

README.txt/README.md
No: Does not Follows the guidelines for in-project documentation and/or the README Template.
Rahul Seth’s picture

Status: Needs review » Needs work
klausi’s picture

Status: Needs work » Needs review

minor coding standard errors are surely not application blockers, please do a real manual review.

Rahul Seth’s picture

@satheeshkumar.six,

Module seems to quite good. Just recommendation, it would be good if you mention more about module in README file.

ThirstySix’s picture

Fixed issues as per the suggestions from pareview.
http://pareview.sh/pareview/httpgitdrupalorgsandboxsatheeshkumarr2640316git

Arkener’s picture

The URL /admin/config/simplelogin currently returns a whitepage and the error "Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'system_admin_menu_block_page' not found or invalid function name in menu_execute_active_handler()". Change the menu item to also include the required file like this:

$items['admin/config/simplelogin'] = array(
  'title' => 'Simple Login',
  'description' => 'Configuration of simple login image',
  'position' => 'right',
  'weight' => 3,
  'page callback' => 'system_admin_menu_block_page',
  'access arguments' => array('administer site configuration'),
  'file' => 'system.admin.inc',
  'file path' => drupal_get_path('module', 'system'),
);

simplelogin.module
Line 66: Place Login to Account inside a t()
Line 134: Place Uploading inside a t()

templates/page--simplelogin.tpl.php
Line 17: Rename Login-In to Login
Line 34: Place Forgot password? inside a t()

You might also want to move the background image css logic from your template file to the hook_preprocess_page, which is already present inside your module file.

ThirstySix’s picture

@Arkener,
Thanks for your review. Latest changes are commited based on your review.

@lhuria94,
Thanks for your review. I need clarity for your "wrong extension validations".

lhuria94’s picture

Hi @satheeshkumar.six,

Scenario: If someone tries to upload doc file, then it should give a error message that the file is of wrong extension like in the attached screenshot. Its good to have.

Let me know if you need any more clarity.

mdryan’s picture

Status: Needs review » Reviewed & tested by the community

Automated Review

Looks good. No test cases, but not an application blocker and not really essential for a simple module such as this.

Manual Review

Individual user account
Yes: Follows the guidelines for individual user accounts.
No duplication
Does not appear to cause module duplication and/or fragmentation, although personally I'd probably aim to make a change like this in a custom theme.
Master Branch
Yes: Follows the guidelines for master branch.
Licensing
Yes: Follows the licensing requirements.
3rd party assets/code
Yes: Follows the guidelines for 3rd party assets/code.
README.txt/README.md
Yes: Follows the guidelines for in-project documentation and/or the README Template.
Code long/complex enough for review
Yes: Follows the guidelines for project length and complexity.
Secure code
Yes: Meets the security requirements.
Coding style & Drupal API usage
  1. Just a recommendation: Most of the .module file is hooks, but I'd move what you can (mostly the admin form) to a separate .inc file to reduce the amount of code loaded on each page request.
  2. Just a recommendation: I'd rename your theme_sl_imageupload() function to theme_simplelogin_imageupload() (and update the references obviously) for consistency and (I think) coding standards.
  3. Just a recommendation: You go to the effort of setting a progress indicator and message when uploading a background image but then remove the upload button so these won't be used.
  4. Just a recommendation: You include a folder 2640316 in your repository that serves no purpose and can be deleted.

Generally shows a good understanding of the Drupal API and coding standards.

This review uses the Project Application Review Template.

Happy to set to RTBC. Let's hope the backlog of these get a final quick review and approval by a git administrator soon...

ThirstySix’s picture

FileSize
17.88 KB

Hi @mdryan,
Thanks for your valuable review. I made some changes as per your recommendation.

mdryan’s picture

Changes look good to me.

klausi’s picture

Issue tags: -PAreview: review bonus

Removing review bonus tag, you have not listed any manual reviews in the issue summary? Make sure to read https://www.drupal.org/node/1975228 again.

anbarasan.r’s picture

seems variable_get and drupal_get_path_alias function callback made on the tpl file, so try to avoid those on the tpl and instead have those as a variable on the module using theme preprocessor hook and use it on the tpl file.

xaiwant’s picture

Status: Reviewed & tested by the community » Needs work

@satheeshkumar.six
Location     
/simplelogin/simplelogin.module   

Problem synopsis      
Missing 'break' statement (at line 72)

just want to know that this module does not have help & permission hook. Do you want or you don’t want.

if not than why.?

ThirstySix’s picture

Status: Needs work » Needs review

@xaiwant,
We don't need the help & a permission hook for this module and break statement is not mandatory because user_login & user_pass both have placeholder as same as the title value.

visabhishek’s picture

Status: Needs review » Needs work

Hi satheeshkumar.six ,

Module looks good. Some suggestion are :

1: Please update the path admin/build/modules to admin/modules in README.txt
2: Use a blank line just after <?php in simplelogin.inc and simplelogin.module

 <?php
 /**
  * @file

to

 <?php
+
 /**
  * @file
naveenvalecha’s picture

@visabhishek: Above are not blockers. Please change the status. Is this now RTBC after your review or are there other application blockers left?

visabhishek’s picture

Status: Needs work » Reviewed & tested by the community

@naveenvalecha : No i have never find other blockers. Now we can mark it as RTBC.

ThirstySix’s picture

Hi @visabhishek & @naveenvalecha,
Thanks for your valuable review. I made some changes as per your recommendation.

mlncn’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for your contribution! Congratulations, you are now a vetted Git user. You can promote this to a full project.

When you create new projects (typically as a sandbox to start) you can then promote them to 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 stay 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.

ThirstySix’s picture

Thank you Reviewers, supporters and mlncn.

Status: Fixed » Closed (fixed)

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