Internet & Society Course Blog

Prof’s corner

Spam guard

by on Sep 25, 2005. Filed under Blog logistics

Here is a bit of code that will help protect against spam in the comments. We will add this code to the Comments Template right after this line:
<label for="url"><small>Website</small></label></code>

<input type="text" name="extra" id="url" value="<?php echo $comment_extra; ?>" size="28" tabindex="4" />
<label for="extra"><?php _e("Enter the word blog (required)"); ?></></label>
</input>

UPDATE: There was a mistake in the code that had been posted here originally. There was a superfluous space in between “<” and “?php _e” that caused a problem. Please fix this on your blog.

Also, note that if you have changed the theme of your blog, you may not find the above “Website” line in your code. Nonetheless, look for a line that said Website or URI and place this code below that section.

UPDATE 2 (Oct 3): Please note that an additional section of code needs to be entered in another file. Since you don’t have access to that file, I will enter that snippet for everyone.

Thanks to Jeff Barr for making this available. The code above is a somewhat tweaked version of Jeff’s original.

Comments are closed.

Powered by WordPress.
Theme is a tweak of Mike Little's Journalized Winter.
Original theme copyright © 2002–2009 Mike Little.

Welcome.

This is the instructor's blog for the Northwestern University course on Internet & Society taught in the Fall of 2005. Feel free to leave comments.

NU links:

Get updates:

Categories:

Archives:

Search site:

Blog logistics:


Maintained by

Group A

Group B

Group C

Group D

Group E

28 queries. 0.493 seconds