Google Groups Home
Help | Sign in
Retrospective akismet?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
paulbutcher  
View profile
 More options Jul 6, 4:13 pm
From: paulbutcher <p...@paulbutcher.com>
Date: Sun, 6 Jul 2008 13:13:15 -0700 (PDT)
Local: Sun, Jul 6 2008 4:13 pm
Subject: Retrospective akismet?
I've had a blog running on top of Mephisto 0.7.3 for a while now - and
I've been ignoring it. My bad, I know, but I've had other things on my
mind :-)

While I've been ignoring it, the spammers have found it and I have
several thousand spam comments :-(

Bastards.

Is there some way that I can run akismet retrospectively to kill the
spam comments? Or delete all comments younger than a certain date (I'm
pretty sure that all the "real" comments are old and all the new
comments are, therefore, spam)?

Very many thanks in advance,

Paul.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rick Olson  
View profile
 More options Jul 6, 6:14 pm
From: "Rick Olson" <technowee...@gmail.com>
Date: Sun, 6 Jul 2008 15:14:25 -0700
Local: Sun, Jul 6 2008 6:14 pm
Subject: Re: [Mephisto] Retrospective akismet?
On 7/6/08, paulbutcher <p...@paulbutcher.com> wrote:

Not without using ruby.  You could jump to script/console and delete
the comments.

$ script/console

>> comments = Comment.find(:all, :conditions => ['created_at > ?', Time.utc(2008, 7, 1, 15, 0, 0)])

That should finds comments posted after July 1st, 2008, at 3pm.  I'd
take a look at the comments first before doing anything hasty:

>> comments.map { |c| c.body }

Depending on how many comments you have, you may want to slice the array:

>> comments[0..15].map { |c| c.body }
>> comments[16..30].map { |c| c.body }

Then you can delete them with:

>> Comment.transaction do

  comments.each { |c| c.destroy }
end

It's probably best to run a backup of your database before you do
anything major, though.

--
Rick Olson
http://lighthouseapp.com
http://weblog.techno-weenie.net
http://mephistoblog.com


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
paulbutcher  
View profile
 More options Jul 6, 7:25 pm
From: paulbutcher <p...@paulbutcher.com>
Date: Sun, 6 Jul 2008 16:25:27 -0700 (PDT)
Local: Sun, Jul 6 2008 7:25 pm
Subject: Re: Retrospective akismet?
On Jul 6, 11:14 pm, "Rick Olson" <technowee...@gmail.com> wrote:

> ... You could jump to script/console and delete
> the comments.

Thanks Rick - much appreciated!

Paul.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google