12.22.2024

06.01.2006

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)

336 Comments »

  1.  
    allpower 02.21.2007 @ 17:47

    wow, very good

  2.  
    bird 02.23.2007 @ 21:55

    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?

    >

  3.  
    Tim Reader 02.27.2007 @ 09:38

    great idea for a plugin
    By the way my favourite bands are Counting Crows and Ben Folds (Five).

  4.  
    Anonymous 03.02.2007 @ 06:20

    Thanks for the plugin

  5.  
    Leevi Graham 03.06.2007 @ 05:02

    Good work

  6.  
    PseudoTecnico 03.07.2007 @ 03:57

    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).

  7.  
    Ryan 03.07.2007 @ 20:58

    this is really good work that you’ve done with this…

  8.  
    Matt 03.18.2007 @ 14:28

    Thanks! Will test it!

  9.  
    Stephen Bray 03.25.2007 @ 06:08

    excellent work, i have gone through it and i think it works very well, i like what you have done with this

    Stephen

  10.  
    Sanjeev 03.29.2007 @ 02:49

    Hi i want to use this ajax comments editor.how can i use this editor in my project.

  11.  
    adi 04.01.2007 @ 00:51

    nice work!

  12.  
    Nikolay Bachiyski 04.01.2007 @ 05:21

    I tried it on my blog, which is in Bulgarian and I noticed that you use date instead of date_i18n (on line 79), so my weekday appeared in English, instead of in Bulgarian.

  13.  
    Dirk 04.01.2007 @ 12:18

    Just a test to see if this works with ajax tech.

  14.  
    morganusvitus 04.04.2007 @ 07:09

    The site looks great ! Thanks for all your help ( past, present and future !)

  15.  
    sevban 04.06.2007 @ 03:53

    great plugin

  16.  
    Eugê 04.06.2007 @ 19:36

    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?

  17.  
    Eugê 04.06.2007 @ 20:02

    But of course you get a poem, too:
    This one is from my poem generator. It uses poems from poetry.com :-)

    shrubs my white
    plant bubbling
    the again alarms into hands flare so
    shrubs bubbling a
    loss ice chalky six

    and another funny one

    the
    in petrol took a mother
    minutes brought years eaten been in
    the glances from
    where beyond to precise and and the

  18.  
    giggino 04.09.2007 @ 08:17

    Tanto va la gatta al lardo che ci lascia lo zampone!

  19.  
    snowcrash 04.12.2007 @ 15:10

    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

  20.  
    snowcrash 04.12.2007 @ 15:10

    Sorry, I forgot to add, running WP2.13

  21.  
    burçlar 04.12.2007 @ 15:58

    Thank!

  22.  
    Darran 04.26.2007 @ 08:15

    I wonder does this actually work?

  23.  
    Bradjward 04.27.2007 @ 09:15

    Sweet.

  24.  
    izle 04.28.2007 @ 17:06

    thanks….

  25.  
    lazer epilasyon 05.02.2007 @ 17:10

    thank you

  26.  
    gazete 05.02.2007 @ 17:10

    great plugin

  27.  
    Cindy 05.04.2007 @ 04:25

    great job

  28.  
    Mihai Bocsaru 05.05.2007 @ 02:46

    Excellent job!

  29.  
    oythun 05.05.2007 @ 07:16

    thanks.

  30.  
    Astorg 05.05.2007 @ 14:18

    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

  31.  
    andrew 05.10.2007 @ 00:02

    thanks

  32.  
    NDLoc 05.12.2007 @ 00:08

    thanks

  33.  
    abhishek 05.20.2007 @ 23:48

    nice script

  34.  
    MDA 06.18.2007 @ 13:49

    Version 1.2.1 is now available.

  35.  
    Jermaine 06.18.2007 @ 16:26

    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.

  36.  
    MDA 06.18.2007 @ 17:14

    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.

  37.  
    Luke Scammell 06.21.2007 @ 04:14

    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.

  38.  
    Ekus 06.28.2007 @ 15:42

    “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 :(

  39.  
    jay-boy 07.01.2007 @ 08:49

    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

  40.  
    Nicole 07.03.2007 @ 13:11

    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.

  41.  
    Alex 07.03.2007 @ 14:17

    I would love to change the world, but I don’t know the source code of the world.

  42.  
    gazete, gazeteler 07.04.2007 @ 12:09

    very nice work,
    thanks man! you’re perfect :)

  43.  
    Hans 07.05.2007 @ 15:01

    Looks perfect to me!

  44.  
    Jason 07.09.2007 @ 10:23

    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?

  45.  
    Jason 07.09.2007 @ 10:51

    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…

  46.  
    Zizi 07.13.2007 @ 10:05

    Iggy pop is one of the best band in the world !!

  47.  
    Music 07.16.2007 @ 09:00

    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.

  48.  
    yuri santos 07.20.2007 @ 07:52

    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!

  49.  
    Anonymous 07.20.2007 @ 14:02

    how will it be? :P

  50.  
    Dufus 07.21.2007 @ 19:59

    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.

Leave a Reply

Comment Moderation is on; comments with spammy words or a few links might be delayed. Don't worry, they'll get posted soon. If you think something has gone terribly wrong, contact me.

Line and paragraph breaks are inserted automatically and e-mail addresses are never displayed. You may use the following HTML tags in your comments.

<a abbr acronym b blockquote cite code del em i q s strike strong>

© mdawaffe (Michael D Adams) - Powered by WordPress - Full Credits