Maria’s Guides

Support and additional material for readers of books, articles, and digital media by Maria Langer.


Random Book Cover #1Random Book Cover #2Random Book Cover #3Random Book Cover #4Random Book Cover #5Random Book Cover #6Random Book Cover #7Random Book Cover #8Random Book Cover #9

Blogging Basics: Comment Spam, Part II

Posted on January 16th, 2009 at 8:00 am · No Comments
Filed in: RSS WordPress   

Part II: When Comments Go Wrong

Posts in this series:
Part I: Understanding Comments and Pingbacks
Part II: When Comments Go Wrong

In the first part of this series, I explained what comments and pingbacks are and how they can benefit your blog. If you don’t know this stuff, go back and read that first. In this part of the series, I’ll explain how and why the comments feature can go wrong and list three tools for WordPress that can fight it.

Spam, Spam, Spam, Spam

While your blog’s readers like the comments feature because it enables them to participate in your blog, spammers like it, too. It gives them the ability to share their spammy comments and links on your blog.

Comment Spam ExampleComment spam is a terrible problem for bloggers. If left uncontrolled, it can quickly take over your blog by filling post comments with a lot of garbage — some of of obscene — including links to Web sites you probably don’t want to advertise for. Your blog visitors will have to wade through all this junk to find real comments. If the problem is bad enough, the probably won’t bother looking. If the comment spam is offensive enough, they might not visit your blog again.

Pingback SpamComment spam’s close cousin is pingback spam, which is relatively new to blogging. In pingback spam, someone else’s blog links back to yours, placing a pingback link to that blog in your blog. The purpose may be to get your site visitors to come to that blog, or, if you have nofollow disabled, to improve the site’s Google page rank.

Both comment spam and pingback spam can be automatically generated. For comment spam, spambot programs can automatically find comment forms on a blog, fill in the fields, and submit the spam comments. Pingback spam can be created through the use of feed “scraping” tools that pull parts of posts from your blog and posts them to the spammer’s blog, along with a link to yours. Because of automation, so there’s no limit to how much spam can be sent to your blog.

Spam Stopping Tools

Fortunately, there’s help. Many WordPress programmers are out there, fighting the same war against spam that you are. They have the skills to write plugins that can identify spam and quarantine or delete it so it doesn’t appear on your blog.

While there are numerous spam prevention tools out there for WordPress users, I have personal experience with three of them:

  • Aksimet, which is part of WordPress.com and comes as a plugin with self-hosted WordPress blogs, is created and maintained by the folks at Automattic, makers of WordPress. It’s fully integrated into WordPress and is extremely effective. I tell you more about how to set up and use Akismet in Part III of this series.
  • Spam Karma, by Dr. Dave, is another powerful spam prevention tool. I used this exclusively for a while and it caught all the spam that appeared on my site. The only reason I stopped using it is because I switched to Akismet.

  • Bad Behavior is a plugin by Michael Hampton. It attempts to head off spam by determining whether a hit to a blog post is by a human or a spambot. Spambots are automatically denied access. One side benefit of this approach is a reduction in MySQL activity due to spambot access — that’s why I initially began using it. I used Bad Behavior in conjunction with one of the other spam prevention tools listed here for some time before trusting Akismet to do the whole job. The reason: Bad Behavior sometimes records false positives, making it impossible for certain real people to post comments. This problem occurs rarely, but since Akismet seems to be doing the job on its own, I prefer not to take the chance. (Note to Michael if you stop by to read this: if I got this wrong, please do comment to set me straight.)

I should note here that both Akismet and Spam Karma can “learn” about spam based on how you resolve comments you manually moderate. That’s why it’s important to properly identify any false positives or missed spam.

In the next post of this series, I’ll explain how you can configure Akismet on your WordPress.com or self-hosted WordPress 2.7 blog.

Lynda.comLearn More

Learn more about working with a self-hosted WordPress 2.7 installation — or WordPress.com. Check out my WordPress courses on Lynda.com.

