WordPress.org

Ready to get started?Download WordPress

Forums

Comment Preview for WordPress 1.2 (20 posts)

  1. Laughinglizard
    Member
    Posted 10 years ago #

    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.

  2. Nick Momrik
    Member
    Posted 10 years ago #

    Very sweet! I think I'll be trying that out later tonight.

  3. superultra
    Member
    Posted 10 years ago #

    Download link not working for me.
    Thanks - looks great though!

  4. superultra
    Member
    Posted 10 years ago #

    It's working now. =)

  5. Hamoudy
    Member
    Posted 10 years ago #

    That's awesome; I've been looking for this hack for so long!
    sweet. I might wait for the WP release so I can add it to it.
    thanks,

  6. thomasmaas
    Member
    Posted 10 years ago #

    very nice indeed.
    only 'bug/suggestion' so far: it allows you to use html tags that are not allowed in the final message like <h1>. These render in the preview so the writer might think it's accepted. You might want to pass the preview though some html sanitizing?
    cheers.

  7. Laughinglizard
    Member
    Posted 10 years ago #

    @thomasmaas: I see the issue...will fix it soon.
    Thanks for the heads up and the positive feedback, everyone.

  8. marky
    Member
    Posted 10 years ago #

    LaughingLizard, thank you! This is just what I was looking for.
    Question: Is it possible to include both a "post" and a "preview" button, so the user can choose if he/she wants to go through the extra preview step?

  9. Laughinglizard
    Member
    Posted 10 years ago #

    @marky: sure, but that makes the original form a little more complicated.
    I will look into that when I get a chance.

  10. Anonymous
    Unregistered
    Posted 10 years ago #

    The original post should show on the preview. Also, if the mandatory fields are empty, it should pit out an error and the post and form, instead of giving out a blank preview.

  11. mikelu
    Member
    Posted 10 years ago #

    The hack is also incompatible with Chinese. Probably caused by htmlentities().

  12. xrlq
    Member
    Posted 10 years ago #

    I second Marky's request.

  13. xrlq
    Member
    Posted 10 years ago #

    It just turned an apostrophe into a slash and an apostrophe. Any way to turn this off?

  14. elmsblog
    Member
    Posted 10 years ago #

    A couple thoughts: I got the same as xrlq: extra slash shows on the preview when I typed an apostrophe, but it displayed fine after hitting 'post'.
    Also, it does not show my background image on the preview page. Is this a CSS problem?

  15. elmsblog
    Member
    Posted 10 years ago #

    another thing: i just noticed it does not show Alex's WP Grins plug in now. :(

  16. codeman38
    Member
    Posted 10 years ago #

    I've done some hacks to improve the 'texturizing' of previewed comments, fix the problems with quotation marks in user names and URLs, and solve at least some of the layout problems, among other things. Here's the updated source code:
    http://zone38.net/blog/wp-comment-review.phps
    Feel free to include the changes in your own distribution, LaughingLizard.

  17. OtherMichael
    Member
    Posted 10 years ago #

    I get only the "Please do not access this page directly"; if I comment that line out, then I get the comment code showing up right below my header, but before any of the content.

  18. Anonymous
    Unregistered
    Posted 10 years ago #

    I'm getting the same thing... is this a plugin or does the code get put somewhere else?

  19. plainsman
    Member
    Posted 9 years ago #

    Very nice and simple to implement. Thank you!

  20. AuntiAlias
    Member
    Posted 9 years ago #

    I've been using this, and just upgraded to WP 1.5. I need to somehow make this work with 1.5 and themes. Do I...

    ...move it to the theme folder along with the other changed items (new comments.php file)?
    ....change the contents of comments.php (was 1.2 wp-comment.php) to properly call the comment-review.php file?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.