450 CHAPTER 16 (Graphic web design) CHANGING THE LOOK OF
450 CHAPTER 16 CHANGING THE LOOK OF YOUR BLOG Adding a Recent Comments Plug-In Now you will install another plug-in, which will list a number of the most recent comments to the blog in the sidebar. This is great mechanism to keep your readers interested. It allows them to see which topics are still being discussed, and thus is an added incentive to keep reading those topics and to continue to get involved. Real conversation about a shared interest between your readers is the lifeblood of an active online community. The plug-in is the Customizable Comment Listings plug-in by Scott Reilly. You can download this plug-in via Scott s site at http://www.coffee2code.com/archives/2005/03/30/ plugin-customizable-comment-listings/. Download, install, and activate the plug-in using the procedure covered in Chapter 15. Read through the comprehensive documentation on Scott s site. Next, add the code shown in Listing 16-9 (from one of the examples in the plug-in s documentation) to the index.php template file, just before the contribute section. The single parameter 5 tells the plug-in to list only the five most recent comments. Listing 16-9. Code to Insert into index.php Immediately Before the Contribute Links
- Now add some more CSS rules to style the list of comments the same as the other lists on that page, as shown in Listing 16-10. Listing 16-10. Additional CSS Rules for the End of style.css ul.recentcomments { list-style-type: none; margin:0; padding-left: 10px; } ul.recentcomments li { margin-top: 4px; margin-left: 1em; text-indent: -1em; } Figure 16-15 shows what the default output of this plug-in looks like. Below the del.icio.us links, you have a list of the five most recent comments with the name of the comment author and the first few words of the comment. Those few words are a link to the individual comment itself. If a reader clicks the link, she will be taken to the blog post commented on with the page scrolled to the individual comment.
We highly recommend you visit web and email hosting services if you need stable and cheap web hosting platform for your web applications.