Related Posts:

The following posts on this site are related. This list is not machine-generated.

→ No Comments • Read 466 Times
Add to Del.icio.usAdd to Del.icio.us • Technorati ThisTechnorati This • Digg ThisDigg This • Stumble ItStumble it! • Twit ThisTwit This


Why WordPress Plugin Updates Aren’t Always a Good Thing

Posted on January 14th, 2009 at 2:27 pm · 4 Comments
Filed in: RSS WordPress   

When updates go wrong.

Way back in 2006, I wrote an article titled “Reader Engagement Site Improvements.” In it, I detailed a number of plugins I’d installed to help keep visitors around a while longer, looking at new content on my site.

Landing Sites in ActionOne of these plugins is called Landing Sites. Its job is to check to see if a visitor has arrived (or “landed”) on your blog from a search engine it knows. If it has, it displays a custom message with links to possibly related posts. The idea is that if a visitor has come to your site because he was searching for something, maybe one of your other related posts might meet his needs. Here’s what it looks like on my blog, with some customization.

I used the plugin on both my main blog, An Eclectic Mind, and this Maria’s Guides site. It worked like a charm. My blog was even commended by another blogger for the use of this feature. (Wish I could find the link, but I can’t. Sorry.)

Then, I made a fatal error. When WordPress notified me that the Landing Sites plugin had been updated from version 1.3 to 1.4.1, I allowed it to automatically install the update. I didn’t realize until I updated my blog to WordPress 2.7 and changed the theme that Landing Sites had stopped working. Instead of showing a list of related posts, it was show some raw and ugly PHP code.

I figured the problem was with WordPress 2.7, so I just disabled it on my blog. I posted a comment in a WordPress.org support thread and waited for a response. The author of the plugin subsequently posted instructions for a fix, but it didn’t work for me or for others.

Today, Lorelle (of Lorelle on WordPress fame) e-mailed me to point out that the plugin wasn’t working on this site. (I admit it: I’m lazy and still have this site set up on WordPress 2.6.5.) That surprised me. I went into action, beginning the troubleshooting process.

No fix worked. But I was able to track down the old version of the plugin. I disabled the current version and deleted it. Then I reinstalled the old version (1.3) and activated it. The result: problem solved.

I then went to my blog, which is running WordPress 2.7, and installed the old version there. As you can see from the screenshot above, it works.

What does this mean to self-hosted WordPress users? Unfortunately, it means that plugin updates don’t always make things work better — or even right. In this instance, the plugin author “broke” the plugin by trying to fix it and releasing an update. I don’t know if the new version works for everyone else, but I know it doesn’t work for me. I don’t know why, and frankly, I don’t care. I’m just glad that reinstalling the old version fixed the problem.

I like the plugin and am glad to have it fully functional on my blogs.

A big thanks to Lorelle for contacting me when she found the problem. Since I never reach my blogs via a search engine, I probably never would have found the problem on my own.

→ 4 Comments • Read 789 Times
Add to Del.icio.usAdd to Del.icio.us • Technorati ThisTechnorati This • Digg ThisDigg This • Stumble ItStumble it! • Twit ThisTwit This


Blogging Basics: Comment Spam, Part I

Posted on January 9th, 2009 at 8:01 am · No Comments
Filed in: RSS WordPress   

Part I: Understanding Comments and Pingpacks

Posts in this series:
Part I: Understanding Comments and Pingbacks
Part II: When Comments Go Wrong

One of the main things that differentiate a blog from a Web site is the ability of readers to interact with what you post. This is done primarily through the use of comments.

Comment Basics

Most blogging software supports reader commenting. Typically, a comment form appears at the bottom of a post. Readers can enter their comments about the post, along with their name, e-mail address, and Web or blog URL. When the form is submitted, the comment is added to the post.

Post with CommentsThe screenshot here shows what a post on my blog, An Eclectic Mind, looks like with a few comments added, as well as a comment form.

