5/20/2004 ↓

Coment Preview for WordPress 1.2

Author: Mark Ghosh Category: WordPress Hack

Thanks for visiting! If you're new here, you may want to subscribe to our RSS feed. This blog posts regular Wordpress news, updates of themes, plugins, ideas, hacks, quick fixes and everything about blogging, especially about Wordpress. Go ahead, subscribe to our feed! You can also receive updates from this blog via email.

I wrote a very small addition to WordPress 1.2 which lets you have comment previews. The install is very simple and it helps in a couple of ways:

- Lets your commenters know what their final comment is going to look like
- Might prevent comment spammers

Example here: http://proc.homeip.net/testwp

Download here: http://weblogtoolscollection.com/b2-img/wp-comment-preview.zip

Please post bugs/suggestions.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Visitors who read this post, also read:

    Friends

    Translate

    Translate to German Translate to Spanish Translate to French Translate to Italian Translate to Portuguese Translate to Japanese Translate to Korean Translate to Russian Translate to Chinese

    Latest Videos

    37 Comments | Leave a comment | Comments RSS

    1. Very nifty, and easily implemented. Thanks!

      [Reply] Brian (1 comments.) — 05/21/2004 @ 2:54 am
    2. I note the preview isn’t running here… :???:

      Had to add a stripslashes to your preview output as follows:
      ?php echo stripslashes($comment_new); ?

      and in the hidden values, as follows:
      ?php echo stripslashes (htmlentities($comment)); ?

      It keptputting backslashes in things like “don’t” otherwise (and passed them to the post, too).

      [Reply] Kathy K (2 comments.) — 05/24/2004 @ 2:52 pm
    3. :oops: Forgot to say:
      Thank you for writing it. Adding a few stripslashes is nothing to the trouble I’d have had trying to do it myself!

      [Reply] Kathy K (2 comments.) — 05/24/2004 @ 2:55 pm
    4. Fixed :)

      [Reply] Mark (58 comments.) — 05/24/2004 @ 7:54 pm
    5. The above trackback is from me.
      I had some suggestions for this hack:
      1. use htmlspecialchars() so that double-byte characters can be correctly showed up in the preview page.
      2. apply_filters() to $author_new could be $author_new = apply_filters('comment_author', $author); and to $comment_new could be $comment_new = apply_filters('comment_text', $comment_new);

      [Reply] mikelu (1 comments.) — 06/7/2004 @ 8:12 am
    6. Good ideas, maybe in a newer release.

      [Reply] Mark (58 comments.) — 06/7/2004 @ 2:58 pm
    7. I’ve made some of the changes that mikelu suggests above, fixed the problems where slashes weren’t stripped from usernames/URLs, made it so that the comment is ‘texturized’ (smart quotes, etc.) during preview, and fixed a couple of the layout issues. My hack of the source code is available through my name link on this post.

      [Reply] codeman38 (1 comments.) — 06/22/2004 @ 12:57 pm
    8. [...] ichier qui s’occupe des commentaires. Pour en savoir plus, je vous renvoie au billet Coment Pre [...]

      Weblogger.ch » WordPress: preview des commentaires — 06/22/2004 @ 7:06 pm
    9. Is this the latest version as posted here?

      [Reply] Ajay — 06/23/2004 @ 4:10 am
    10. [...] om now has a comment preview feature. It’s a modification of LaughingLizard’s Comment Preview for Wo [...]

      Guess and Check » Preview this — 07/12/2004 @ 11:37 pm
    11. WordPress Comment Hacking
      As you may have noticed, I have made improvements to the “commenting experience” at this blog. The first is the “Recent Comments” section, which can currently be seen on the sidebar at your right. This was simple copy and pasting from the WordPress…

      Xor: The Musings of Martey Dodoo — 07/28/2004 @ 3:17 pm
    12. ZX

      [Reply] xZx — 09/15/2004 @ 8:19 am
    13. The example link no longer works.

      [Reply] Tim (1 comments.) — 10/26/2004 @ 6:38 pm
    14. [...] #8212; nikkiana @ 23:58:29

      In attempt to foil the spammers, I’ve installed comment preview. Sorry to add one more click to your comme [...]

      Every Tomorrow » Comment Preview — 10/29/2004 @ 4:00 am
    15. [...] rt/3/15663 and tried hack-authimage but it didn’t work for me. Using another hack Coment Preview. Let’s see if this helps. texas-holdem [...]

      Sri's weblog » Blog Archive » WP comments spam — 10/31/2004 @ 10:27 pm
    16. [...] ent Tackling Comment Spam. Some solutions are more drastic than others. I elected to use Laughing Lizard’s Comment Preview hack and Chris Davi [...]

      Miss Tra-La-La's Geeky Heaven » Grrrrrrrr….. — 11/7/2004 @ 11:08 am
    17. [...] ent Tackling Comment Spam. Some solutions are more drastic than others. I elected to use Laughing Lizard’s Comment Preview hack and Chris Davi [...]

      Miss Tra-La-La's Geeky Heaven » Grrrrrrrr….. — 11/7/2004 @ 11:10 am
    18. [...] m the increasing amounts of comment spam I’ve been receiving, I’ve implemented this comment previewer. From now on when you leave a comme [...]

      Sacred Journey » Comment previewing — 11/14/2004 @ 6:35 pm
    19. wtehwreth

      [Reply] c fxfhn — 11/15/2004 @ 2:42 pm
    20. Why cant I preview *this* comment?

      [Reply] bull — 11/27/2004 @ 1:30 am
    21. nice tool, i have just one question: i’m having probs to display the german “ae” (ä), “ue” (ü), “oe” (ö). What do i have to change?
      Rob

      [Reply] Robert Basic (1 comments.) — 11/28/2004 @ 3:03 pm
    22. [...] t their “advertisement.”” However, all things considered I think I’ll try the preview plugin (easy) and have a think about this alter [...]

      incorporated subversion » Ultimate WordPress Comment Spam Solutions — 12/3/2004 @ 3:27 am
    23. [...] h automatically adds the email address, URL, and IP address to your Spam Words File. Laughing Lizard’s Comment Preview, just requires the [...]

      Information Technology » Fighting Spam With Wordpress — 12/4/2004 @ 9:28 pm
    24. [...] led under: general blogosphere — adrian @ 10:55 pm

      I’ve installed this hack for Wordpress to do comment preview. Let’s [...]

      adrian is rad » comment preview — 12/15/2004 @ 6:47 am
    25. [...] s hack for Wordpress to do comment preview. Mark Ghosh (LaughingLizard) has writen a small Wordpress plugin that inserts an intermediary step where a [...]

      gisle's blog » — 01/5/2005 @ 7:09 am
    26. qqqqqqqqqqqq

      [Reply] qqqqqqqqqqqqq — 01/15/2005 @ 6:28 am
    27. test comment

      [Reply] test (1 comments.) — 02/1/2005 @ 5:11 am
    28. comment

      [Reply] Nome (1 comments.) — 02/6/2005 @ 2:01 pm
    29. I’m currently using Laughing Lizard’s Three Strikes plug in, and it seems to do a pretty good job, but this Comment Preview plugin might filter out some more.

      [Reply] Steve (1 comments.) — 02/7/2005 @ 11:45 pm
    30. [...] ew Filed under: Change Log — Gunther @ 7:29 pm vl=3 I added a plugin from LaughingLizzard that allows for comment previews. It is m [...]

      coglog.com » Comments Preview — 02/8/2005 @ 11:35 pm
    31. [...] al Blacklist. For WP 1.2.2, I have a lot of plugins and hacks enabled. For one I use the Comment Preview hack for comments which blo [...]

      Ajay - On the Road called Life! » Lots of comment spam and trackback spam — 02/9/2005 @ 10:02 am
    32. Greets! I just upgraded to 1.5, and would like to know how to make wp-comment-preview work in the new setup. Any tips, or is that the end of the line for comment preview?

      Thanks!

      [Reply] Susan Kitchens (1 comments.) — 02/18/2005 @ 2:43 pm
    33. [...] al Blacklist. For WP 1.2.2, I have a lot of plugins and hacks enabled. For one I use the Comment Preview hack for comments which blo [...]

      Ajay - On the Road called Life! » Blog Archive » Comment spam and trackback spam — 03/12/2005 @ 7:48 am
    34. [...] u preview or post on the first page. Instead, WordPress hackers seemed to be split between LaughingLizard’s Comment Preview (which requires that [...]

      This is Martey Dodoo » Blog Archive » WordPress Comment Hacking — 06/3/2005 @ 11:27 pm
    35. I have just one question: i’m having probs to display the german “ae” (ä), “ue” (ü), “oe” (ö). What do i have to change?

      [Reply] pita (1 comments.) — 05/9/2006 @ 2:06 pm
    36. [...] one I use the Comment Preview hack for comments which blocked my comment [...]

      Comment spam and trackback spam » Ajay - On the Road called Life! — 03/11/2007 @ 9:42 am
    37. Is there a way to test this plugin somewhere?

      [Reply] kReEsTaL (1 comments.) — 06/14/2007 @ 2:36 pm

    Leave a comment

    Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

    (required)

    (required, will not be published)


    S2