Synopsis
Drupal Provides facility to delete comments with its type(Approved/Unapproved) by checking each comment manually.
Comment Bulk Delete Module is useful for delete the comments with the date range , content type and comment type.
Features
Comment Deletion can be possible by the following Criteria
1. Date Range : By selecting Start and End Date, You can delete comments for your required date range
2. Content Type: You can Select content type for delete comments. (Multiple Content type Selection also possible)
3. Comment Type: You can select comment type Approved/Unapproved for delete Comments
Configuration
1. Copy the entire comment_bulk_delete module directory and place it inside the
Drupal sites/all/modules directory.
2. Login as an administrator.
Enable the module in the "Administrator" -> "Modules" -> "Others"
Project Space
This is the Link for
Bulk Comment Delete
Git Clone Repository Setup
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/Vimalavinisha/2556435.git comment_bulk_delete
cd comment_bulk_delete
Pareview results:
http://pareview.sh/pareview/httpgitdrupalorgsandboxvimalavinisha2556435git
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | comment-bulk-delete.png | 57.08 KB | Vimala vinisha |
Comments
Comment #2
Vimala vinisha commentedComment #3
Vimala vinisha commentedComment #4
Vimala vinisha commentedComment #5
Vimala vinisha commentedComment #6
Vimala vinisha commentedComment #7
Vimala vinisha commentedComment #8
Vimala vinisha commentedComment #9
Vimala vinisha commentedComment #10
pravin ajaaz commentedComment #11
Vimala vinisha commentedComment #12
Vimala vinisha commentedComment #13
Vimala vinisha commentedComment #14
PA robot commentedProject 1: https://www.drupal.org/node/2557637
Project 2: https://www.drupal.org/node/2532176
As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).
If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #15
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxVimalavinisha2556435git
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.
Comment #16
Vimala vinisha commentedComment #17
Vimala vinisha commentedPareview issues are fixed
http://pareview.sh/pareview/httpgitdrupalorgsandboxvimalavinisha2556435git
Comment #18
Vimala vinisha commentedComment #19
Vignesh Puliyadi Raja commentedAutomated Review
Review of the 7.x-1.x branch (commit 56d737a):
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.
Manual Review
Coding style
(+) comment_bulk_delete_install(): Why do you call check_plain() here, its just a static text? Remove it.
You should also really have a hook_help() with some basic info about the module.
After submit the comment delete, I am getting the success message like this.
%count Comments Deleted Successfully. Need to be address this first.
Comment #20
Vimala vinisha commentedHi Vignesh PR,
Thanks for your great review.
1. hook_help has been added in the module file
2. check_plain() function has been removed from .install file
3. "%count Comments Deleted Successfully" This is also fixed.
Comment #21
Vimala vinisha commentedComment #22
pravin ajaaz commentedThe automated review looks almost clean. Great work !!
Suggestions based on the initial Manual Review:
In install file
1. The variable $t you created, should be used as :
drupal_set_message($t('Comment Bulk Delete Module has been successfully installed'));This might fix the single error which the pareview shows.
In module file
Here more work needs to be done, actually 2 specifc things :
1. You should use comment_delete_multiple API function instead of deleting the comments using dynamic queries in the function
comment_bulk_delete_delete_commentYou can fetch the comment ID ($cids) as an array based on the conditions selected by the user and pass it to the comment_delete_multiple.
2. What the module would do if there are about 1,000 comments? This process might be timed out. So You should make use of Batch API.
3. check_plain is used only to sanitize user entered data before displaying it. You don't need it in
comment_bulk_delete_form_validateandcomment_bulk_delete_form_submitfunctions.Comment #23
Vimala vinisha commentedHi Pravin,
Thanks for reviewing. As per your suggestions, I have modified both .install & .module files .
Comment #24
Vimala vinisha commentedComment #25
pravin ajaaz commentedThanks. All the reviews seem to be addressed, so changing the status to RTBC. Spend time to review other's module so that your module will be reviewed by a Git admin soon!!
Comment #26
Vimala vinisha commentedComment #27
damienmckennaThanks for your contribution, Vimala!
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.
Thanks to the dedicated reviewer(s) as well.
Comment #29
Vignesh Puliyadi Raja commented