Making Ajax Edit Comments Compatible With Other Ajax Plugins
One of the many feature requests I have gotten for Ajax Edit Comments was to allow different Ajax-type plugins to be compatible. It works both ways to make a plugin compatible, so I coded in a hook that would allow other plugin authors to initialize the JavaScript code.
Within this post I will explain the hook, and give two examples of plugins that can be made compatible rather easily.
The Plugin Hook
With version 1.1, Ajax Edit Comments now has a JavaScript hook for other plugin authors to tap into. The JavaScript code to call the plugin is simple:
if (window.AjaxEditComments) {
AjaxEditComments.init();
}
This code should allow the plugin to work with other AJAX-type comment plugins. All you are doing is initializing the plugin.
Ajax Comments
Find in the file “ajax-comments.php” line 97 where it reads:
new Insertion.Bottom(ol, request.responseText);
Add in this code right after that line:
if (window.AjaxEditComments) {
AjaxEditComments.init();
}
Better Comments Manager
The Better Comments Manager (version 1.3) now has its own edit feature, so it isn’t necessary to make Ajax Edit Comments compatible for the time being.
jQuery Ajax Comments
A developmental version of this plugin and a spin-off of jQuery Ajax Comments have been made compatible. Please visit this jQuery Ajax Comments site for more details.
Conclusion
If any of you plugin authors out there have a fix for making your plugin compatible, please leave a comment and I’ll e-mail you and get the code and post it here. Thank you.
Other RA Project Articles

15. Jun, 2007 





Author Info
Sorry, but where is the hook in plugin code?
I don’t see it
Iktomi,
All you need to do is call the init function as described in the first part of the post. The actual ‘init’ function is in the ‘js-includes’ folder in ‘wp-ajax-edit-comments.js.php’.
I made some changes to the original jQueryAJAX Comments so it ALWAYS works. There was just a small bug in the routine to find the proper url of a php file. If you like I could send you my changed Plugin and you could help to make it compatible with your plugin.
I don’t use the plugin itself but used the code in my theme for my comments. I am not experienced enough to get it to work with your plugin either.
Send me a mail and I will send you my chnaged Plugin in return.
kretzschmar,
Sent you an email. Let me know if you got it please.
I already answered. Hope you can help. And AGAIN. You do a fantastic job and it is nice that you answered so quickly because I think there are plenty of users out there who like John Wranas Plugin a lot (like me).
Oopse, I forgot to give the link to the Text Control plugin, which again is incompatible with Ajax Edit Comment: http://dev.wp-plugins.org/wiki/TextControl. My apology for the reiteration: I just want to know if it is ‘possible’ to make these two plugins compatible =?
–Mint-Tree–
Edit: arg…my first comment got flagged as potential spam =(
Hi Ronald, thank you very much for your helpful hooks. I am running into a bit of an issue however. I am using the AJAX comment plugin located here: http://www.smullindesign.com/ (the site seems to be having issues now but maybe it’s just me).
I did locate an ajax-comments.php file but could not find the line that you mentioned anywhere in the file. I tried putting your hook in a couple of places that I thought looked right but apparently they weren’t because every time I uploaded the file I would get error messages.
Thanks again for all your help, hopefully we can figure out a fix for this comment plugin as well as I would really like to use your edit comment plugin.
Thanks
thanks. I searched this issues.
i create a ajax script that brings the data from mysql table, but there is a problem that it disappear onmouseout.
i want a tool which can hold it, and i want a close button to close the ajax result.
PLZ………….help me, but remember i want complete solution,that will work on just a little bit editing.
Interesting and communicative, but would make something more on this topic?
Your web page does not correctly work in safari browser
is it now work with all browser ? Any Update ?