Most blogging software packages offer the blogger options for handling comments. WordPress, for example offers several options:

  • Comments can be enabled or disabled by default or set on a post-by-post basis.
  • Commenter e-mail address can be required for a comment to be submitted.
  • Blog registration can be required for a comment to be submitted.
  • Comments can be held for moderation or automatically moderated based on a handful of options, including moderation and blacklist words or phrases.

Pingbacks and Trackbacks

Pingbacks (or trackbacks) are part of the commenting arena. A pingback happens when another blogger writes a post in which he links directly back to your post. He may have quoted your post in his and is linking back to the source. Or maybe he just wants to tell his readers how good your post was and send them over to your blog to read it. If his blogging software supports pingbacks or he has manually entered the link as a trackback, a special comment is sent to your blog with a link back to his blog.

Technically, a trackback is different from a pingback. A pingback is automated. The other blogger’s blogging platform must be capable of creating the pingback comment. Before automated pingbacks were widely supported, blogging platforms included a trackback feature that required the blogger to manually enter a linked post’s URL in a field when creating his post. Nowadays, these two terms are often used interchangeably.

In WordPress, you must have pingbacks enabled for your blog posts in order for WordPress to receive them. Pingbacks can appear with comments or, if the blog’s theme separates comments from pingbacks, they can appear separately. For example, my blog’s theme separates comments and pingbacks under different “tabs.”

Pingbacks look different, too. Instead of including a blogger’s name and comment, they include the name of the post that links to your post and a short excerpt surrounded by [...] characters. Here’s what a pingback looks like on a post in this blog:

Pingback Example

Comments, Pingbacks, and Reader Participation

It’s pretty easy to see how comments encourage reader participation. Comments give readers an opportunity to add or respond to your post. If enough readers comment and you respond, a conversation gets started. Sometimes that conversation can have more value than your original post.

For example, one of the most popular posts on this site is about a change in iTunes that affected how podcasts play back on an iPod. I identified the problem and created a workaround. A bunch of readers commented. One of the readers commented by sharing an AppleScript he’d written to automate my workaround. Another reader fine-tuned that script so it ran more efficiently. To this day, I use that script as my workaround. You can see the post and read the comments here.

Pingbacks also encourage reader participation, but in a less direct way. Suppose you read this post and think that your readers might benefit from it. You write a post on your blog that refers to it and adds your own comments. When you link to this post from your blog, a link to your post appears on this post. So readers reading comments here can go to your post to see what you’ve written about this topic.

Unfortunately, not everyone uses comments and pingbacks as they’re intended. The result is comment and pingback spam. I’ll discuss those in the next post of this series.

Lynda.comLearn More

Learn more about working with a self-hosted WordPress 2.7 installation — or WordPress.com. Check out my WordPress courses on Lynda.com.

Related Posts:

The following posts on this site are related. This list is not machine-generated.

→ No Comments • Read 519 Times
Add to Del.icio.usAdd to Del.icio.us • Technorati ThisTechnorati This • Digg ThisDigg This • Stumble ItStumble it! • Twit ThisTwit This


Get the Right Copyright Dates in Your Blog Footer

Posted on January 5th, 2009 at 7:46 am · 1 Comment
Filed in: RSS WordPress   

A tip for self-hosted WordPress users.

Contrary to popular belief, most blogs are copyrighted. As a result, most blog themes include a copyright notice in the footer.

How the copyright notice is entered into the theme determines how it appears:

  • If entered as plain text, it appears as a static date or range of dates — whatever you entered. This means that each new year — right about now — you need to change the static text to include the current year.
  • If entered using tags that pull the most recent date’s year from your WordPress blog — or just use the current year — a range of dates may not appear at all. Instead, there will be just one date. That’s better, but not exactly accurate.
  • If entered using PHP tags that get the first and last years of blog posts and put them in a range — you never have to modify the footer to change the dates and they always include the entire range of post years. This is the best solution and it isn’t difficult to do.

