Carrington Theme & Hashcash Plug-in Solution

I’ve been a huge Hashcash fan since using WordPress. In a nutshell, it requires a browser to process some javascript to generate a number to verify that the browser in-fact read the page. This helps prevent bots from submitting spam comments. The idea is that if a spam bot was required to process the javascript to make a “hash”, it would slow down posting comments by 20 times, if not more. Spammers make money off volumn, so they would lose “cash” slowing down their spamming. Hence the name: Hashcash.

Carrington is my current theme for WordPress. It has some ajax features for loading content and comments on the home and archive pages. It makes it a lot easier to post comments, and works really well. The problem is that Hashcash wouldn’t execute the JavaScript after loading comments via ajax. I had to make changes in two places to make it work.

First change is in /wp-content/themes/carrington/js/carrington.js on line 21:

setTimeout(“jQuery(‘#wphc_value’).each(function(){ jQuery(this).val(wphc()); });”, 2000);

This goes inbetween the lines of:

jQuery(‘#post-comments-‘ + post_id + ‘-target’).html(cfct.loading()).load(CFCT_URL + ‘/index.php?cfct_action=post_comments&id=’ + post_id);

return false;

Second change goes in the Hashcash plugin file on live 340. Change this line:

if((is_single() || is_page()))

To this:

//if((is_single() || is_page()))

That will put the hashcash javascript code in the header for every page.

Hopefully this will help anyone who is trying to get Carrington and Hashcash to work.

1 thought on “Carrington Theme & Hashcash Plug-in Solution

  1. Help. I was doing fine with the carrington theme, then all of a sudden by blog page wasn’t displaying the current blogs….would would have to manually go into the archives to see them. I’m not sure if the problem I’m experiencing is the same one you mention above (I’m not a programmer). I’m not sure what I need to do….

    Thanks,
    Sandra

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this:
search previous next tag category expand menu location phone mail time cart zoom edit close