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

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.

1 Comment Subscribe To RSS Feed

Topics: All Things Wordpress Blogging

Aug 8th

Wordpress 2.6 Uploading Broken Images - Fix

If you have just upgraded to Wordpress 2.6 you might notice one slight problem. You are no longer able to upload your images. They show up as broken images. It doesn’t matter whether you use the AJAX option or not, the result is the same.

Surprisingly not everyone is facing this problem.

A client of mine has the exact same configuration on his blog (give or take a couple of plugins) as mine. However, he faced the broken image problem while I did not. Of course we have blogs on different servers so that might have something to do with it.

The Fix

The fix is pretty simple. It’s just finding it that takes time :)

  1. Browse to your Wordpress admin settings.
  2. Click on Miscellaneous
  3. The first field there is ‘Store uploads in this folder’ and most probably contains the folder wp-content/uploads. The second field ‘Full URL path to files (optional)’ is most likely blank. It is this field which you need to fill up. Add the full path to your uploads folder as follows (assuming your upload folder is wp-content/uploads).

    http://www.yourdomain.com/wp-content/uploads

    Your images should now upload without a problem.

1 Comment Subscribe To RSS Feed

Topics: All Things Wordpress

Aug 7th

Separate Your Trackbacks From Your Comments

It is amazing how many blogs do not do this. They have the messiest comments section with a zillion comments, trackbacks and pingbacks all jumbled up. And it is almost impossible to make some sense of out of the entire mess. Want to follow the conversation? Try evading the trackbacks and pingbacks along the way.

What’s the solution?

Separate the two, of course.

But How?

That’s a good question. You will find plugins that do this but if you can manage something in the theme design, it is best to do so rather than install plugin upon plugin. Plugins are best used where you cannot achieve your objective without touching the core Wordpress files.

In this case all you need to work with is your theme’s comments.php file.

Step One - Counting Comments and Trackbacks

Since the normal comment count includes both the comments and trackbacks, we first need to get a separate count for each.

Find this line in comments.php

<!-- You can start editing here. -->

Add the following code under it

<?php
$numTrackBacks = 0;
$numComments = 0;

foreach ($comments as $comment) {
$comment_type = get_comment_type(); 
if ($comment_type != 'comment') { $numTrackBacks++; }
else { $numComments++; }
}
?>

Basic gist:
First we set $numTrackBacks and $numComments as 0. We then check the database and loop thru the comments and trackbacks. If the record retrieved is not a comment then a number is added to the trackback count otherwise the comment count is increased.

Step Two - Showing the Comment Count

Next we need to show the comment count before we display the comments.

Find this line

<?php if ($comments) : ?>

and add this code after it:

<?php echo $numComments;?> 
<? if ($numComments = 1) :?>
Response
<? else : ?>
Responses
<? endif; ?>
to &#8220;<?php the_title(); ?>&#8221;

This will spit out the comment count in this format:
1 Response for ‘Post Title’
5 Responses for ‘Post Title’

Step Three - Displaying The Comments

Next we have to display comments. Look for this line:

<?php foreach ($comments as $comment) : ?>

And add these two lines after it:

<?php $comment_type = get_comment_type(); ?>
<?php if($comment_type == 'comment') { ?>

What we are doing here is checking to see if the record retrieved is a comment.
If so then we display it.

Since we have opened a loop, we also need to close it.

Find the line

<?php endforeach; /* end for each comment */ ?>

and replace it with:

<?php } /* End of is_comment statement */ ?>
<?php endforeach; /* end for each comment */ ?>

We have successfully displayed our comments without any trackbacks or pingbacks.

Step Four - Displaying Trackbacks and Pingbacks

Time to display our trackbacks and pingbacks.

Add this code right after you finish displaying the comments (in most themes it would be after the /ol tag):

