- Why I wrote this plugin
- What is it for?
- Installation
- Necessary Configuration
- Adapt your theme
- The plugin in action
- Who is that guy at the bottom of the browser-window?
- Found a bug? Feature request?
- License
The plugin’s sourcecode is available via subversion repository
There is a support-forum for this plugin
Why I wrote this plugin
You own a WordPress-Blog and you love blogging. So do I. One thing that makes blogging so much fun is discussing your articles with your readers. But, thanks to spammers and spam-bots, receiving comments and trackbacks can also be a really hard pain in the a**.
That’s why WordPress-plugins like Akismet and Spam Karma are necessary, if you don’t want to spend more time on deleting spam than on creating content. If you don’t already use them, I strongly recommend you to do so!
Recently, I encountered a new type of comment that I would also consider as spam. On these particular cases, I think, real persons were writing those comments. They really matched the contents of my article. At first, I felt quite lucky, receiving so many comments from so many new readers. But when I took a look at their URIs, I saw that they were linking only to commercial sites.
As their comments don’t contain the usual “spam-keywords” and in-text-links to other sites, Akismet and Spam Karma seem to have problems to recognise those comments as what they are: Spam!
I’m the boss here at my blog and I don’t like spam.
I’m blogging, because I want to get in touch with real people, who care about what I write. These commenters don’t care what I write about. They want their sites to receive blog-traffic from my blog.
I don’t want to support this, that’s why I wrote this plugin.
What is it for?
This plugin is intended to make the comment-moderation for the blog-owner a little bit easier. It does not detect comment-spam on its own. To successfully prevent spam, it should be used as an addition to the spam-protection provided by Akismet and Spam Karma.
This plugin will allow you to remove unwanted author-URIs entered by a commenter with one single click of your mouse.
This plugin adds a small button to every comment. This button will only be visible to a logged-in blog-admin (that is a registered user with a user-level of 10).
When you press this button, the URI of the commenter will be replaced by the URI you can specify at the plugin’s option-page.
Installation
Download the archive and extract the two contained files:
comment_url_control.php
comment_url_post.php
Upload the files to the plugin-directory of your blog. This should be
/wp-content/plugins/
After that, both files should be located at that directory. Do not create a subdirectory to store the files there!
Now, go to the plugins-section of your dashboard, look for the entry called Comment URL Control and press activate.
Necessary Configuration
Now, in the options-section of your dashboard, you will find a new subpanel called Comment-URL Control. If you click on it, you will get to a screen, that will look like this:
Enter your own preferred URI, make your selection about the nofollow-attribute and press Save.
Adapt your theme
To get this plugin working, you have to adapt your theme in two places. Luckily, both can be expected to be in the same file — the one that is responsible for the display of comment.
Normally, this file is called
/wp-content/themes/Your_Theme/comments.php
At first: add the button
Inside your template, look for this template-tag:
<?php comment_text(); ?>
And, just behind it, add curlc_switch_button();, making it look like this:
<?php comment_text(); ?> <?php curlc_switch_button(); ?>
At the end: change the comment_author_url-tag
One of these tags should also be in you template:
<?php comment_author_link(); ?>
or
<?php comment_author_url(); ?>
You should replace the first with
<?php curlc_comment_author_link(); ?>
or the second with
<?php curlc_comment_author_url(); ?>
That’s it!
The plugin in action
If you log in with your-admin user, you should see the new button appear under each comment. If you press the button on one of the comments, the URI for that particular comment-author in that comment will change to the URI you specified in your options. If you press the button again, the original URI will be back.
Who is that guy at the bottom of the browser-window?
It’s the German Minister of the Interior, Wolfgang Schäuble, looking for terrorists and other villains.
Found a bug? Feature request?
This plugin is hosted at WordPress.org, which is the right place for these matters. Of course, you can also send me an e-mail.
If you want to report a bug or submit a feature request, I would be delighted to hear from you! Please use this form to get in touch with me. Fill out the form and remember to select my plugin at the Component-section (choose “comment-url-control”):
License
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Greetings,
I am very interested in your plug-in, however, I tried it and modified my theme according to the instructions and it removed every comment authors link?? We are using WordPress 2.3.2 and 1Blogtheme1.2.1 Any help would be appreciated 🙂
Thanks,
Ministermark
Could you please send me your comments.php? My address is: kontakt [at] weinschenker.name
Good morning Jan,
I have emailed our comments.php to you. We appreciate your prompt support 🙂
Best Reguards
Morning Jan,
Very interested with you comments plugin. Could you please me your comments.php? I’m appreciated for that. Thanks.
regards, Esaul Daris
Hello Esaul,
why do you need my comments.php? If there is a problem with my plugin on your blog, could you please provide more details in a post in the ➡ forum?
Thanks
Thanks for the plugin. I managed to get it working and it’s helped me restrict some questionable comments (posters). Thank you and keep up the great work!
greetings
below is my comments.php file … not sure what to modify … your assistance would be appreciated
This post is password protected. Enter the password to view comments.
to “”
comment_status) : ?>
Comments are closed.
comment_status) : ?>
You must be <a href="/wp-login.php?redirect_to=”>logged in to post a comment.
<form action="/wp-comments-post.php” method=”post” id=”commentform”>
Logged in as <a href="/wp-admin/profile.php”>. <a href="” title=”Log out of this account”>Log out
<input class="text" type="text" name="author" id="author" value="” size=”22″ tabindex=”1″ />
Name
<input class="text" type="text" name="email" id="email" value="” size=”22″ tabindex=”2″ />
Mail (will not be published)
<input class="text" type="text" name="url" id="url" value="” size=”22″ tabindex=”3″ />
Website
<!–XHTML: You can use these tags:
–>
ID); ?>
<input name="submit" type="image" src="/images/submit.gif” id=”submit” tabindex=”5″ value=”Submit” />
Hmmm … The plugin will not work with this code. Could you please store your complete theme somewhere in a zip-file where I can download it? I think, the plugin-code needs to be added in another file from your theme-package.