Optimize the CommentLuv wordpress plugin

CommentLuv is a wordpress comment plugin powered by Comment Luv. This plugin is compatible with the latest WordPress version up to now, it helps give something back to every single commentator as well as entice them to come back and visit more often by automatically adding a titled link to their last blog post at the end of their comment. In this article, I will show you how to make a bit optimization for CommentLuv.

As you see, Intenseblog.com is now using CommentLuv as website comment, this is a Win-Win comment system that’s not only grow the community, but also the SEO ranking of both the website owner and the commentator:

The plugin fetches the feed found at commenters site URL while they type their comment and extracts the last blog post title with link and displays it below the comment form. When they submit their comment, the last blog post link gets added on the end of their comment for all to see.

The installation process is very simple, you need to download the CommentLuv plugin at:http://comluv.com/download/commentluv-wordpress/ and follow the plugin instruction. You can read more about CommentLuv at the More resources section of this post, and now I want to show you how to optimize this plugin for your website.

Maybe your websites had already called the Jquery script (or you use another jquery version) but after you install the CommentLuv, the plugin calls for Jquery a second times; Andy Bailey (the admin of CommentLuv) was told that “wp_enqueue_script is already built to do that, it shouldnt show 2x jquery calls unless your theme has it hard coded”, so let check your website before we start to do this:

Besides the Jquery script, the plugin also calls for two other script are: hoverIntent.js and commentluv.js, so that you should:

1. Repair step.

The header data for config commentluv needs to be in the header section of your website and it should be dynamic but if you want to improve the performance a bit more, you should follow this:
View your website source and then copy the following source: <script type='text/javascript'>
/* <![CDATA[ */
var cl_settings = {
.... // copy all of this source (it's different for a specific website)
usetemplate: ""
};
/* ]]> */
…then paste it to your footer.php in your theme and add two wordpress conditional tags at the top and bottom: <?php if (is_single()) { ?>
<script type='text/javascript'>
/* <![CDATA[ */
var cl_settings = {
.... // the source you have copied before
usetemplate: ""
};
/* ]]> */
</script>
<?php } ?>

When you change plugin settings please modified this script so it will not break the plugin use. Please aware what you are doing. (Thanks Andy Bailey for that)

2. Combine the javascript.

First, you should combine the content of hoverIntent.js and commentluv.js into 1 file, ex: combine.js and then add this line to the footer.php of your theme, for example:
<script type="text/javascript" src="http://www.domainexample.com/.../combine.js" ></script>

4. Combine the CommentLuv Css

Copy the content of cl_style.css (in the plugin folder) to your main style css file and then deleting these lines in commentLuv.php:add_action ( 'wp_head', array (&$this, 'commentluv_style' ) ); // add style sheet to header
and: // hook the head function for adding stylesheet
function commentluv_style() {
echo '<link rel="stylesheet" href="' . $this->plugin_url . 'style/cl_style.css" type="text/css" />';
}
Save and then upload it again to the plugin folder.
In those steps above, you can use some online minify services like http://www.cleancss.com for compress css and don’t forget to read this article: How to: optimize wordpress blog for maximum speed.

And yes, it’s finished, after a few modifications, your website now working more smoothly with CommentLuv plugin, maybe you will happy with this small trick.

Hi Andy Bailey, I’ve try to comment on this page, everything’s going fine :) with this trick but you always need to redo the “Repair step” when you update configuration of the plugin.
commentluv.js should be included in the head but you can try put it in the bottom of the website, if anything fine let’s use it :).

This seems like a nice trick but major problem with this process is that it will require manual intervention with each update.

I personally prefer to use WP-Super-Cache + Autoptimizer plugins. First creates static pages for quick page load and second combines CSS and javascript for you. Not perfect setup but my tests have proven it speeds up the site a LOT!

Hi Jennifer,
Great tip on speeding up the CommentLuv plugin. It is very easy to weigh a blog down with excess scripts and kill the site speed. A little boost to the speed here and there will start to add up. Thanks for the helpful information!

Nice article guys, but as i have come to your blog through Google, in search of some Firefox plug-in which automatically search for high PR comment Luv blog pages. But as I started reading your article, it becomes more interesting. Thanks for sharing.

Easy to follow and might just help my blop once I get the plugin installed. I have been toying with the idea of using commentluv for a while but after a few days of research it looks like a great addition.

Personally, I prefer to use WP-Super Cache plugin + Autoptimizer. First, create static pages for faster loading of pages and the second combines CSS and JavaScript for you. It is the ideal setup, but my tests showed that speeds up the place a lot!

This is great guide I’m very new to Commentluv and this post has shown me a thing or two that I have not yet seen. I just need to figure out how to configure my rss feed to take advantage of it all. Thanks, Chris

Hello. I wanted to give you a note to verbalize my thankfulness. I have been watching your blog posts for a month and have got a ton of excellent tips and appreciated the way you have built your web site. I’m going to make my blog however I feel it is too general and I need to concentrate more on particular issues.

I have CommentLuv on a lot of my websites and have since Andy came up with the idea. It was around the time that comment exchange communities were thriving. The problem with those communities were that people were only commenting on the sites they were assigned. It became a chore for some and a pain to others when some bloggers did not update as much. The system was quite random.

Hey guys I have been using CommentLuv for a long time and know know what can be done with that Tool. You can leave a comment with this tool and also trackback with better look. But I wanna know more how can I modify the avator of those comment post. Can you please suggest me?

Thanks for such useful information.I have enabled commentluv on my blog 2 days before and started getting comments on my blog within a day only.
Mr.Bhavesh last post: Keep watch on your site backlinks with Backlinkwatch

Comments Love plugin for ther bloggers is so nice thing to have, because it provides traffic when you leave a comment on someone’s blog, but it also adds to the use of SEO, i will try this plugin soon. thanks for sharing the useful information about comment love plugin.

‘s many enthusiastic owners of online shopp hollister france ing is also complaining that the residential property this practice, de hogan outlet priving them of their rights and interests to enjoy the courier service. In this regard, Hanjing Daru family Jindi Property Co. property management department, said they did scarpe on line not take suc

covering up all the way to fo botte ugg pas cher llow ,botte ugg pas cher. Baiyun stop the wind stoppe 2014 ugg magasin site officiel d Wang Li and embarrassed to refuse,2014 ugg magasin site officiel. met Xiao Feng This child is really your good fortune,la presse tn! s la presse tn he said to the North Tian to break off the corn,ugg bailey button.
this Sunday

But we took the room because we didn’t want to hollister outlet online be in the room we hated and knew we wouldn’t ge hogan bambino t any refund based on hogan bambino discussion other guests were having with the middleman in public.

love the mo moncler prezzi therland of the aviation moncler industry, died in the line of duty,moncler prezzi, and your smile shake shake, not because of sadness and customs million. and I just fig burberry pas cher soldes ure. but not without!
to carry out the learning activities to Comrade Luo Yang as an important task, Luo Yang,moncler, we h

I’ve just learned about this plug in and it seems to have tremendous value…. My only concerns are that all comments have people’s names crossed out, as well as their recent blog titles, if they have a blog of their own.