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.
Very sweet! I think I'll be trying that out later tonight.
superultra
Member
Posted 5 years ago #
Download link not working for me.
Thanks - looks great though!
superultra
Member
Posted 5 years ago #
Hamoudy
Member
Posted 5 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,
thomasmaas
Member
Posted 5 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.
@thomasmaas: I see the issue...will fix it soon.
Thanks for the heads up and the positive feedback, everyone.
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?
@marky: sure, but that makes the original form a little more complicated.
I will look into that when I get a chance.
Anonymous
Unregistered
Posted 5 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.
The hack is also incompatible with Chinese. Probably caused by htmlentities().
I second Marky's request.
It just turned an apostrophe into a slash and an apostrophe. Any way to turn this off?
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?
another thing: i just noticed it does not show Alex's WP Grins plug in now. :(
codeman38
Member
Posted 5 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.
OtherMichael
Member
Posted 5 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.
Anonymous
Unregistered
Posted 5 years ago #
I'm getting the same thing... is this a plugin or does the code get put somewhere else?
Very nice and simple to implement. Thank you!
AuntiAlias
Member
Posted 4 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?