PM User Image (private message user image) is used to show the users profile picture in user auto complete suggestions box of Private Message module along with the user name. Default image can be used, if user has no profile image.

Sand Box Link :- https://drupal.org/sandbox/joshi.rohit100/2079287

PAReview: PAReview

Manually reviewd :-
https://drupal.org/node/1394920#comment-7821595
https://drupal.org/node/2048921#comment-7832597
https://drupal.org/node/2083109#comment-7833057

Reviewd :-
https://drupal.org/node/2085489#comment-7844391
https://drupal.org/node/2083831#comment-7844441
https://drupal.org/node/2083831#comment-7853897

Manual Review:-
https://drupal.org/node/2083831#comment-7857317

Comments

PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxjoshirohit1002079287git

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

Status: Needs work » Needs review

Thanks ,

I have made changes in mode code. pls review it.

bappa.sarkar’s picture

Status: Needs review » Needs work

Please fix below

  1. Better to add a description in the menu that you have created.
  2. Typo Image Weight should be image width in the settings form.
joshi.rohit100’s picture

Thanks bappa.sarkar for your time.
I have implemented the changes suggested by you.
Please now chk again.

Thanks
Rohit Joshi

joshi.rohit100’s picture

Issue summary: View changes

reviewd links

joshi.rohit100’s picture

Issue summary: View changes

add PARview link

joshi.rohit100’s picture

Issue summary: View changes

add manually reviewd link

pgautam’s picture

Status: Needs work » Needs review

Hi Rohit,

Can you please try to include CSS file (pm_user_image.css) conditionally instead of adding it through hook_init. Now this CSS (pm_user_image.css) is included on each and every page across the application.

~Paritosh

joshi.rohit100’s picture

Thanks paritosh,

I have done the requested change.
Pls now chk.

Thanks
Rohit Joshi

joshi.rohit100’s picture

Added PAReview: review bonus tag

tibezh’s picture

Status: Needs review » Needs work
Issue tags: -PAreview: review bonus

Review of the 7.x-1.x branch

  1. pm-user-image.inc (15) you mast use a t() function and use #prefix and #suffix in form.
  2. pm-user-image.inc (45) you mast use in function t() - plasecholders.
  3. pm-user-image.module (47) pm_user_image_autocomplete_change fucntion don't have comments to code (see module Privatemsg, file privatemsg.pages.inc, function privatemsg_autocomplete).
  4. pm-user-image.module function theme may transfer html structure to tpl.php file from theme.

Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

joshi.rohit100’s picture

Status: Needs work » Needs review

Thanks @tibezh

Suggestions are implemented.

Rohit Joshi

swim’s picture

Hey Joshi,

Your file pm-user-image.inc should most likely be pm_user_image.inc, also consider an easier file definition name like pm_user_image.admin.inc.

In pm-user-image.inc line 13, your wrapping <strong> tags inside your t function, these/ all HTML tags should be separated out like so,

$form['#prefix'] = "<div class='pm-user-image-desc'><strong>" . t('Image settings for the image to be shown in private message user auto complete.') . "</strong></br></br>";

In pm_user_image.module line 78, please add some documentation for your autocomplete hook. HOOK_privatemsg_autocomplete.

In pm_user_image.module line 137, you don't need to underscore your hook permission name & maybe a description would be nice.

/**
 * Implements hook_permission(). 
 */
function pm_user_image_permission() {
  return array(
    'administer pm user image' => array(
      'title' => t('Administer Private Message User Image settings'),
    ),
  );
}

Your tpl file seems to have a lot of PHP, almost only PHP. I would try and separate this a little better only passing the required variables to your theme file.

Cheers,

swim’s picture

Status: Needs review » Needs work

Updated status.

joshi.rohit100’s picture

Status: Needs work » Needs review

Hi @hapax legomenon,
All your suggestions are now implemented.

Thanks

joshi.rohit100’s picture

Issue summary: View changes

add manual reviewd link

joshi.rohit100’s picture

Issue tags: +PAReview

adding PAReview tag

joshi.rohit100’s picture

Issue tags: -PAReview +PAreview: review bonus

updated tag text

klausi’s picture

Assigned: Unassigned » patrickd
Status: Needs review » Reviewed & tested by the community
Issue tags: -PAreview: review bonus

manual review:

  1. pm_user_image_init(): why do you need hook_init() which is run on every single page request? Just implement a privatemsg form alter and your CSS as #attached to the form array?
  2. pm_user_image_theme(): all your theme functions or templates need to be prefixed with your module's name.
  3. pm-user-image-output.tpl.php: no need to use check_plain() for height and width in the first case, the various image theming function will take care of sanitization of attributes. And you should use theme image for the else case as well.

But otherwise looks RTBC to me. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

Assigning to patrickd as he might have time to take a final look at this.

patrickd’s picture

Status: Reviewed & tested by the community » Fixed

Your project page description is very short.. also you could provide an actual link to the private message module.

There's already a tag "7.x-1.0" for an old state of your code. I suggest you delete it and re-tag the most current code with something like "7.x-1.0-beta1" shortly before you actually create the release.

The readme looks much better then your project page - but do you really think people will take a look at the readme rather than on the project page? Maybe you could try to keep their contents the same

Rather use preprocess-hooks and if possible try to put as few PHP code as possible into your tpl-files and functions. Many themers don't know PHP so well and when they need to override your php file you make it very hard for them if there's so much code there.

1 => t('External'),
Use constants with self describing names instead of numbers where appropriate.

Beside the issues klausi pointed out I couldn't find anything critical either, therefore this looks ready to go.

Thanks for your contribution!

I updated your account so you can 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 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.

joshi.rohit100’s picture

@klausi, thanks for review and suggestions.
I have implemented your suggestions except check_plain() for height and width variable as if i remove check_plain(), PARview test gives me error.

@patrickd, thanks for your time.
I have deleted the old tag and created new one as per your suggestion. I have also updated the project page same as of README file

Please do a final look.

Thanks

Rohit Joshi

joshi.rohit100’s picture

Issue summary: View changes

add manualy reviewd links

joshi.rohit100’s picture

Status: Fixed » Closed (fixed)

closing the issue

joshi.rohit100’s picture

Issue summary: View changes

add manual review