Warning (512): /home/zastica/zastica.com/app/tmp/cache/ is not writable [CORE/cake-1.3.8/libs/cache/file.php, line 267]
Warning (512): /persistent/ is not writable [CORE/cake-1.3.8/libs/cache/file.php, line 267]
Warning (512): /models/ is not writable [CORE/cake-1.3.8/libs/cache/file.php, line 267]
Zastica • Hepcms

2 posts found in (hepcms)

Stopping Spam with Akismet

If you’ve ever owned a blog or written for one, you know how much of a problem spam comments can be. In fact just earlier today, Harry Roberts of CSS Wizardry posted this on twitter:

css wizardry on spam

When I originally created this site and the HepCMS backbone that it runs on, I didn’t include any handling of comments except “Save, display”. There was an option to manually mark comments as spam after they were posted, but they always made it to the public pages. I did it that way for a couple reasons. First, I was curious to see how long it would take, and secondly, I was being lazy. Towards the end of last week, someone finally figured out how to automate adding comments to my site. And it only took them 3 months. In fact, if you own or run a blog, or any site that allows anyone to publish content, you’re going to have to deal with spam at some point.

I did a pretty good job of manually catching the spam, but once once the spammer had automated adding things, I had to improve my defenses. enter Akismet. Akismet is the spam catcher that is used in Wordpress blogs. Via the Akismet API, anyone can add Akismet spam filtering to their site. If you’re already using Wordpress, you don’t have to worry about spam because they already use Akismet to catch spam content.

Since HepCMS is built on CakePHP, I did some searching around for already built solutions. I found one particularily interesting, “An Akismet Behavior” by Tom O’Reilly. The part about using a behavior at the model level of my application is that it’s almost automatic. The only thing I had to do to get it up and running was to add a tiny bit of code to my comments model.

var $actsAs = array('Akismet' => array(
    'content'=>'comment',
    'author'=>'author',
    'type'=>false,
    'is_spam'=>'spam'
));

For handling spam, this is a pretty quick solution, yet very powerful. I only spent about 30 minutes researching, installing the code, and testing it out. Once I was done, I saw the number of spam comments drop dramatically, and none reached the public portions of my site. The bottom line is that if you’re running a site that allows anyone to submit content, you need to deal with spam, and Akismet is the perfect way to do it. If you’re using Cake to run your application, a behavior is the perfect way to deal with spam.

Hello, World

This is my first post using my new CMS. It’s called HepCMS, and I developed it over the course of 6 months on my bus rides to and from work. My main goal while developing Hep was to create a simple system that would make it incredibly easy to publish content for the web. I also wanted to become more familiar with the CakePHP framework. At work, I develop and customize our custom CMS, so I also wanted a different system that would encourage me to learn in different ways.

And also, the technology that my old site used (the Symphony CMS) issued a major upgrade to their codebase, one that was incompatible with old Symphony websites. Since I was stuck in a situation where I couldn’t upgrade without some major effort, I decided to take the plunge and create my own system.

As for my old website, it’s now been archived for posterity. The content remains, albeit on a different url, and it is no longer supported or updated. Commenting is turned off, and the backend has been removed. I thought about porting the content into the new website, but honestly there was so much cruft that it wasn’t worth the effort.

The topic(s) of this site will remain the same — anything that comes to mind. And the quest to write interesting information will continue.