Archive for September, 2008

RNC: Me, in the Twilight Zone

Monday, September 1st, 2008

By David Roberts

I arrived at the Minneapolis airport a couple hours ago, schlepped on a bus to downtown St. Paul to deposit my bags at the journalist tent, and found out … that downtown St. Paul is completely shut down. They have about a five-block perimeter blocked off and aren’t letting anyone in without a credential (Kate and I are sharing one, and she’s got it). Apparently there was some pepper gassing and arrests yesterday.

It’s a weird situation, made weirder by the fact that a hurricane is battering the Gulf coast right now and, oh yeah, Palin’s 17-year-old daughter is pregnant.

Now I’m sitting in a pub eating curry fries, drinking a beer, and trying to catch up on all the news I missed today, which apparently was plenty.

Strange world we live in.

UPDATE: I’m struggling not to submit to stereotypes here. But lots of folks fresh from the GOP convention are streaming into this pub, and … the guys are fresh-scrubbed, square-jawed, and all-American. And the girls have lots of make-up. I’m sure it’s a distorted sample! I reject and renounce all stereotypes!

UPDATE: Greg Sargent does a rundown on the Palin meltdown today.

Things are looking awfully grim for the GOP right now. Coming right off a successful Dem convention, they badly needed a week of Barack-attacks and happy Palin-displays. Instead they got a harsh reminder of Katrina, lost a day of the convention, and had McCain’s VP pick exposed as a hasty, poorly vetted disaster.

Akismet datasource

Monday, September 1st, 2008

Hey folks,

this is post #12 of my 30 day challenge.

For our blog here at debuggable we use the excellent Akismet service to protect ourselves from spam. Thanks to CakePHP, our implementation for it is as simple as this:

php
  1. class Comment extends AppModel{
  2.   var $validate = array(
  3.     ‘text’ => array(
  4.       array(
  5.         ‘rule’ => array(’notSpam’),
  6.         ‘message’ => ‘This comment appears to be spam. Please contact us if the problem persists.’,
  7.         ‘required’ => true,
  8.       ),
  9.     ),
  10.   );
  11.  
  12.   function notSpam($fields) {
  13.     $akismet = ConnectionManager::getDataSource(’akismet’);
  14.     return !$akismet->isSpam($this->data[’Comment’], Post::url($this->data[’Comment’][’post_id’]));
  15.   }
  16.  
  17. }

So if you are coding up a little blog or something else that needs (Comment) spam protection, we released our Akismet API datasource for you.

Get it while its hot: Akismet Datasource at the Debuggable Scraps repository.

Alright, hope this helps some of you out there. Please Comment with suggestions and criticism ; ).

– Felix Geisendörfer aka the_undefined