This plugin has been deprecated! It is no longer necessary as its functionality has been integrated into WordPress. There will not be any continued support for it. Comments to this post are also now closed.
When I released the plugin, I also simultaneously made a bug report and patch for the WP core, which was quickly accepted and applied.
Reported as a bug in trac ticket #1265.
Fixed in WordPress in changeset #2561.
Prevent visitors from leaving duplicate comments/pingbacks/trackbacks to a post.
* Requires at least WordPress 1.5.
* A duplicate is a comment/pingback/trackback that meets these criteria:
Its contents match that of another comment in the same post
-AND-
Either the commenter’s name or e-mail address (if provided) also match.
I won’t claim this approach won’t lead to false-positives, but as far as I’m concerned it’s reasonable.
* If a comment is deemed to be a duplicate, an error page is displayed to the user indicating as much.
- Download the file no-duplicate-comments.zip and unzip it into your /wp-content/plugins/ directory.
-OR-
Copy and paste the the code ( no-duplicate-comments.phps ) into a file called no-duplicate-comments.php, and put that file into your /wp-content/plugins/ directory. Please ensure you do not introduce any spaces or other characters before the <?php or after the ?> - Activate the plugin from your WordPress admin ‘Plugins’ page.
function c2c_no_duplicate_comments ( $comment_text )
- $comment_text : The text of the comment to be checked for duplication.
N/A
Copyright (c) 2005 by Scott Reilly (aka coffee2code)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 replies on “Plugin: No Duplicate Comments”
WordPress Plugin: No Duplicate Comments
No Duplicate Comments plugin prevents visitors from leaving duplicate comments/pingbacks/trackbacks to a post….
Interesting idea. Have you given any thought to searching the whole DB rather than just the current post? I receive tons of trackback spam that is identical across multiple posts. Querying the whole DB would practically insure that they only get one through.
The downside being of course if your blog is very active and your DB is large.
Thanks for the plugin!
-jab
Hey, I’m loving your plugins. Using a lot of them.
I just noticed a thing with this one, No Duplicate Comments. There’s an SQL error if there’s a single quote in the comment text. I can’t be 100% sure it’s because of the plugin, but when I deactivated it, there were no errors and when I activated it again, there were errors. All comments got through though ok. Don’t know if this has happened to anyone else…
jab: I may optionally add a check for duplicates across all comments to a blog.
Minna: You’re right. I just released a new version of the plugin which should fix the bug you spotted. Let me know if the plugin continues to be problematic for you. Thanks for reporting!
I thought WP should do this out of the box, is there a bug somewhere?
Matt: I believe I checked and didn’t find precisely this kind of measure in WP. There’s the flood protection, which prevents someone from posting more than once per 15 seconds, and there’s a check for duplicate trackbacks/pingbacks. I don’t think there’s an explicit check for duplicate comments. Granted, this probably isn’t a high-occurrence kind of thing, but I have had it happen.
I like this plugin. However, I have found that if a person types in a comment that has an apostrophe in it, the SQL statement that checks for duplicate comments crashes.
Brent: Are you running v0.9.1 of the plugin? That minor .1 revision should’ve fixed that problem.
Hey again. I’m still getting the errors, too, with 0.9.1. I tried removing the _gpc from the addslashes function you had used and now it seems to work. Tell me if I did something horribly wrong 🙂
Minna: That sounds fine. Plugin has been updated to v0.9.2. Thanks!
[…] amente urls y emails, provocar que los comentarios del autor jam?s sean moderados, evitar la duplicaci?n de comentarios semejantes u ofuscar los emails para p […]
hey im getting this error *** Warning: Cannot modify header information – headers already sent by (output started at /home/china/public_html/wp/wp-content/plugins/no-duplicate-comments.php:80) in /home/china/public_html/wp/wp-admin/admin.php on line 6
Warning: Cannot modify header information – headers already sent by (output started at /home/china/public_html/wp/wp-content/plugins/no-duplicate-comments.php:80) in /home/china/public_html/wp/wp-admin/admin.php on line 7
Warning: Cannot modify header information – headers already sent by (output started at /home/china/public_html/wp/wp-content/plugins/no-duplicate-comments.php:80) in /home/china/public_html/wp/wp-admin/admin.php on line 8
Warning: Cannot modify header information – headers already sent by (output started at /home/china/public_html/wp/wp-content/plugins/no-duplicate-comments.php:80) in /home/china/public_html/wp/wp-admin/admin.php on line 9
***
when i activate the plugin. i have no spaces before or after … what am i doing wrong?
WordPress 1.5.1.2 now checks by default for dupe comments. 🙂
Thanks anyways,
Will
I’ve tried using this plugin on WordPress 1.5.3 and it gives me a whole bunch of header errors in the wp-admin panel.
Matt was correct, it does it outta the box, or at least it does now. Dunno about at the time this plugin was made. 😉
[…] No Duplicate Comments – Another anti-spam measure, No Duplicate Comments prevents duplicate comments/pingbacks/trackbacks to a post. […]
[…] Google Sitemaps 9 Spam Karma 2 – Reloaded 5 Related Posts 3 WP-ContactForm 6 Email Notification Plugin StatTraq 2 Adsense Deluxe 5 Akismet 4 Ultimate Tag Warrier 3 Feedburner Feed Replacement 3 WP-Amazon 3 Auto hyperlink URLs 2 Page Navigation 2 Angsuman’s Feed Copyrighter 2 WordPress Database Backup 2 IImage Browser 2 Paged Comments 2 Viper’s Plugins Used 2 Popularity Contest 2 WP-Googlestats 2 Subscribe to Comments AJAX Spell Checker Recent Comments Audio Play Rate My Stuff ViewLevel2 evermore PHP Exec Most Wanted Autometa WP-Cron Quicktags WP Adsense No Duplicate Comments Polite-ifier CSS Compress Del.icio.us Bookmark This Flickr Gallery Heavyweight Categories Live Comment Preview Relative Dates RunPHP Extract Terms Terms2tags Force Word Wrapping WP-cache WordPress From/Where WP Hardened Trackback WordPress Hashcash Adsense Logger Bad Behavior Cat 2 Tag CA Chitika Chitika eMiniMalls Code AutoEscape Paged Comment Editing Optimal Title Better Feed Click Counter IP 2 Nation Random Words Transpose e-mail Batch Categories Enhanced View PXS Mail Form SH-Autolink Search Meter Search Pages Search Reloaded Smart Update Pinger Taggerati x-Dashboard CG Powerpack PhotoPress Subscribe Me Secure Image Ak-Bookmark/ak-subscribe Blogs of the Day (couldn’t find URL) Get RSS (couldn’t find URL) […]
Is this plugin compatible with WP2.01? Thanks
Where can I get the latest information on the plugin Rocky mentions above? “Is this plugin compatible with WP2.01? Thanks ”
I am installing a blog and would love to know
I like this plugin. Thank)
[…] No Duplicate Comments – Prevent visitors from leaving duplicate comments/pingbacks/trackbacks to a post. […]
[…] Not-to-me – supprime la notification par email quand l’administrateur publie un commentaire (pratique!) No Duplicate Comments – Composant qui empèche de publier des commentaires ou billets en double. […]
Hi,
Will this work fine with wp v2.0.5?
Also, i have AJAX COMMENTS INSTALLED… Should I have any problems or works fine?
[…] Proibir Comentários Repetidos Baixe o Plugin aqui e ative no painel do WP. Comentários Recentes Mostra na sua sidebar os comentários recentes. Baixe aqui e ative no painel do WP. […]
[…] Proibir Comentários Repetidos […]
[…] Duplicate Comments www.coffee2code.com/archives/2005/03/30/plugin-no-duplicate-comments/ Prevent visitors from leaving duplicate comments/pingbacks/trackbacks to a post. By Scott […]
[…] No Duplicate Comments WordPress Plugin – помогает предотвратить отÑавление поÑетителÑми повторных комментариев, трекбÑков и Ñ‚.п. […]