This is the biggest disappointment for me with WordPress. Why can’t the developers pull their heads out of the sand and put a basic comment preview feature in the core code?

ComPreVal, which forces commenters to fix their invalid XHTML before they post, seems close, but I don’t want to add that extra headache to those who aren’t markup-savvy.
The best solution I’ve seen so far (and what I’m using here for now) is this hack by MarteyDoDoo.com.
I think Martey calls his hack “ugly” because it presents the previewed comments in plain form (no theme styling). I fixed that by replacing his plain header and footer markup with the following, respectively:
Header:

<?php// use the header from the template to format the preview page$wp_query->query_vars=array();//necessary to avoid an extract error
get_header();?>

Footer:

<?php//use the template footer for the preview page
get_footer();?>

Hacks are cool, but they’re a pain to remember and upgrade. So what I’m looking to find/create is a plugin for WordPress comment previewing, with the following features:

Is a plugin relatively simple to install, even for novice users, with no more code editing than perhaps a few lines in a theme’s template.

Does not rely on JavaScript (as much as I love JavaScript, what users expect is a server-side preview).

Is robust enough to work across various themes and to show the comments as they will actually appear, e.g. with filters applied.

Has customizable features that can be set under the dashboard Options, such as whether and how to display previous comments or other blog features, etc.

I used character entities for  and , but it looks like they got converted into tag delimiters. ComPreVal doesn’t do that. I looked at the page source and noticed that your comment script inserted ‘nofollow’ twice in the anchor tag:

a rel=’nofollow nofollow’

I haven’t gone live with my blog yet. I’m new to WordPress and I’m still trying out plugins and themes on my local PC and reading online articles to pick up tips. I’m using the WAMP Server for Windows so that I can run Apache/MySQL/PHP as “localhost”:

I figured out the problem. The preview hack keeps the character entities as is, but when they’re put into the value of the textarea, they get rendered as tag delimiters, so when the comment’s finally submitted, they’re no longer character entities.

Anyways, it’s helpful that this problem happened, because I’m working on a previews plugin based on this hack, and now I know to avoid that problem. Thanks.

It’s good that you are working on a comment preview plugin of your own. The criteria you listed in the article are what I was looking for too. At present there doesn’t seem to be much of a choice. I looked at Laughing Lizard’s Comment Preview for WordPress 1.2, but without downloading it I don’t know if it would work with WordPress 1.5, so it’s not quite suitable for novices. ComPreVal is good, but I had to make changes to make it work with the Classic Theme.

2 Trackbacks

[…] If you have any problems with that plugin, be sure to look over the comments on the Filosofo’s site. You solution is probably there. If you enjoyed this post, get free updates via email or RSS. […]

Its just great! There are so many sites, which offer free wordpress themes. And if you are searching for a real unique design, there are thousands of programmers and designers which offer their work. Nice to be part of the great wordpress-community. :-…