To automatically display a range of dates from the year of your first post to your most recent post in a copyright notice, just edit the code in the footer to remove your current copyright notice code and replace it with this:


<?php
     global $wpdb;
     $post_datetimes = $wpdb->get_results("SELECT YEAR(post_date_gmt) AS year FROM $wpdb->posts WHERE post_date_gmt > 1970 ORDER BY post_date_gmt ASC");
     $firstpost_year = $post_datetimes[0]->year;
     $lastpost_year = $post_datetimes[count($post_datetimes)-1]->year;

     $copyright = __('Copyright &copy; ') . $firstpost_year;
     if($firstpost_year != $lastpost_year) {
          $copyright .= '-'. $lastpost_year;
     }

     echo $copyright;
?>
<?php bloginfo('name'); ?>

The result, on this blog, would be something like:

Copyright © 2004-2009 Maria's Guides

If you prefer to have your name appear instead of the name of your blog, replace the last line with your name. That’s what I do.

Lynda.comLearn More

Learn more about working with a self-hosted WordPress 2.7 installation — or WordPress.com. Check out my WordPress courses on Lynda.com.

→ 1 Comment • Read 562 Times
Add to Del.icio.usAdd to Del.icio.us • Technorati ThisTechnorati This • Digg ThisDigg This • Stumble ItStumble it! • Twit ThisTwit This


December 2008 Links

Posted on January 4th, 2009 at 8:39 am · No Comments
Filed in: RSS Links Worth Following   RSS Mac OS   RSS WordPress   

Here are a few links of interest to the folks who read my books and articles or watch my training videos.

→ No Comments • Read 585 Times
Add to Del.icio.usAdd to Del.icio.us • Technorati ThisTechnorati This • Digg ThisDigg This • Stumble ItStumble it! • Twit ThisTwit This


How To Customize WordPress’s Tag Cloud Widget

Posted on December 14th, 2008 at 5:41 pm · 8 Comments
Filed in: RSS WordPress   

You don’t have to use it with default settings.

If you use WordPress widgets on your self-hosted WordPress blog, you may not be fully satisfied with the way the Tag Cloud widget looks and works on your site. I know I wasn’t. The maximum font size was too large for the most commonly used tag (helicopters, on my blog) to fit into the column in which I’d put it. Since I wanted my tag cloud in the narrow column in which it resided, I had to make a change.

The answer is to modify the wp_tag_cloud function in the category-template.php file. It’s remarkably easy to do. Here’s how.

  1. Open the file /wp-includes/category-template.php.
  2. Scroll down to the line that begins function wp_tag_cloud. If you’re using WordPress 2.7 and haven’t made any other changes to this file, you should find it at line 552. (You can always do a search for it; I found the general area by searching for “tag cloud.”)
  3. Make changes in the array as follows:
    Tag Cloud Function

    • To specify the smallest font size, set the value after ’smallest’. The default is 8 points.
    • To specify the largest font size, set the value after ‘largest’. The default size is 22 points.
    • To specify the maximum number of tags included in the cloud, set the value after ‘number’. The default number of tags is 45.

    My Tag CloudI changed my settings to 6, 16, and 75 respectively. You can see the results in the screenshot here, as well as in the sidebar for my blog, An Eclectic Mind.

  4. Overwrite the existing file with the changed file.

When you reload a page that uses the Tag Cloud widget, your changes should appear immediately.

Keep in mind that if WordPress is updated and the file you changed is replaced, you may have to repeat these steps to reset your defaults.

Learn More

Lynda.comLearn more about working with a self-hosted WordPress 2.7 installation — or WordPress.com. Check out my WordPress courses on Lynda.com.

→ 8 Comments • Read 3357 Times
Add to Del.icio.usAdd to Del.icio.us • Technorati ThisTechnorati This • Digg ThisDigg This • Stumble ItStumble it! • Twit ThisTwit This