<? if ($numTrackBacks != 0) :?>
<br />
<h3>Trackbacks and Pings 
(<? echo $numTrackBacks; ?>)</h3>
<? endif; ?>
<ol>
<?php foreach ($comments as $comment) : ?>
<?php $comment_type = get_comment_type(); ?>
<?php if($comment_type != 'comment') { ?>
<li><?php comment_author_link() ?></li>
<?php } ?>
<?php endforeach; ?>
</ol>

You can change the styling and format to suit your site. However, this basic code will show your trackbacks and pingbacks separated from your comments.

Now there is no excuse to not clean up your blog and organize your comments.

No Comments Subscribe To RSS Feed

Topics: All Things Wordpress Code

Aug 6th

Adding Live Preview For Comments

If you scroll down you will see a live preview option for comments. Just try it out by typing in a comment. Pretty cool, huh!?

A friend asked me why this was useful and why anyone will want to see their comment twice?

My answer: If your comment is pretty long, the textarea will start to scroll and you won’t be able to look at your entire comment in on go. The preview on the other hand shows the comment in its entirety. This way you can see how it looks and proof read with ease before you post.

I have gotten this technique from the Rockatee Blog. So a big thank you to Maleika.

  1. First things first. You need to download jQuery. Lets just name it jquery.js and place it in your theme folder.
  2. Next download this file and place it in your theme folder.
  3. Now open header.php from your theme and add these lines in the head area:

    <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/jquery.js"></script> <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/preview.js"></script>

  4. Last step is to add the following code to you comments.php file wherever you want the live preview to show up.

    <div class="comment-preview"> <h3>My Comment Preview</h3> <p class="live-preview">Add some instructions - this text will get replaced by the comment preview.</p> </div>

  5. You can use the class p.live-preview to style the live comment preview.

See that was simple and you have your own comment live preview.

4 Comments Subscribe To RSS Feed

Topics: All Things Wordpress Code

Aug 6th

Explode and Increase Comments Using These Wordpress Plugins

I have already discussed a few techniques and plugins you can use to increase your comments. Here is a re-cap of some old and some new plugins I haven’t discussed before. All are must-haves if you want to explode your comments:

  1. Subscribe To Comments
    I am absolutely staggered that so many bloggers don’t use this one. Don’t they want their commenters coming back? When I comment on a blog, I really want to know when there is a reply. And subscribe to comments is the perfect plugin as it sends me an email whenever a comment is posted.

    Without this option, your commenters may just get sick and tired of checking manually or not bother at all. Not everyone subscribes to the comments RSS feeds so make sure you provide this option.

    I cannot stress this one enuff!

  2. Do Follow
    Another plugin I have dedicated an entire post to. Reward your posters by removing Wordpress’ default rel=nofollow from comment links. A do-follow blog is more prone to comments especially if it is one that is just starting out. Read more about no follow, do-follow.
  3. CommentLuv
    Give your commenters additional incentive using CommentLuv. This plugin searches their RSS feed and adds a link to their last blog post in their comment. Your commenter gets a keyword rich anchor link to his/her blog. It is Google heaven for them :)
  4. KeywordLuv
    This brings me to the next plugin and more Google heaven ;-) You might have noticed people using spammy names with keywords in place of their real name. This is because they are trying to get keyword rich links back to their blogs.

    This plugin makes the job easier without the spammy name bit. Just add your name as YourName@Your Keywords and Your Keywords will be used as the anchor link and your name will be shown separately. So if I write my name as Erum Munir@DotsnDashes Website Designs, my comment will show it as:

    Erum from DotsnDashes Website Designs

    Pretty cool, eh?

See it is just four basic plugins which offer so much in return.

A couple of other comment plugins which may help are:

  1. Top Commentators
    Adds a list of your top commentators to your sidebar. Will work best once you have a few comments to start with. Believe me when I say you don’t want an empty list. This plugin adds an incentive for repeat comments as one needs to have some comments to get to the top. How many really depends on how popular your blog is. I have seen people specifically commenting at blogs with this plugin. So it might work for you, too.
  2. Recent Comments
    This plugin works with the recent comments widget already a part of Wordpress 2.5.1 and Wordpress 2.6. It offers the option of styling your recent comments display to be a bit better looking than the default. You can use it to add a link to the commenter’s blog from your sidebar.

