Cookies for Comments - Version 0.5

Version Description

Download this release

Release Info

Developer donncha
Plugin Icon wp plugin Cookies for Comments
Version 0.5
Comparing to
See all releases

Code changes from version 0.4 to 0.5

Files changed (2) hide show
  1. cookies-for-comments.php +5 -3
  2. readme.txt +4 -4
cookies-for-comments.php CHANGED
@@ -3,11 +3,13 @@
3
  Plugin Name: Cookies for Comments
4
  Plugin URI: http://ocaoimh.ie/cookies-for-comments/
5
  Description: Sets a cookie that must exist for a comment to be allowed through
6
- Version: 0.4
7
  Author: Donncha O Caoimh
8
  Author URI: http://ocaoimh.ie/
9
 
10
  CHANGES
 
 
11
  2008-07-15 - User can delete spam comments now, http://wordpress.org/support/topic/187810?replies=2
12
  Check that Akismet functions exist.
13
  2008-07-07 - Make it work in sub directories too.
@@ -24,7 +26,7 @@ function cfc_stylesheet_html() {
24
  } else {
25
  return;
26
  }
27
- ?><link rel="stylesheet" href="<?php echo trailingslashit( get_option( 'siteurl' ) ) . $cfc_key . '.css'; ?>" type="text/css" media="screen" /><?php
28
  }
29
  add_action( 'wp_head', 'cfc_stylesheet_html' );
30
 
@@ -35,7 +37,7 @@ function cfc_set_comment_style_cookie() {
35
 
36
  if( strpos( $_SERVER[ 'REQUEST_URI' ], $cfc_key . '.css' ) ) {
37
  if( !isset( $_COOKIE[ $cfc_key ] ) )
38
- @setcookie( $cfc_key, 1, time()+3600, '/' );
39
  header("Content-type: text/css");
40
  echo " ";
41
  die();
3
  Plugin Name: Cookies for Comments
4
  Plugin URI: http://ocaoimh.ie/cookies-for-comments/
5
  Description: Sets a cookie that must exist for a comment to be allowed through
6
+ Version: 0.5
7
  Author: Donncha O Caoimh
8
  Author URI: http://ocaoimh.ie/
9
 
10
  CHANGES
11
+ 2008-08-23 - Add a random key to the css file url.
12
+ 2008-08-21 - Set the cookie for a week
13
  2008-07-15 - User can delete spam comments now, http://wordpress.org/support/topic/187810?replies=2
14
  Check that Akismet functions exist.
15
  2008-07-07 - Make it work in sub directories too.
26
  } else {
27
  return;
28
  }
29
+ ?><link rel="stylesheet" href="<?php echo trailingslashit( get_option( 'siteurl' ) ) . $cfc_key . '.css?t=' . mt_rand(); ?>" type="text/css" media="screen" /><?php
30
  }
31
  add_action( 'wp_head', 'cfc_stylesheet_html' );
32
 
37
 
38
  if( strpos( $_SERVER[ 'REQUEST_URI' ], $cfc_key . '.css' ) ) {
39
  if( !isset( $_COOKIE[ $cfc_key ] ) )
40
+ @setcookie( $cfc_key, 1, time()+604800, '/' );
41
  header("Content-type: text/css");
42
  echo " ";
43
  die();
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
- === Comments For Cookies ===
2
  Contributors: donncha
3
  Tags: cookies, comments, spam
4
- Tested up to: 2.6
5
- Stable tag: 0.4
6
 
7
- Sets a cookie on a random URL that is then checked when a comment is posted. If the cookie is missing the comment is marked as spam.
8
 
9
  == Description ==
10
  This plugin adds a stylesheet to your blog's html source code. When a browser loads that stylesheet a cookie is dropped. If that user then leaves a comment the cookie is checked. If it doesn't exist the comment is marked as spam.
1
+ === Cookies for Comments ===
2
  Contributors: donncha
3
  Tags: cookies, comments, spam
4
+ Tested up to: 2.6.1
5
+ Stable tag: 0.5
6
 
7
+ Sets a cookie on a random URL that is then checked when a comment is posted. If the cookie is missing the comment is marked as spam. This plugin will reduce your comment spam by at least 90%, probably.
8
 
9
  == Description ==
10
  This plugin adds a stylesheet to your blog's html source code. When a browser loads that stylesheet a cookie is dropped. If that user then leaves a comment the cookie is checked. If it doesn't exist the comment is marked as spam.