AJAX Comment Preview
DOWNLOAD
Get the plugin from the Ajax Comment Preview page in the WordPress.org plugins directory.
COMPATIBILITY
The newest version of this plugin (version 2.1) is compatible with WordPress 2.6 and higher only. Users of WordPress 2.0.x should use the older version 1.0.1 (which is unsupported and probably broken).
INSTALLATION
For more information, see the Ajax Comment Preview FAQ in the WordPress.org plugins directory.
To use this plugin, all files from the zip file you download must be in your wp-content/plugins/
directory. If you choose to place them in a subdirectory, all files must be in the same directory.
Activate the plugin from your WordPress site’s Plugins admin page.
Edit the plugin’s options from your Options -> AJAX Comment Preview admin page in order to specify the formatting of the preview. This will depend on your particular theme. The default format works for WordPress’ default Kubrick theme.
Note: You may need to tweak your theme’s CSS to get the preview to look exactly like a normal comment.
Testing
I get a number of comments on this post testing the system. A little odd, since it seems to me people should be testing the preview functionality (which is new) not the comment posting functionality (which is the same old WordPress standard stuff). Anyway, that’s cool. Go ahead. But please do me a favor; don’t just thow up some lame “testing” comment. Try sending over a poem or maybe something from the Farmer’s Almanac. Tell me your favorite book/artist/music. Don’t suck; try to be creative.
The History
My original post.
2.1
- Fixes an JavaScript issue in Internet Explorer reported by Eric
2.0
- Full gravatar/avatar support
- Moved to jQuery
- WordPress 2.7 support
- Should have fixed any character endcoding issues
- Should now work on pages served as XML
1.2.1:
- Fully internationalized dates
1.2:
- Fixed some JS errors (Mark Jaquith)
- %email_hash% available for gravatars
- Readme file with configuration instructions
- Fix double offset in dates (Mark Jaquith)
Hi,
Trying to use the plugin, but the Preview button is sitting below and to the left of the submit, rather than next to it as it does here on this site.
How can I fix it?
Thanks,
Shane.
;-) :-) :)
Testing this out…
Hi i just installed your plugin succesfully and it is working great. But only one concern. I’m getting a validation error after installation.
Can you please help me out how to troubleshoot this validation bug. Thank you in advance.
I’m recently using AJAX comments version 2.0. Do I need to uninstall this before installing your version?
I really like this because it works best when moderation is off.
Hey, I’ve just replace this plugin with the other “LIve Preview Commment” plugins.
However, I found out that this plugin is NOT compatible with WP-Ajax Edit Comment (http://www.raproject.com/wordpress/wp-ajax-edit-comments/).
Even though I have read the Ajax Edit Comment author’s instruction on how to make jabs and hooks, I still don’t get it to work nicely with your plugin ‘MDA’.
So, do think you could go over there to throw some hooks into this plugin to make it work with Ajax Edit Commment?
Let me know.
Thanks for the great plugin
Finally a comment preview that actually works on WP 2.2.2. Thanks!!
“In every American there is an air of incorrigible innocence, which seems to conceal a diabolical cunning.”
-A. E. Housman
hi
this may or may not be the same bug mentioned in comment #75 (I haven’t gone looking for “emptystring” in the code) but when I removed the text from the “preview text area” option, the plugin stopped displaying the comment, although I didn’t get any errors, and nothing actually broke. So I just put a ” ” in the field. Worked again.
Heh. Now *your* preview button on this page isn’t working for me! (I’m using Firefox 2/Mac OS X)
Everything works pritty well, Thanks!
The only question I have is how to place the preview button? It is on top of the comment text box, it doesn’t make much since to me their. Any ideas how to move?
Just the solution I was looking for :)
Thanks for your hard work… it’s greatly appreciated!
gasmonso
Pudge controls the weather.
Brillaint! I love this, exactly what I’ve been looking for.
ummm
I wish I could get this to work :(
hi everybody,
once i click on preview ,nothing happened ..i put 2 files in plugin directory , i activated ,but no result , need help :(
does this plugin work with wordpress mu?? thx in advance
I have a problem using this on my local server. I’m running an Xampp-installed Apache with php 4 and mysql. It works fine on my external webhost, but I need to run it locally as well. Any ideas?
Hi…
Thanks for this great plugin. I’ve activated it via Plugin in admin area. But unfortunately, the bottom of “Preview” is disfunction. When every i click the “Preview” there’s NO effect. You can see below:
http://aufklarung.org/?p=131#more-131
Another problem is i want to give a background for the Preview bottom same like the background of bottom of the comment submit, so please tell me how to do that?
sorry, i’m wrong typing, the “bottom” word on my post above is “Button” :-).. once again, sorry :-)
Winter water
Blue and chill
Freeze the heart
Let passion kill.
Hi, I got precisely the same error as @30 Michael Cohen, but it only happens on pages (not articles) that have their own templates, so it might just be that my “own” templates have a problem (which is strange, since I run quite a lot of plugins, and none have problems).
So I have no idea what causes it under WP 2.2.2, however, there is a simple fix: in
function send()
, just scroll down until you get the call toget_currentuserinfo();
(in my case, it’s line 46) and add the following code before that line:if (!function_exists('get_currentuserinfo'))
return;
I believe that under some circumstances, WP might for some reason be unable to include the proper include files because they’re not necessary (I’m wildly speculating!) and/or the logged-in user data has been lost in a session. Whatever that might be, in my personal case, the page templates in question all have comments disabled, so getting rid of the call to
get_currentuserinfo()
works for me.hi comment preview worked well until yesterday, i did some modifications and now it dont work anymore, cant find what ‘s wrong , here is the error code :
uncaught exception: Permission refusée (denied) d’appeler (call) la méthode XMLHttpRequest.open
Line 0
thank you
cool! :D
Oh, sorry about that, I just said “test”. A poem, hmm…
I can’t think of any, so I’ll just thank you for your hard work: thanks!
Hi, I use the comments already on the main site, but the preview isn´t working.
Could do you say me, how I can fix the problem?
http://easyflair.de/hoppetosse/
test
perfect plugin!
You might want to release a 1.2.2! I fixed some JavaScript errors I was getting (on pages without comments turned on) by checking for nulls a bit earlier.
function commentPreviewInit() {
doitElement = document.getElementById('acp-preview');
if ( doitElement == null ) return;
acpFormElement = doitElement.parentNode;
while ( 'form' != acpFormElement.tagName.toLowerCase() )
acpFormElement = acpFormElement.parentNode;
inputElement = acpGetFormInput( 'comment' );
if ( inputElement == null ) return;
outputElement = document.getElementById('ajax-comment-preview');
if ( outputElement == null ) return;
authorElement = acpGetFormInput( 'author' );
urlElement = acpGetFormInput( 'url' );
doitElement.onclick = commentPreviewAJAX;
// set the result field to hidden, or to default string
if ( '' == emptyString ) outputElement.style.display = 'none';
else outputElement.innerHTML = emptyString;
}
Three gods A, B, and C are called, in some order, True, False, and Random. True always speaks truly, False always speaks falsely, but whether Random speaks truly or falsely is a completely random matter. Your task is to determine the identities of A, B, and C by asking three yes-no questions; each question must be put to exactly one god. The gods understand English, but will answer all questions in their own language, in which the words for yes and no are ‘da’ and ‘ja’, in some order. You do not know which word means which.
Virker det stadig? Gør det stadig det?
hello, jesus is awesome.
sometimes, over the rainbow.
sometimes,
iuno i just wanna see how it works, niice.. very nice
great plugin! thumbs up!
perfect plugin, thanks
it works like a charm
Hearing U2 at the moment, I just test the “blockquote”-tag:
Just curious how this works and if it works fine, I’ll install…
Works great but I’d like the Preview button to line up similar to your layout. Instead one button ends up directly under the other. How do I go about it? Thanks!
I discovered the problem. I’m using the comments.php from Brian’s Threaded Comments. I was able to move a closing div tag to get the Submit and Preview buttons to turn up on the same line. A bit of CSS should handle the rest.
Sample of comments… looks great.
thanks!
*two-thumbs up*
here is good link for AJAX tutorial.
http://gohil.dharmesh.googlepages.com/ajax.html
I love Ajax, I have a feature like this that I coded into my SMF forum for members to preview signatures and I did another one to get the members most recent blog post every time they login and append it in their signature whenever they post. I’ve just grabbed this plugin and am looking forward to testing it on some of my wordpress installs. I’m always on the lookout for cool plugins because I host WordPress and SMF sites and my clients love any new stuff.
is the plugin installed as i type this?
OMG said the frog
WTF replied the ensemble
Together they wondered while wandering.
Testing
Thanks for the plugin. I installed it with no problems on my blog that I just upgraded to WordPress 2.3.1 (the newest release). So it works on the newest release. Hope this is helpful.
Teste
Toute la vérité, messieurs, je vous la livre
Si j’ai quitté les rangs des plus de deux cents livres,
C’est la faute à Mimi, à Lisette, à Ninon,
Et bien d’autres, j’ai pas la mémoire des noms.
Recomiendo ver la peli [REC] si quieres pasar miedo
A nice wee addition.
Hi dude your plugin is really cool thanks, can you tell me another plugin that when user submit comments then page should not be reloaded but only show submittd comment by ajax ?