And remember when the comments start rolling in, these plugins will help keep you organized:

  1. Akismet
    As always keeps most spam at bay. Comes with the core Wordpress installation.
  2. Better Comments Manager
    It can get a bit tedious going to each post and replying to comments from there. Better Comments Manager lets you do so via the Wordpress admin - all in one place. A definite time saver if you have a lot of comments.
  3. WP Paged Comments
    Having too many comments can also be nightmare if your page flows on forever. Enter WP Paged Comments which adds pagination to your comments. Phew! What a relief and great alternate to that mile long page of comments.

5 Comments Subscribe To RSS Feed

Topics: All Things Wordpress Blogging

Aug 4th

Generate Trackbacks and Backlinks using TrackBoost

TrackBoost Today I came across this software - TrackBoost.

The first deterrant to looking into this further was the fact that the website only had a video and hardly any content about the software. My speakers are not working at the moment and I find using my headphones to be a pain. However, I put them on unwillingly as I wanted to get more information.

If you are like me and don’t want to be forced to watch videos, here is a lowdown of what the software is about and what I liked and disliked about the product.

What It Does

The software links to your Wordpress database. According to the website:

TrackBoost is made for self-hosted Wordpress blogs, but will work with any blogging system that supports the MetaWebLog API

The software once connected to your database picks out a list of your recent posts and lets you edit them. You can also add new posts and publish them directly from within the software.

But this is not what the software is mainly about. Its main purpose is to let you search for your keywords and find blogs that allow trackbacks. You can choose the ones you want to add from a list of blogs. The software automatically gets the title, trackback link and excerpt from the website. All you gotta do is copy/paste.

What I Like About the Software

  1. I like the way you can put in a certain search terms and get results of all blogs that offer the trackback option. This means that once you add a link to their blog, you will get a link in their trackbacks/comments sections for that post. Instant backlinks.
  2. You can also preview the search results directly within the software. This way you can be sure the links you are adding are of some value.
  3. You can also view the page rank and Alexa ranking of these blogs so you can decide if it is worth the effort or not. Ot you can decide to be nice to a new blogger and give them a backlink from your blog.
  4. There is a lot of time saving involved here as you don’t have to browse through dozens of Google results for blogs that may or may not offer trackbacks. Plus you don’t have to painstakingly copy all the information like post title, trackback link, post excerpt, etc manually. The software does a great job of this.

What I Did Not Like About the Software

  1. This is of course a personal preference but I don’t use WYSIWYG editors. And this software only offers that one option. I prefer controlling my own code. So this part does not work for me.
  2. Softwares like these give people the chance to be lazy and put up blogs with nothing but links and excerpts from other websites. So if you do plan on using this software, please add good content along with the trackbacks.
  3. Another pet peeve of mine - this software has the option of adding no follow tags to the trackback links. Now that is just bad! If you want a backlink, you should be willing to provide one, too. So IMO this option shouldn’t even be there.

Wish List

  1. I wish it also had the option to detect blogs that offer trackbacks with the do-follow option. Without do-follow, the backlink is meaningless.
  2. Two posting options like in Wordpress so those who don’t like the visual editor can turn it off.

Since this is a fairly new software I’m sure there will be updates and new features coming up soon.

[You might also want to read: TrackBoost: 5 Minutes to Killer Backlinks!]

TrackBoost

No Comments Subscribe To RSS Feed

Topics: Blogging Reviews SEO

Aug 3rd

CForms II - The All In One Contact Form Solution

Cforms II is a Wordpress plugin which makes it easy for you to add a contact form to your website.

Once you install and activate the plugin, don’t get intimidated by the dozens of options available. It is pretty easy to set up. Click on CForms from your WP admin menu.

Click to view bigger image
Click to view the bigger image
Continue Reading »

6 Comments Subscribe To RSS Feed

Topics: All Things Wordpress Code

Aug 2nd

How To Get Visitors To Leave Comments?

