Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install zest.commentcleanup

How to install zest.commentcleanup

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install zest.commentcleanup
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
1.4
1.6Never BuiltWhy not?
1.4 Available View build log
1.2 Available View build log
1.0 Available View build log
Windows (64-bit)
1.4
1.6Never BuiltWhy not?
1.4 Available View build log
1.2 Available View build log
1.0 Available View build log
Mac OS X (10.5+)
1.4
1.6Never BuiltWhy not?
1.4 Available View build log
1.2 Available View build log
1.0 Available View build log
Linux (32-bit)
1.4
1.6Never BuiltWhy not?
1.4 Available View build log
1.2 Available View build log
1.0 Available View build log
Linux (64-bit)
1.6 Available View build log
1.4 Available View build log
1.2 Available View build log
1.0 Available View build log
 
License
GPL
Dependencies
Lastest release
version 1.6 on Jan 9th, 2014

Introduction

You have enabled commenting in your Plone Site. Now you wake up and see that during the night some spammer has added 1337 comments in your site. What do you do now? Sure, you first shoot him and then you integrate some captcha solution, but you still have those 1337 comments. You do not want to click 1337 times on a delete button. Have no fear: zest.commentcleanup will rescue you! Or at least it will help you get rid of those spam comments faster.

How does it work?

Just add zest.commentcleanup to the eggs parameter of the instance section of your buildout.cfg. On Plone 3.2 or earlier add it to the zcml parameter as well.

The package simply works by registering some browser views. Start your instance, go to the root of your site and add /@@cleanup-comments-overview to the url. This will give you an overview of which items in your site have comments. It is sorted so the item with the most comments is at the top.

Note that the overview works on other contexts as well, for example on a folder.

In the overview click on the manage link of an item with comments. This takes you to the cleanup-comments-details page of that item. This lists all comments, ordered by creation date. From there you can delete single items.

But the biggest thing you can do there is: select a comment and delete this and all following comments. The idea is that the first three comments may be valid comments, then there are a gazillion spam comments, and very likely no actual human has added a valid comment somewhere in that spam flood anymore. So you keep the first few comments and delete the rest without having to buy a new mouse because you have clicked too much.

From the overview page you can also go to the @@cleanup-comments-list page. Here you see the latest comments, which you can remove one at a time. This is handier when you have done the big cleanup already and only need to check the new comments of the last few days.

All the used views are only available if you have the Manage portal permission.

Requirements

This has been tested on Plone 3.3.5 with the standard comments. It might or might not work with packages like quintagroup.plonecomments or plone.app.discussion. It probably works on Plone 2.5 and 4 as well, but I have not checked. Hey, it might even work in a default CMF site.

Changelog

1.6 (2013-05-13)
  • Support plone.app.discussion. [maurits]
1.5 (2012-09-12)
  • Moved to github. [maurits]
1.4 (2011-01-26)
  • Also catch AttributeError in @@find-catalog-comments, which may happen for objects in portal_skins/custom. [maurits]
1.3 (2011-01-26)
  • Moved the remove-buttons more the the left, so they do not hop around after deleting an item with a long title, or that causes a new long title to appear. [maurits]
  • On the overview page offer to also index comments in objects that currently do not allow comments but may have done so in the past. [maurits]
  • When switching comments off for an object, uncatalog its existing comments. [maurits]
  • When turning comments on for an object, catalog its possibly already existing comments, when needed. [maurits]
  • On the details page, also show number of actual comments, instead of only the comments in the catalog. [maurits]
  • Added @@find-catalog-comments page (linked from the overview page) that finds and catalogs all comments for objects that currently allow commenting. This is needed after a clear and rebuild of the portal_catalog, as the catalog then loses all info about comments. [maurits]
1.2 (2011-01-04)
  • Sort the cleanup-comments-list on creation date. [maurits]
1.1 (2011-01-04)
  • Handle redirection in the same way everywhere, so you also get to the same batched page using a came_from parameter. [maurits]
  • Added '@@cleanup-comments-list' page that lists the latest comments. [maurits]
1.0 (2010-12-21)
  • Initial release

Subscribe to package updates

Last updated Jan 9th, 2014

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.