How to Display Recent Comments Without a WordPress Plugin

Get Recent Comment wordpress plugin shows excerpts of the latest comments, it also can (optionally) separate the trackbacks/pingbacks from the comments.

If you don’t want to use any wordpress plugin to display recent comments, you can copy the following coding and paste it to the sidebar.php file. To change the number of displayed comments, simply change the LIMIT “10″ to your desired number.

<?php
global $wpdb;
$sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID,
comment_post_ID, comment_author, comment_date_gmt, comment_approved,
comment_type,comment_author_url,
SUBSTRING(comment_content,1,30) AS com_excerpt
FROM $wpdb->comments
LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID =
$wpdb->posts.ID)
WHERE comment_approved = '1' AND comment_type = '' AND
post_password = ''
ORDER BY comment_date_gmt DESC
LIMIT 10";
$comments = $wpdb->get_results($sql);
$output = $pre_HTML;
$output .= "\n<ul>";
foreach ($comments as $comment) {
$output .= "\n<li>".strip_tags($comment->comment_author)
.":" . "<a href=\"" . get_permalink($comment->ID) .
"#comment-" . $comment->comment_ID . "\" title=\"on " .
$comment->post_title . "\">" . strip_tags($comment->com_excerpt)
."</a></li>";
}
$output .= "\n</ul>";
$output .= $post_HTML;
echo $output;?>

Thanks to WPHacks for this awesome coding.

Hotlink Protection – Protect Your Images Being Hotlink in Other Places

No people like their images of their blogs being hotlink in other places, because this will increase your bandwidth usage and slow down the speed of your blog. In order to avoid your images being hotlink by other people, you can use Hotlink Protection wordpress plugin to protect it.

How It Works

  • Referrer check if someone requests an image from your blog. If the referrer is not empty and not your blog the request is redirected to an information image
  • The image urls in the feed are replaced by an alternate url. This url is not protected by a referrer check so online feedreaders get the image

What It Not Does

  • It doesn’t protect the images in the feed. So hotlinking the image urls from the feed is possible. But in my opinion it is nearly impossible to protect this images without breaking some online feedreaders.
  • It doesn’t prevent someone from downloading your images and placing them on their own webspace

WordPress Shadow – Add Shadows to Your Images

Want to make your images on the posts with shadow? Yes, you can use a wordpress plugin named WordPress Shadows to add shadows to a range of objects. Currently supported are images, divs and blockquotes.

A very short post to introduce this plugin, I hope you don’t mind! @@

After The Dateline – Allows Bloggers to Check Spelling of Their Posts

After The Dateline just like a MS Word spell checker, it can be used in wordpress as plugin that allows bloggers to check spelling of their posts. They use artificial intelligence and natural language processing technology to find your writing errors and offer smart suggestions.

So how to get started? Register for an API key and download a plugin. Once installed, After the Deadline adds a button that lets you check spelling, style, and grammar in supported applications.