Want to know when there are new posts?

SUBSCRIBE VIA EMAIL

SUBSCRIBE VIA RSS

Aug 19th

CForms II - More on Using as a Comment Form

Topics: All Things Wordpress Blogging

Good news! There is a new version of CForms that is out and has got great features. The best thing about it is it has got most of the features on my wish list :)

So here goes…

Plugin Compatibility

CForms is now completely compatible with three of the most used comment plugins.

First Step is to install the above mentioned plugins and activate them.

Next… adding Subscribe To Comments and CommentLuv

When you add the comment form you will notice two extra fields: Subscribe To Comments and CommentLuv. Adding these will make sure that the two plugins now work seamlessly with CForms. Yes it really is that simple!

And … WP AJAX Edit Comments
This is the simplest one to work with as all you need to do is upgrade to the latest version of this plugin. The plugin authors of both CFORMS and WP AJAX Edit Comments have worked together to make sure the plugins are compatible. So hats off to them.

Comment Template

When you post a comment using the CForms comment form, you might not get to see the comment posted until you refresh the page. This is because there is one last setting that needs to be adjusted.

  1. Click global settings.
  2. Next select ‘WP Comment Feature Settings’
  3. The most important setting here is ‘Parent Comment Container’. Your comments are wrapped in an ol tag. Whatever id is set for that must be added to this field. Example:

    <ol id="commentlist">

    In this case the ‘Parent Comment Container’ will be ‘commentlist’

  4. Next we design the look of the comment template to match the one in comments.php. This can be done under ‘New comment HTML template’. If you click on Supported Variables you will see a list of all that you can use. The good news is that there is now a gravatar option. Also if you use the Default Template as the starting point, it also has the option of alternating the class.

    <li class="alt" id="comment-{id}">

  5. Lastly you can also set the gravatar size to your liking.

You should now be able to preview your comment without re-loading te page plud have the option of editing it if yo are using the WP AJAX Edit Comments plugin.

Troubleshooting

There are some problems you might run into.

  1. You might note that your first comment needs refreshing while the follow-up comments can be easily viewed without a reload.

    There is a reason. Your most probably have your comment code like this:

    If Comment {
    <ol id="commentlist">
    <li>
    Comment Here
    </li>
    </ol>
    }

    Note that the ol tag is only displayed if there is a comment. Your blog doesn’t know there is a first comment until the page is re-loaded. Since the ol tags are not used, CForms cannot show the comment. If you have them outside the ‘if comment’ and the ol tag is rendered regardless of whether there is a comment or not then Cforms can work its magic.

  2. You might find that you can no longer access your Wordpress admin or that pages go blank after you save settings. Check to make sure that cforms.php in your plugins/cforms folder does not have any empty spaces at the end. If the problem persists, then it can be a PHP memory issue. This can be set in your php.ini file if you run your own server or you can ask your host to increase PHP memory to say 32 or 64.

Enjoy the new version of CForms … I’m sure this plugin will continue to improve. In which case there will be a part 3 to this tutorial someday.

Tags: , , , , ,



RSS Feeds

MiniSitePacks.com

95% Of Your Minisite Design Done For You--INSTANTLY?

This is a complete solution! We're Talking Full Blown Graphics--From Top To Bottom--At A FRACTION Of What You Would Pay A Designer! Find out more.

Related Posts

3 Responses to “CForms II - More on Using as a Comment Form”


  1. excellent tutorial! nice to see how easily commentluv and subsribe to comments are added to this great form

    Blog Post: Taking a break!

  2. Great to know, since this is one of my more favorite plugins.

    Blog Post: Royale Blue

  3. Thanks for the info, just what I was looking for. Very innovative site by the way.


What Do You Think?

Enter your name as YourName@YourKeywords and YourKeywords will be used as the anchor link to your website. Psst this gives you Page Rank advantage.

  1. (required)
  2. (required)
  3. (required)

Comment Preview:

Just in case you wanna see.

You can also subscribe to comments via RSS Comments RSS