You have to motivate your visitors to leave comments.

How do you do that?
By giving them a good enuff reason to do so.

Like they say there is no such thing as a free lunch.

We have already discussed one approach and that is by making your blog do-follow.

Another option is the CommentLuv Plugin.

This plugin searches the commentator’s RSS feed and adds the title of their last blog post to their comment.

Benefits to the Commentator

  1. Increased Visitors
    You are sharing your visitors with your commentors. If their post titles are attractive enuff, people browsing your blog are sure to click on these links.
  2. SEO and Page Rank Benefit
    Normally your commentator’s get a link using their names. The anchor text has no keywords and hence the link benefit not so much. A post title on the other hand may be full of keywords and hence great for Page Rank benefits. Not to mention it is a page rank benefit for their inner pages which may not get much Page Rank Luv normally.

There is just one problem

And that is if you are redirecting your feed to FeedBurner. The way FeedBurner is set up by default, post titles link to Feedburner. This may give you some stats but guess who gets the page rank benefit?

So how to turn this off?

There is a great post on how to Turn off FeedBurner Redirect in RSS Feeds. Be sure to do this to get the full benefit of this plugin for yourself and make sure to educate your commentators on this issue as well.

8 Comments Subscribe To RSS Feed

Topics: All Things Wordpress Blogging

Aug 2nd

Etiquettes of Commenting

As soon as you make your blog a Do-Follow you will notice a slight if not a large increase in comments.

Some of these are great as they contribute something. Fair enuff for a link back to your website.

And then there is the category who want a link back for nothing. If they could they would leave a blank comment. Since they can’t they just leave comments like ‘Thank you’ or ‘ I came upon your website and wanted to say hi’.

Bring Something To The Table

As much as I love new comments, they need to have some substance. It is ok to add one line comments as long as you add to the discussion. Don’t just say thank you .. show that you are by adding something meanigful.

Fair Exchange

It is only fair that if someone is letting you add a do-follow link to your blog or website then you give something back in return as well. A simple thank you is just not enuff.

No Comments Subscribe To RSS Feed

Topics: Blogging

Aug 1st

Upgrading to Wordpress 2.6

I finally upgraded to Wordpress 2.6.

I first installed it locally to test it out and make sure that nothing was broken and the website was showing up fine. Good idea on my part.

Turns out there was a permalinks issue.

Everything was totally mucked up. I couldn’t get the post pages to load. I was getting tagged headings on category pages and the rest were just giving a page not found error. Oops!

Am I glad I didn’t directly upgrade live!

But there is good news.

This issue has a fairly simple solution.

Turns out you gotta make sure that the category and tag base fields are not empty in your Permalinks section. So I promptly added category for the the category base and tags for tag base. And that is all it took!

Phew.

On to checking the plugins

Apparently all of them are working. Nothing broken and the site looks ok. Will find out soon enuff if something refuses to work. So far so good.

What about the new features?

Well the three that really stand out are:

  1. Plugins Enhanced
    The plugins section offers an enhanced experience and a comparitively clutter free environment. The active plugins are separated from the deactivated ones. There is also a list of recently deactivated plugins.

    Better still you can finally delete plugins from within Wordpress. About time this option got added.

  2. Post Revisions
    Nice! Just in case you muck up a post and want to go back to an older version, now you can! This is especially useful for people who might have several authors working on the same piece.

    The only thing is I wish there was an option to delete these revisions - I haven’t found one yet. I mean I don’t want to save a version every time I correct a spelling error.

  3. Review Template
    I have saved the best for last. Being a designer, this is the ultimate feature for me. Now instead of testing live, one can preview the template in the design section. This totally blew me away! Extremely useful feature for when you are looking to change your theme but want to confirm it works fine first.

There is also the Turbo feature but I haven’t tested it out yet. So I’ll comment on that once I do.

All in all it hasn’t been as bad as I expected and it has been more or less a smooth enuff ride.

No Comments Subscribe To RSS Feed

Topics: All Things Wordpress

Pages: 1 2 3 4 Next