This module sends an email notification on site admin's email Id (UID 1) when a comment is posted on the site. If the site admin has allowed the comment to be posted without approval, then also it sends an email.Site admin can keep an eye on the comments posted through email.

Here is the sandbox link: https://www.drupal.org/sandbox/lomasr/2864981

Git repository link
git clone --branch 8.x-1.x https://git.drupal.org/sandbox/lomasr/2864981.git comment_notify_admin

Thanks

CommentFileSizeAuthor
#4 module-structure.png19.44 KBamit.drupal

Comments

lomasr created an issue. See original summary.

PA robot’s picture

Issue summary: View changes
Status: Active » Needs work

Timeout when invoking pareview.sh for https://git.drupal.org/sandbox/lomasr/2864981.git at http://pareview.sh/pareview/httpsgitdrupalorgsandboxlomasr2864981git

Do you have any third-party files committed? 3rd party code is not generally allowed on Drupal.org and should be deleted. This policy is described in the getting involved handbook. It also appears in the terms and conditions you agreed to when you signed up for Git access.

Fixed the git clone URL in the issue summary for non-maintainer users.

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.

cchanana’s picture

Hi Lomasr,

I just made the https://pareview.sh run on your project, and found issues just have a look at

https://pareview.sh/node/1647

amit.drupal’s picture

StatusFileSize
new19.44 KB

Hi Lomas,

Below is my manual review :
1 - When clone your module whole drupal code clone. Upload only module files. Your module file structure (module-structure.png)
2 - Improve your module README.txt
I think include some basic points.

1 - Introduction
2 - Requirements
3 - Recommended modules
4 - Installation
5 - Configuration

README Template:

https://www.drupal.org/docs/develop/documenting-your-project/readme-temp...

lomasr’s picture

@Amit Thanks, I have removed the unwanted file. Please clone.

lomasr’s picture

@cchanana Thanks, I will review this.

logan.H’s picture

Manual Review

1) Can we make email subject configurable like email body?
2) You make db_select() twice from comment_admin_notify_comment_insert() and then in comment_admin_notify_mail_tokens()
for more effective way is load the entity in someway like node_load() , use it in comment_admin_notify_comment_insert() and pass it to comment_admin_notify_mail_tokens()

Question:
Can we achieve the same using Rules module? , Is there any advantage over that ?

lomasr’s picture

Thanks logan.H, for testing it manually

1. Can we make email subject configurable like email body? : It's a part of expansion of this module.

2. node_load is deprecated in drupal 8:
https://api.drupal.org/api/drupal/core%21modules%21node%21node.module/fu...

Answer: Rules makes developer's life easy but not for non developers (content editors etc).

Thanks

SergDidenko’s picture

Hi, lomasr!
Please find manual review below:

Individual user account
Yes: Follows guidelines for individual user accounts.
No duplication
Yes: Does not cause module duplication and/or fragmentation.
Master Branch
Yes: Follows the guidelines for master branch.
Licensing
Yes: Follows the licensing requirements.
README.txt/README.md
No: Does not follow the README Template.
Code long/complex enough for review
Yes: Follows the guidelines for project length and complexity.

1. Fix all errors according to https://pareview.sh/node/1712.
2. Use dependency injection instead \Drupal inside CommentAdminNotifyAdminSettingsForm.php.
3. Use $this->t() instead t() inside CommentAdminNotifyAdminSettingsForm.php (line 46).

lomasr’s picture

Thanks, SergDidenko, will do the necessary changes.

PA robot’s picture

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

Closing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).

I'm a robot and this is an automated message from Project Applications Scraper.

lomasr’s picture

Status: Closed (won't fix) » Active
avpaderno’s picture

Category: Plan » Task
Status: Active » Needs review
prashant.c’s picture

Status: Needs review » Closed (duplicate)

@lomasr

There is already a module for this https://www.drupal.org/project/comment_admin_notify which means we can't publish your project as this will be a duplicate module for the same functionality.

So in my opinion this project application can be closed.

Thanks to all for their contributions.

avpaderno’s picture

Status: Closed (duplicate) » Closed (won't fix)