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)
wow, very good
Hello. I would very much like to use this plugin but I’m having the Safari character encoding problem. I’m sure that PsuedoTechnico’s change is what I’m looking for, but the explanation is vague for us who don’t know javascript. Can anyone explain more step-by-step? Sorry I’m a newbie but how to “change declaration”? And maybe his line 85 is different from others?
>
great idea for a plugin
By the way my favourite bands are Counting Crows and Ben Folds (Five).
Thanks for the plugin
Good work
If you want you can find a partial solution for the Safari/KHTML problem at the end of this post.
This is not a definitive solution: the best way would be to determine browser capabilities sending a test word and verifying the response, not to sniff the browser version; unfortunately now this is out of technical possibilities ;-)
Another problem with this plugin is related to non localized date (name of months and days are always in english).
this is really good work that you’ve done with this…
Thanks! Will test it!
excellent work, i have gone through it and i think it works very well, i like what you have done with this
Stephen
Hi i want to use this ajax comments editor.how can i use this editor in my project.
nice work!
I tried it on my blog, which is in Bulgarian and I noticed that you use
date
instead ofdate_i18n
(on line 79), so my weekday appeared in English, instead of in Bulgarian.Just a test to see if this works with ajax tech.
The site looks great ! Thanks for all your help ( past, present and future !)
great plugin
Really nice Plugin, Thank you!
But there is a problem, if you really have an empty string ('') as “emptyString”-value. When the emptystring is '', the outputElement.style.display is set to ‘none’, so nothing gets displayed – even after you’ve written something in the comment. (the output is there, but all set to display:none)
There is an easy workaround for that, though. Just set the emptystring to ' ' (just a single “space”-character) and it magically works.
But I think there is no need for setting display:none, because the “ajax-comment-preview”-div is empty when you haven’t typed in anything yet. You can check it out on my blog, if you want to.
What do you think?
But of course you get a poem, too:
This one is from my poem generator. It uses poems from poetry.com :-)
and another funny one
Tanto va la gatta al lardo che ci lascia lo zampone!
Hello
Thanks for this great plugin
However, it appears to generate a javascript error on some pages:
doitElement has no properties
src='http://www.darkmatter101.org/site/wp-content/plugins/ajax-comment-preview-js.php?ver=1.11175896914'>
When I turn off the plugin the error disappears.
I notice your of course running it on your site without any errors. Any idea what it might be?
Below is a extract of the source code with plugin running:
thanks
Sorry, I forgot to add, running WP2.13
Thank!
I wonder does this actually work?
Sweet.
thanks….
thank you
great plugin
great job
Excellent job!
thanks.
Interesting, but it would be even better if you could have real-time visualization of the comment rather than having to click on the button
thanks
thanks
nice script
Version 1.2.1 is now available.
New version? I tried a version before, but had problems with safari, lets see what happens now….
But thank you for sharing with us anyway.
Jermaine,
I’m not sure if the Safari bugs have been fixed or not yet
:(
I’m going to move it all to a different JavaScript library (jQuery) soon. When I do that, I’ll make sure all the JS works everywhere.
This doesn’t appear to work with WP 2.2.1 in either IE6, IE7 or FX2 under Vista. Server is a local dev box running Apache 2.2 (XAMPP 1.6.2) on Windows Server 2003.
The path for the JS I’m getting is
<script type='text/javascript' src='http://192.168.16.42/ajax-comment-preview-js.php?ver=1.21182423985'>
I’ve not had a chance to try it in an online environment yet – just thought I’d mention it.
“Most themes’ code has all the comments inside one big , , or tag. You’ll probably need to put your preview markup inside that “parent” tag too. Make sure it has the same class(es) as the tag in your theme’s code.”
Too bad!! :S I don’t use those tags for my comments, I think tha’s my problem with all Ajax comment plugins :(
I have come to the conclusion – and I am sincere about this – when you first decide to be a writer, usually that means “I’m going to be a novelist,” and you assume that 95 per cent of a great novel is your own genius, 5 per cent is the clay that you’re using to demonstrate it. I would turn it around a bit. I would say it’s 65 per cent content and 35 per cent talent, that really makes the difference. –
Tom Wolfe
I’m getting the same error as Luke in comment number 99.
“doitElement has no properties”
Running:
AJAX Comment Preview 1.2.1 on WordPress 2.2.1
Any suggestions would be much appreciated. Thanks.
I would love to change the world, but I don’t know the source code of the world.
very nice work,
thanks man! you’re perfect :)
Looks perfect to me!
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?
Sorry, I take that back, it isn’t working at all. I think it has something to do with my theme, becuase it worked well with another theme…. I’m not sure how to fix it though…
Iggy pop is one of the best band in the world !!
Here’s a random comment then :
Mutemath is by far the BEST and totally original band that I’ve heard in a very long time. They’re like a modern version of The Police mixed with some up to date electronica styles (They’re rock, but the drummer is influenced by DJ Shadow and has a very interesting but brilliant sound.)
So if you’re wanting to listen to something new, creative, original and brilliant, you should give mutemath a look. Their debut album is brilliant, and it comes with a LIVE CD as well. They really are tight live, and I LOVE the ‘jamming sessions’ both on the recording and on the LIVE CD.
I had to have my say since I saw some people posting stuff about music.
Hello
This plugin is very nice, but my blog has an iso-8859-1 charset (my language is portuguese) and then the text is showed with really weird characters. (If you try to write “não” or “à” you will see what I mean.) What I must to do?
Thanks!
how will it be? :P
What a load of shit!
I clicked the preview button and waited for 5 hours before a little black dot appeared on my screen.
This is a test. Please ignore all of the above.