Current version
0.99.2 (August 5, 2008) • Download
Description
AJAX enabled commenting based on the jQuery framework. This plugin will hook into the comments form and posts the user comment without reloading the whole page. Many configuration options trough the settings page which can be found at ‘Settings -> AJAX Comments’.
Installation
- Upload the full directory into your wp-content/plugins directory
- Activate it in the Plugin options
- Open the settings page at Settings -> AJAX Comments to set the default options (initial options are set automatic) or further customize the look & feel of the plugin.
- Happy commenting!
Frequently Asked Questions
- I’ve tried everything, the plugin does not work. What should I do?
- Try the plugin with the ‘default’ theme. If it works, your theme is missing one or more of the following tags:
- <ol class=”commentlist”>
- <h3 id=”respond”>
- <form id=”commentform”>
- <textarea id=”comment”>
- pay attention to the id & class names
- I’ve tried to run the plugin with the ‘default’ theme, still no luck. What’s next?
- Do you have other plugins activated? Try to deactivate another plugin, and run the test again. If my plugin works after deactivating a certain plugin, you have just found an incompatability between my plugin and the one you deactivated. Please inform me about this, thanks!
- Tried with the ‘default’ theme and deactivated all other plugins. Still doesn’t work. What now?
- Please post a comment or contact me. Include a link to your website on which my plugin is not working. Please leave my plugin activated. I will have a look at it and inform you about the next steps. Thanks.
Bug reporting
If you find any bugs PLEASE leave a comment with a description so I can fix them!
Modify / Customize
Since I’ve been asked many times on how to modify certain things in this plugin, I’ll give a quick example. Here we change the appearance of the error message :
The error messages are handled in ‘/js/if-ajax-comments.js’ at line 144 - 150 :
144 145 146 147 148 149 150 | if(xError != '') { jQuery('#'+css_commentform).before('<div id="msgError" class="msgError"></div>'); jQuery('#msgError').html(xError).show().fadeOut(300).fadeIn().fadeOut(4000); xError = ''; return false; } |
On line 126 two things happens:
- the script is looking for the ID ‘#commentform’ and
- injects a new DIV (the error message) before the ‘#commentform’.
Say, for example, we want the error message to be shown after the comment form, we change the line into this :
146 | jQuery('#'+css_commentform).after('<div id="msgError" class="msgError"></div>'); |
If we want the error message to be shown on top of ‘LEAVE A REPLY’, we would change the line to :
146 | jQuery('h3#respond').before('<div id="msgError" class="msgError"></div>');'); |
It’s pretty simple and you can do almost anything you want. Just keep in mind : whenever I update the plugin and put a new version to the repository at WordPress, your changes will be overwritten!
More information about jQuery
Contributors, Bug finders & helpers
- Gene » http://www.macnightowl.com/
- Manan » http://beingmanan.com/
- vsy » http://blog.meetsee.ws/
- Adriano » http://philosophyquest.com/
- macwoern » http://espressoblog.de/
- Felix » http://www.search1x.com/
Thanks to all testers & commenters, your feedback is much appreciated!































