Plugin: Sexy Comments v1.4 Released!
August 3, 2007 | 198 Comments
Contents:
Introduction
This has been a long time coming and I am happy to announce the release of Sexy Comments v1.4! With this version comes a lot of changes...so be sure to read the installation section! Along with simple optimizations and general restructure, the following features are now available:
Feature List
- Ajax comment preview (new feature)
- Author post highlighting
- Avatars
- Either display/hide avatars
- Select your avatar service of choice (Gravatar and MyBlogLog options are available)
- Specify maximum avatar dimension (Gravatar Only)
- Customize default/trackback avatars
- Comment Reply-To (new feature)
- Comment Themes (new feature)
- CSS overriding
- "Number of Comments" message customization
- jQuery inclusion toggling
Installation & Upgrading
- Download Sexy Comments v1.4 from the WordPress plugin directory
- Unzip that little sucker
- Place sexy-comments folder in your wp-content/plugins directory (it should look like this: wp-content/plugins/sexy-comments/
- Log in to your WordPress plugin admin page and activate the plugin.
- In the plugin admin page, click the SexyComments sub-menu.
- Customize the settings until you have something that works for you.
- Locate your theme's template file that displays comments (typically comments.php). Remove the comment output loop and replace with:
PHP:
-
<?php sexycomments::show($comments); ?>
-
- If you plan to use the Ajax features or the Reply-To features, you will need to do two things.
- Enable jQuery and jQuery Form Extension via the Plugin > SexyComments administration page.
- Locate the template file that contains the comment submission form (typically comments.php near the bottom) and replace that chunk of code with:
PHP:
-
<?php sexycomments::form(); ?>
-
NOTE: Be sure not to touch the section that generates the form for adding comments! This plugin does not re-create the comment creation form.
- Lastly, consider disabling the plugin CSS and taking the example CSS provided and customize it to suit your theme's color scheme.
- You should be all set, now! w00t w00t! Go make a MyBlogLog or Gravatar account if you don't already have one and upload an avatar. Gravatar tends to be pretty flakey so I'd suggest using MyBlogLog.
FAQs
- Q: What is this "comment loop" you speak of?
A: Ah, yes. That thing. Well, its anatomy looks similar to this (there will be some variation from theme to theme):
PHP:-
<?php if ($comments) : ?>
-
<!-- some HTML is typically here -->
-
-
<?php foreach ($comments as $comment) : ?>
-
<!-- the output HTML of each individual comment -->
-
-
<?php endforeach; /* end for each comment */ ?>
-
<!--...more HTML -->
-
<?php else : // this is displayed if there are no comments so far ?>
-
<?php if ('open' == $post->comment_status) : ?>
-
<!-- typically a blank area or a place with a comment -->
-
<?php else : // comments are closed ?>
-
<!-- closed comments section -->
-
<?php endif; ?>
-
<?php endif; ?>
-
- Q: Ok...so I just upgraded to a new version and there is nothing in the SexyComments admin page...WTF?
A: Yeah. Sorry about that. In this version, the directory structure has changed drastically and Sexy Comments should no longer live in wp-content/plugins/sexycomments.php OR wp-content/plugins/sexycomments/sexycomments.php, but instead it should be in wp-content/plugins/sexy-comments/. Make sure that the plugin is in the correct location of your plugins directory.
- Q: What happened to sexycomments_print($comments)? I used to use that to get my comments to display...will it still work?
A: Along with a directory structure overhaul, this version had a large code overhaul as well. The old function (sexycomments_print) is deprecated but will still work for the time being. I greatly urge you to move over to the new function call sexycomments::show($comments) as that is the new *impoved* function.
WordPress Plugin: Sexy Comments
April 5, 2007 | 74 Comments
Unhappy with my theme's comment display, I recently re-coded a sexier comment display as a plugin so others can sexify their comments as well.
Features
- Forum-thread-like comment layout: User information to the left, comment to the right.
- Author post highlighting
- Altered Trackback/Pingback Display Formating
- Avatars
- Either display/hide avatars
- Select your avatar service of choice (Gravatar is the only option until I find more avatar services)
- Specify maximum avatar dimension
- Customize default/trackback avatars
- "Number of Comments" Message Customization
- CSS Overriding
Installation
- Download and unzip the sexycomments.zip
- Place sexycomments folder in your wp-content/plugins directory
- Log in to your WordPress admin panel and activate the plugin, then visit the SexyComments submenu of the plugins tab.
- Customize the settings until you have something that works for you.
- Locate the template file(s) in your theme that loops over and displays comments. Remove that comment output loop and replace with:
PHP:
-
<?php sexycomments_print($comments); ?>
NOTE: Be sure not to touch the section that generates the form for adding comments! This plugin does not re-create the comment creation form.
-
- Lastly, consider disabling the plugin CSS and taking the example CSS provided and customize it to suit your theme's color scheme.
- You should be all set, now! w00t w00t! Go make a Gravatar account if you don't already have one and upload an avatar.


