Blog Spam filter – Mollom vs Akismet

Category : blogs, Drupal, Tips, Wordpress

Spam for bloggers is a big pain, you need to go over 20-80 spam comments to get a single genuine comment. There are, however, applications that automatically filter your comments.  I have used  Mollom and Akismet quite a bit, and in this article will try to explain the differences between them.

Both Mollom and Akismet try to automatically get rid of spam comments, but do it in a slightly different way.

Akismet

Akismet checks your comments against the Akismet web service to see if they look like spam or not. If Akismet thinks the comment is a spam it puts it in the spam queue, and you get no notification about it. I found Akismet to be very accurate in finding spam. I found 1 false positive (spam which was not really spam) out of thousands of spam messages.

Major strengths -

  • Well integrated with WordPress look and feel – provides a seamless experience to the user and blog owner.
  • Comes as default for WordPress – This is a very strong advantage, because most people use defaults.
  • Does not use CAPTCHA - some real users find CAPTCHA really hard to work with.

Major weaknesses -

  • Blog owners still needs to go though the spam queue and find genuine comments and empty the spam queue

Mollom

Mollom is a web service that helps you identify content quality and, more importantly, helps you stop spam on your blog, social network or community website. Mollom works very much like Akismet – the major difference is that if Mollom thinks the comment is spam, it provides the submitter of the comment a CAPTCHA challenge (and only when a possible spam is detected and not always like other CAPTCHA solutions). If the submitter fills in the CAPTCHA correctly, them Mollom sends the comment to the pending queue, no comments ever get to the spam queue.

Major strengths -

  • Near zero spam management, comments never get to your spam queue.
  • Integrates well with Drupal
  • Does not use CAPTCHA unless it absolutely needs to (users only see the CAPTCHA if Mollom thinks their comment is spam)

Major weaknesses -

  • The current Mollom WordPress plugin does not provide a seamless integration with WordPress theme -  in cases were CAPTCHA is presented to the user, the CAPTCHA is shown in a separate pages that does not look like your blog.

Both Mollom and Akismet provide an amazing service to bloggers worldwide. The differences between them are subtle but important. For this blog I use Akismet because I want a seamless integration with the theme of the blog, but for an older blog I am maintaining, I use Mollom because I can’t be bothered to check its spam queue.

Think about your blog requirement and choose the best filter for you.

Javascript Object to String

Category : Deep Dive, JavaScript, Tips

Javascript is a little hard to debug, Firebug helps a lot, but sometime you just to need to convert a javascript object into a string.
In order to do that (in firefox) you could use the toSource() method.
Here is how you do it:


// create an object
var anyObject = {'someAtt':'someValue', 'otherAtt' : 'otherValue'};
// get the object to source
var anyObjectToString = anyObject.toSource() ;
// now write the string
document.writeln(anyObjectToString );

Here is the printout of this code in firefox:

In Internet Explorer and Chrome this will generate a Javascript error – but this is not for production so using it in Firefox would do fine.

CakePHP Ajax/JSON calls fail? Try turning debug output off

Category : AJAX, CakePHP, Software development, Tips

ajax CakePHP is a rapid development framework for PHP that provides an extensible architecture for developing, maintaining, and deploying applications. CakePHP provides several Ajax features, but if cakephp debug is not turned off, most Ajax calls and JSON encoding would fail.

The problem / symptoms

When calling a server side cakephp method through Ajax calls usualy in combination with JSON encoding, the call fails. The server returns HTTP 200 and everything seems fine, but the Ajax call just doesn’t work.

Continue Reading

Useful JQuery Plugin to Display Errors, Messages, and Alerts: Gritter

Category : jquery, Open source, Software development, Tips, web

Real estate on your web page could be as important as real estate in real life. You got very little space on your client screen and need to use every inch (or pixels). Errors and messages take up valuable space that could be better used for more important things.

That is why Gritter is a great JQuery plugin – it saves real estate on your page by showing alerts, messages and errors in a floating bubble way, that is both informative and (because you can configure Gritter to fade away after a few seconds) non intrusive:

This image was taken from one of our new site’s design, we decided to use Gritter instead of putting the errors and notification inline.

Check out Gritter’s demo site and project site and, for CakePHP developers, here is an article about integrating Gritter with CakePHP.

It is open source, looks great, easy to integrate, and is very useful!

How to: Automatic User Login in CakePHP

Category : CakePHP, Open source, Software development, Tips

Sometimes you need to enable silent (implicit) login for your users. A good example of this would be this – after a registration process, you would want to automatically login the user, rather then having him retype the user name and password.

In CakePHP there is a simple method in the Auth components that lets you login on the user’s behave.

Here is how it is done:


// assuming $password is the clear text password
$this->data["User"]["password"] = $this->Auth->password($password);
$this->data["User"]["username"] = $username;

// do the login
$login = $this->Auth->login($this->data);

// $login is true is login went well.
// now we can redirect the user to any page:
if($login){
$this->redirect(array('controller' => "anycontroller",
'action' => "any_secure_action", null));
}

This will be implemented in the next CakeOTP release.

6 Useful Things Google Search Provides That Are Not Search / Useful Google Search Tools

Category : Opinion, Tips

Lately it is kind of popular to trash Google. Very much like Microsoft, people love to complain about companies that take an important part of their daily life. Google is now an integral part of our life not only for search but for many other things. A good friend saw me convert foreign exchange on Google search and was very surprised you can do that. So here is a list of things I do in Google search which are not search related.

Looking up What’s the Time in Other Places Around the World

Living in a far away island in the pacific with friends in Europe and America, this tool is a great help.

Continue Reading

How I Save Time Filtering Spam Comments with Mollom

1

Category : Tips, web


I get spam comments all the time, it drives me crazy and make me wish I didn’t have a web site at all. Spam really bring the evil side of most site owners.

Yesterday, I finally had enough, I got 300 spam comments and only 4 real ones – I had to go over 3 pages and read bogus comments like:

  • “I have a question [link to gambling site]“
  • or “nice post [link to viagra]“
  • and the ho-so-known “dgsdgsdghsdfhdf [link to a SEO company]“.

I went to drupal and looked for the most popular anti-spam module they listed and found Mollom.

Mollom is a web service that helps you identify content quality and, more importantly, helps you stop spam on your blog, social network or community website. When site moderation becomes easier, you have more time and energy to interact with your community.
Continue Reading

How to check where your site visitors come from using javascript

Category : Deep Dive, JavaScript, Tips

Where do my visitors come from? That is always a question bloggers, site owners and advertisers want to know. Knowing who has referred the visitor to my site tells you a lot about that visitor. This information might help you drive better, more finely tuned content to this user.

Demo

Code


<script type="text/javascript">
if(document.referrer){
document.write("Hello, Thank you for arriving from: " + document.referrer);
}else{
document.write("Hello, Thank you for arriving directly to this page");
}
</script>

This topic is covered in detailed in this interesting article.

Most Useful / Best Drupal Modules

Category : Drupal, PHP, Software development, Tips, web

I have recently upgraded my cats idol site to Drupal 6 and enhanced its functionality. I have also created several other sites (including this site) using the following set of useful Drupal modules.

Here is my list of useful (AKA Best IMHO) Drupal modules:
Continue Reading

Apache Crashes on Windows – Check Your Ports

1

Category : PHP, Software development, Tips, web

Apache is one of the most popular web servers in the market today. It usually runs on Linux-based machines but lately there are more and more deployments, for development as well as other reasons, of Apache on Windows. Nowadays, running Apache web server on Windows is very common for PHP developers. Many developers develop their PHP application on their home windows or Mac and deploy to a remote Linux server.
Continue Reading