Power
Wo! i think i will use it =) Tnx!!, I’ll will coment back after tests.
June 21st, 2008 4:07 am
Francisco
Thank you very much for sharing your Plugin!
June 21st, 2008 6:34 am
Toxane
You’re all much welcome, enjoy!
June 21st, 2008 7:56 am
baron
hi. Thanks for plugin
perfect.
Regards
June 21st, 2008 8:35 am
saku
hmm.. I wonder what its like…
June 21st, 2008 10:58 am
Manan
I am using it on my site, but, it shows the loading image, the page only shows the loading image and not the comment. But, if i do a hard refresh the comment is shown!
June 21st, 2008 1:11 pm
Manan
Also is it possible to show the comment form after a user posts his comment. I don’t have a comment editor installed, so there are times when readers need to post a comment immediately after their previous one.
June 21st, 2008 1:23 pm
BlakkJakk
Thankx!
June 21st, 2008 1:27 pm
Toxane
@Manan
Q : ‘the page only shows the loading image’
A : Please check the CSS ID’s & Classes
Q : ‘is it possible to show the comment form after a user posts his comment’
A : Please update the plugin. I have added the option to the settings page.
June 21st, 2008 7:29 pm
Manan
The id is commentform & the ol class is commentlist
June 21st, 2008 8:40 pm
Gene Steinberg
Sorry it won’t work for my particular installation. The 0.93 version doesn’t display in the Settings list in WP 2.5.1. I can access it by clicking the link in the Plugins page.
Worse, when I check a particular progress bar/wheel option, it remains unchecked. When I post a message, it just hangs.
Yes, maybe there’s a conflicting plugin, but I wouldn’t necessarily know where I should start.
Peace,
Gene Steinberg
June 21st, 2008 11:12 pm
Freddy
I got a problem too. After clicking the submit button, it shows the message (generating comment…) but no “loading image”, and the page doesn’t load. I already edited the CSS classes.
June 22nd, 2008 12:09 am
billso
Looks interesting!
June 22nd, 2008 4:41 am
Locksley
doesn’t seem to show ‘thank you’ message.. Stays stuck on ‘adding comment’..
tried on my test blog http://www.locksleynet.com/testa
Would be ace otherwise, I know its in early stages so I’ll be patient
June 22nd, 2008 9:38 am
Toxane
Hello everybody
First, thanks for the feedback. It’s much appreciated!
I have noted all bugs & problems here. I will make further tests with the plugin & fix bugs much as I can.
For those with the ‘message stuck’: does the site load Scriptaculous?
Again, thanks!
June 22nd, 2008 12:29 pm
simon
ok, that seems pretty cool!
June 22nd, 2008 2:59 pm
Gene Steinberg
I never heard of that. Is it a plugin or what?
Peace,
Gene
June 22nd, 2008 3:49 pm
TAEL
@Gene Steinberg : You can see it here : http://wordpress.org/extend/plugins/if-ajax-comments-for-wordpress/
June 22nd, 2008 5:25 pm
Gene Steinberg
But what does that have to do with “Scriptaculous?”
Peace,
Gene
June 23rd, 2008 7:27 am
Franzi
I like it!
June 23rd, 2008 4:59 pm
Toxane
Update:
I confirm that the plugin have problems (not work) when the Scriptaculous framework is loaded.
Right now I’m rewriting the plugin to use jQuery. First tests confirmed that with the plugin runs fine even if other frameworks are loaded.
Give me two days, and I’ll give you the next release…
Thanks!
June 23rd, 2008 5:54 pm
Bruno
Very nice!
June 23rd, 2008 7:13 pm
Matheus Siqueira
Really Nice!
June 23rd, 2008 7:48 pm
Manan
Thanks a lot for taking note. I hope the issues will resolve asap. Thanks for time again. Appreciate it
June 23rd, 2008 9:35 pm
Gene Steinberg
I look forward to trying your new version. It sounds hopeful.
Peace,
Gene
June 23rd, 2008 10:59 pm
Chris
thanks for the plugin i hope to put it to good use.
how about modifying it to use the google ajax libraries ? @
http://code.google.com/apis/ajaxlibs/documentation/index.html#mootools
if the plugins used on a number of sites, it would help load times and take load off of the users sites.
the same can be done with the jquery port.
Thanks again for the plugin.
June 24th, 2008 1:57 am
Toxane
Update:
I have ported the plugin to jQuery, please update…
June 24th, 2008 9:51 pm
Sarsura
great plugin, thank you very much for your work - i will sure install it this week.
have a nice week
sara
June 24th, 2008 10:16 pm
Hero
Howdy!
Thanks for this great plugin!
June 24th, 2008 10:36 pm
Gene Steinberg
Sorry, folks, it just doesn’t work. Preferences take, but it does nothing otherwise.
I tried disabling another comment-related plugin, WP-Ajax Edit Comments, but no change.
I also just installed WP 2.6b1, so maybe that’s at fault?
Peace,
Gene
June 24th, 2008 10:40 pm
Gene Steinberg
In fact, it doesn’t seem to even work here. When I posted the above comment, the page refreshed normally — no evidence of Ajax anywhere.
Peace,
Gene
June 24th, 2008 10:44 pm
Toxane
Again - Update:
There where 2 bugs, a typo and the fact that not all hosting servers have php 5.2 installed which prevented json_encode from working.
I have now updated everything and it should run just fine.
Thanks & enjoy!!!
June 24th, 2008 11:57 pm
Toxane
@Chris
Thanks for the input. I will have a look at it.
June 25th, 2008 12:01 am
Gene Steinberg
Yeah, better, much better
Peace,
Gene
June 25th, 2008 12:10 am
Gene Steinberg
OK, just a minor issue. I also use WP-Ajax Edit Comments, and when a comment is posted, that plugin’s edit fields vanish unless you refresh the page. I suppose you and the author of that plugin should have a pleasant talk and see if you can work nicely together. Other than this minor issue, is is the first Ajax comment plugin that’s ever worked for me, and I’ve tried lots of them.
Peace,
Gene
June 25th, 2008 1:08 am
LOmiG
on a le droit de tester en fran
June 25th, 2008 1:28 am
hey
hello
June 25th, 2008 1:37 am
Toxane
@Gene :
Glad it finally worked for you. I really appreciate comments like ‘it is the first plugin that’s ever worked for me, and I’ve tried lots of them…’!
Regarding the ‘WP-Ajax Edit Comments’ conflict : I’ll download that plugin and have a look at it.
June 25th, 2008 10:22 am
Gene Steinberg
I mentioned to the author of the other plugin about this too.
June 25th, 2008 11:02 am
Manan
Another problem
The comment is published but is not shown. As in it says that the comment has been published, the comment form re-appears, but the comment does not
June 25th, 2008 8:13 pm
Toxane
@Manan
Please give me a link so I can check it out, thanks. (eMail)
June 25th, 2008 8:37 pm
Manan
My name is the link, however, I have sent you a mail too.
June 25th, 2008 9:28 pm
Toxane
@Manan
Your comments template (comments.php) is missing the
id="respond"in the <h3> tag. Replied to your mail as well.June 26th, 2008 7:29 am
vsy
hi, i tried this plugin on my localhost, and i use chinese to write comment, but when i submit the comment, chinese will be wrong text.
like this “%u54C8%u56C9″
will be a wrong text “%u54C8%u56C9″
thx.
June 26th, 2008 6:57 pm
vsy
ok…like my last comment.
you can copy any chinese at chinese wikito test the bug.
June 26th, 2008 6:59 pm
Toxane
Ok, should be fixed (posted with AJAX) :
一 二 三 四 五 六 七 八 九 十
June 27th, 2008 8:44 am
alectro
una prueba
June 27th, 2008 4:02 pm
vsy
Thanks you to take my opinion.
June 27th, 2008 6:06 pm
Looks Great
Looks like it works great
June 28th, 2008 6:14 pm
Manan
I have been using this plugin for a couple of days, initially had some issues, which were promptly rectified and to be honest, I love this plugin. Thanks a ton. Amazing work!
June 30th, 2008 3:28 am
Johan
First of all, great and easy plugin! How ever I would like to move the error massages to be on top of the form (preferable) or below the form. How would I do that?
July 2nd, 2008 4:06 am
Toxane
@Johan
Thanks for your feedback!
I updated the post, it contains now a ‘Modify / Customize’ section. Please have a look at the example. If you have any more questions, feel free to ask them here.
July 2nd, 2008 12:38 pm
underone
@vsy
I had a same chinese word bug
July 2nd, 2008 4:52 pm
Johan
Great with some easy modifications! When I wrote “on top of the form” I actually meant overlaying the form, ie in a with a higher z. is that possible? Also I have a problem with the Swedish chars, a with a dot over it and o with two dots over it. Will that be supported in 0.96?
July 2nd, 2008 7:41 pm
Y
I’ve been looking for a plugin like this for ages, and am thrilled to have found yours. Have installed it, but it doesn’t seem to be working for me like I expected. I tested it on my page and after commenting, the comment appears but the comment is also still in the comment box. Also got someone else to try commenting on my page and he said, “I posted and it didn’t tell me anything. Then I tried to post the
same thing again, and it told me I’d already posted that. “
July 2nd, 2008 8:11 pm
Toxane
@Johan
Yes, release 0.96 (which is available) *should* support Swedish (Unicode) chars (and this also depends on your WordPress installation, see known issues above). Why don’t you try to post something in Swedish here?
To create a overlay DIV is possible. You could also use a Thickbox overlay for that.
July 2nd, 2008 8:27 pm
Toxane
@Y
Just wanted to test the plugin at your site but i don’t see it activated. Please activate it or provide me a link, thanks.
July 2nd, 2008 8:31 pm
Y
Hi. I’ve reactivated the plugin. Can I also add that I have no other plugin activated except for the Akismet 2.1.6, so can’t imagine that there might be a conflict happening somewhere..
Try commenting on any post. eg. http://blog.lemonpi.net/?p=1729
July 2nd, 2008 8:54 pm
Li-An
OK, let’s try this plugin
July 2nd, 2008 8:55 pm
Toxane
@Y
OK, two things:
1. set the path variable as described above in the ‘Notes’. In your case that would be: ‘http://lemonpi.net/blog/wp-content/plugins/if-ajax-comments-for-wordpress/’
2. change the CSS ID ‘respond’ to ‘postcomment’ in the settings page
That should do the trick…
July 2nd, 2008 9:05 pm
Johan
Ok, here is some Swedish chars, I didn’t dare to write them before because then the post became empty
Beware: å, å, ö and maybe an é to finish of with.
July 2nd, 2008 9:06 pm
Toxane
@Y
And I just saw something more. The plugin tries to load its variables from another domain (http://lemonpi.net/blog/) which is not possible due to security restrictions (cross-domain).
There is nothing I can do about this, you should talk with your hoster or better set up your blog in a subdirectory, not a subdomain.
Good Luck!
July 2nd, 2008 9:17 pm
Y
Ah thanks. I’ve just been trying to follow your previous suggestions and was trying to nut out why it still wasn’t working.
July 2nd, 2008 9:28 pm
alectro
ok
July 3rd, 2008 3:00 am
Manan
Hey Pete, I just wanted to clear a small doubt which I guess only you can help me out with. Does using Ajax Commenting suck a lot of bandwidth?
July 3rd, 2008 6:07 pm
Locksley McPherson Jnr
Excellent! Works great now
July 3rd, 2008 7:18 pm
Toxane
@Manan
One of the reasons for me to build this plugin is that it actually SAVES you bandwidth! Loading the plugin (settings < 1 kb), posting (~2 kb) and retrieving (~2 kb, depends how much the commenter writes) a comment is still < 10 kb. Lots of data is being cached anyway, so it's even less.
Now imagine posting and retrieving the whole page every time a visitor posts a comment on your site (your latest post: > 50 kb).
You decide…
July 3rd, 2008 8:38 pm
Manan
@Pete: Thanks for the reply,actually some bloggers told me that they aren’t using Ajax Commenting coz it sucks bandwidth so I thought who better to ask than the creator himself
BUG ALERT: The plugin seems to have some issues with the Subscribe to Comments plugin. Even after un-subscribing here, I do get emails, a few readers on my blog too said that they are receiving mails even though they un-checked the Subscription box before commenting.
July 4th, 2008 2:11 am
Toxane
@Manan
Regarding the subscriptions you cannot unsubscribe just by unchecking the field. If you have previously subscribed to receive a comment thread and wish to unsubscribe, you do that in the subscription manager. When subscribed, instead of the checkbox there is a link at the bottom : ‘You are subscribed to this entry. Manage your subscriptions.’
Click on ‘Manage your subscriptions’, this will bring you to the manager where you can unsubscribe…
HTH
PS: if you don’t see the link then you have obviously deleted the cookies. I this case, you need to tell the webmaster/admin to remove you from the list.
July 4th, 2008 6:44 pm
manan
@Pete: Yeah, I know about that and that’s what I have done multiple times on this topic, but I still get the email and so do my readers. When they reply to a new topic for the first time, they un-check the box (as it remembers the previous state) but they still get the notifications for that topic.
July 4th, 2008 8:28 pm
Toxane
@Manan
Confirm: this was a bug in my plugin. Already uploaded fixed release, please update the plugin & clear the browser cache. Thanks for pointing this out!
July 6th, 2008 3:18 pm
Skeku
Works with wp-cache enabled? Thx!
July 6th, 2008 5:03 pm
Toxane
@Skeku
I have tested it locally with ‘wp-super-cache‘ enabled (default options) and the plugin does work.
HTH
July 7th, 2008 12:55 pm
Li-An
It seems the plugin is not compatible with Markdown extra plugin (http://www.michelf.com/projects/php-markdown/). When I try to use code from Markdown, I’ve got an error.
July 8th, 2008 3:25 am
Li-An
Oh, it works very well here
With WP Ajax edit comments plugin, I have two comments showing before reloading the page.
July 8th, 2008 3:26 am
Toxane
@Li-An
The plugin works well together with Markdown Extra (it’s installed here, you can try it). This plugin currently doesn’t work well together with the ‘WP Ajax edit comments’ plugin, this has been stated in the known issues.
HTH
July 8th, 2008 1:54 pm
Li-An
Thank you for this precision. So I have two options: use this plugin or the WP Ajax edit plugin
July 8th, 2008 2:02 pm
Toxane
@Li-An
For now, yes, that would be the two options. I will make my plugin compatible with WP AJAX Edit Comments in a future release.
HTH
July 8th, 2008 2:27 pm
Li-An
I’m waiting for this release
I like the idea of ajaxed comments.
July 8th, 2008 2:30 pm
Toxane
The plugin is now ‘WP AJAX Edit Comments’ compatible. Please update.
July 8th, 2008 9:54 pm
Gene Steinberg
OK, just a further suggestion.
How about retaining settings between installations rather than having to go into the Settings panel every time there’s an update?
Peace,
Gene
July 9th, 2008 12:18 am
Li-An
I made a test and it works strange. As admin I’ve got two comments showing and as guest I’ve got one comment for each other comments showing before I reload
Don’t know where it could come from. Maybe some other people have the same problem.
July 9th, 2008 12:56 am
Toxane
@Gene
Yes, you are absolutely right. It wont happen again on the next update, promise!
@Li-An
I had a look at your site. The problem comes from the ‘Arthemia’ theme (file comments.php, to be precise). There is a DIV which is not correctly closed and contains the same CSS class definition as the parent UL. Solution : delete the line 32 in the file ‘wp-content-/themes/arthemia/comments.php’
Line 32 looks like this:
HTH
July 9th, 2008 3:17 am
Li-An
Thank you for pointing this. I will take a look on it.
July 9th, 2008 2:56 pm <