04.25.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.  
    tami 12.06.2008 @ 17:41

    hi – this isn’t working for me in Firefox.

    works fine in IE and is GREAT!

    but for some reason it doesn’t work at all in Firefox… anyone else have this problem?

    works here on this site in FF but not in our site… what am i doing wrong?

  2.  
    test 12.14.2008 @ 14:48

    test

  3.  
    Jeremy 12.15.2008 @ 11:45

    Great plugin – best one I’ve seen for comment preview. I use it on both of my blogs (personal and professional). However I just saw 2.0 show up on wordpress.org and it doesn’t seem to work. Started investigating but didn’t figure it out yet – I’ll let you know if I have time to figure out why it broke for my blog. I didn’t see a changelog but from the code it looks like you did some major rewriting… (e.g. jQuery) – any known bugs? Anyone else having problems?

  4.  
    Mariano 12.16.2008 @ 18:22

    Works fine in worpress 2.7

    The only question for me is, how can I configure the preview button to get the same appeareance that the “submit comment” one?

    •  
      scribu 01.01.2009 @ 19:06

      You can use the #acp-preview CSS selector.

  5.  
    scribu 01.01.2009 @ 19:08

    Hello! Just installed your plugin and it’s working great.

    Just have one minor problem: Could you add around Says, so it matches the default comment template in WP 2.7?

  6.  
    Eric 01.27.2009 @ 11:33

    Why is there a
    version=”1.0″ encoding=”utf-8″ message in the preview box with IE 7 and ajax preview plugin v2.0 (I’ve just checked out on this site)???

    •  
      MDA 01.29.2009 @ 20:29

      Version 2.1 should fix this. Thanks!

  7.  
    Abel Cheung 02.14.2009 @ 11:52

    Probably I run into some obscure problem(?): typing some specific pattern and the whole comment preview will be gone. To test it, one can type these keys in sequence:

    [e] [c] [h] [o] [space] [a] [;]

    The most important things are “echo” and semicolon. “a” can be replaced by anything. This can be problematic when pasting code snippets in comment.

    •  
      MDA 02.14.2009 @ 18:16

      It’s not a problem with the plugin, it’s a problem with my server.

      My host has mod_security installed on my webserver, which is blocking that request. You’ll note that if you try to post a comment with the same text, you get a 412 Precondition Failed error.

      So the plugin really is returning the same result back to you when you preview the comment as WordPress would after submitting the comment for real.

  8.  
    exer 02.22.2009 @ 14:52

    Thanks for the plugin, it’s working flawlessly!

  9.  
    aa 02.26.2009 @ 02:56

    Thanks for the plugin…

  10.  
    wa7di 02.26.2009 @ 02:57

    Hello,
    Umm… the plugin is amazing! and original. I really liked it, and it worked when I used it.
    However, when I installed the MCEComments plugin, it stopped working. When I click, it doesn’t preview the comment.
    Is there someway to make it compatible with that plugin?

    Thanks a lot!
    SA

  11.  
    docwhat 03.08.2009 @ 09:28

    Suggestions:

    Some conflict or are obsoleted by other suggestions. I’m just trying
    to offer alternatives.

    Use JavaScript to insert the preview button and #ajax-comment-preview. This wil prevent
    it from “not working” if a user doesn’t have JavaScript enabled (or
    something goes wrong).
    Move the preview button into the that contains the submit
    comment button. Either via add_filter() in php or via JS if you use
    the above suggestion.
    Have an option (as the default) to just use the system default for
    the date string instead of specifying it.
    Have an option to use the wp_list_comments() default markup. It
    should probably also be the default. This way a user won’t have to
    update this as things change.
    Maybe a “restore default” button for things?

  12.  
    xx 03.14.2009 @ 20:09

    i饿爱的咆哮

  13.  
    Domus 03.28.2009 @ 07:18

    Хороший плагин! Спасибо большое! Искал нечто подобное более 2-х лет и никак не мог найти…

  14.  
    Mia 04.05.2009 @ 05:10

    thanks

  15.  
    Druzhanja 04.05.2009 @ 13:36

    Прикольный плагин, а он и переводит коментарии??

  16.  
    aldren 04.23.2009 @ 07:53

    thanks for the plugin! ^^

  17.  
    bas 04.29.2009 @ 13:49

    Damn great plugin!
    Thanks a lot!!!!!!!!!!!

  18.  
    Ben 05.02.2009 @ 15:08

    Great Stuff!

  19.  
    caillou 05.16.2009 @ 01:04

    thank so much

  20.  
    Darren 05.25.2009 @ 19:53

    Great plugin

  21.  
    ivan 05.28.2009 @ 20:25

    great plugin!

  22.  
    albert 05.29.2009 @ 13:57

    I am testing your comment pluging right now.

  23.  
    igoy cavalera 05.30.2009 @ 13:30

    good job! i loved! thanks brother

  24.  
    William 05.30.2009 @ 18:45

    I was researching a number of comment plugins when I came across this one. I really like the idea of adding the preview function. Thanks.

    “It is best to do things systematically, since we are only human, and disorder is our worst enemy.” Hesiod (~800 BC)

  25.  
    Pablo Almeida 06.10.2009 @ 18:07

    Nice plugin! Congratulations! ;)

  26.  
    Kevin Paquet 06.12.2009 @ 15:31

    Just leaving a comment to see whether I can also leave comments without refreshing the page.

  27.  
    refe 06.19.2009 @ 13:16

    What’s the best way to change the way the button itself looks? I want to integrate it more fully with the visual style of my site.

    Thanks!

  28.  
    Slob Jones 06.19.2009 @ 17:28

    Good functionality, but almost impossible to style.

    This thing won’t be viable until it incorporates wp_list_comments.

    Further, I don’t see any way to position the Preview button. I want it to the left of my Submit button, but that’s set in the comments form within comments.php.

    I hope you’ll update this plugin!

  29.  
    Josh 07.10.2009 @ 12:12

    Any plans to make this plugin compatible with WordPress 2.8? Love it and would use it frequently!

  30.  
    sandrella 07.19.2009 @ 13:50

    Nice Post !

    Please Visit My Blog:
    mysandrella.com
    New Release hot Entertainment & movie story !!!

    Thank !

  31.  

    OK, here goes on the creativity front as per your instruction….have you heard of Rock Dust? It transpires that finely powdered volcanic rock is a very effective organic fertlizer, duplicating natural processes in boosting your soils mineral base. Remineralising the earth is a sure fire means to capture more carbon, and ultimately averting climate change. I hope this gave you some farming perspective, as per your request.

    On a more serious note – WordPress ROCKS!

  32.  
    Scotty Cline 07.28.2009 @ 07:33

    Can’t wait to get this fully implemented in my site. Thanks.

  33.  
    unfaike 08.01.2009 @ 15:37

    As so xxl club casino .a search .take us .lake tahoe hotel and casino Heh, As so aqueduct race track casino practice casino games whether or no Get info on sirenis cocotal beach resort casino u0026 spa punta cana stanleys casino liverpool take us locations in casino royale the casino brawl comanche red river casino This website about cuban casino chips .

  34.  
    erer 08.17.2009 @ 21:26

    test

  35.  
    hfgh 08.30.2009 @ 14:50

    Now compatible with WP AJAX Edit Comments plugin, which lets you moderate comments posted using AJAX:

  36.  
    Karl Foxley 09.02.2009 @ 16:01

    This is a really cool plugin and I’ve installed it on a couple of my blogs.

    Thanks for sharing,

    Karl

  37.  
    patou 09.13.2009 @ 08:40

    Thanks ! and happy new Year !

  38.  
    Coapscerroste 10.04.2009 @ 01:30

    He who asks is a fool for five minutes, but he who does not ask remains a fool forever.

  39.  
    sadasda 10.12.2009 @ 02:27

    한글도 들어갑니다.

  40.  
    Dave 10.12.2009 @ 09:40

    where can I fine 2.1

  41.  
    aditia.numberone 10.27.2009 @ 23:21

    i have problem with ajax comment preview, my jQuery scrollto is not work if i use this

  42.  
    chudak 10.29.2009 @ 03:27

    Thanks,
    I’m the designer :)

  43.  
    Nokia Themes 10.31.2009 @ 03:08

    Nice preview. This is really looking good and I am using it to one 1 of my blogs

  44.  
    Anders Holm 11.01.2009 @ 03:15

    Yet another reason to update your WP blog to a newer version (2.6+)!

  45.  
    Kim Kirkpatrick 11.04.2009 @ 21:41

    It’s really too much trouble to do this; a true “code” tag is needed, one that would do a truly literal block quote, preserving initial space, special characters without interpretation, etc. But the preview at least makes it possible to fine-tune. Had to construct this in an editor for replacing stuff; had to use use ‍ to disconnect the %’s from %‍content%, etc.

    This is a wonderful plugin; should be in the core.

    class Ajax_Comment_Preview {
      function version() { return '2.0'; }
     
      function init() {
        add_option( 'ajax_comment_preview', array('template' => <<<EOM
        <ul class='commentlist'>
          <li id="comment-preview" class="thread-alt alt depth-1">
            <div id="div-comment-preview">
              <div class="comment-author vcard">
                %‍avatar:32%
                <cite>%‍author%</cite> Says:
              </div>
              <div class="comment-meta commentmetadata">
                <a title="" href="#comment-preview">%‍date%</a>
              </div>
     
            %content‍%
          </div>
        </li>
      </ul>

  46.  
    vibhor 11.30.2009 @ 21:20

    very nice !

  47.  
    vdsvd 12.03.2009 @ 01:54

    ds

  48.  
    asd 12.03.2009 @ 06:21

    Hi thats great

  49.  
    Adam 12.03.2009 @ 14:22

    This looks great

  50.  
    meo 12.04.2009 @ 02:30

    some comment

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