[wp-hackers] button patch for comment post section
danny at quasistoic.org
Wed Mar 8 17:23:47 GMT 2006
What exactly happened to this train of thought? Is there any
development going on with user-friendly error handling, or is this a
Just trying not to invent the wheel twice.
On 10/7/05, Austin Matzko <ajmatzko at hotmail.com> wrote:
> >From: Owen Winkler <ringmaster at midnightcircus.com>
> >Add a new function comment_error_message().
> Why not just fire off something like do_action('comment_error','noauthor')
> at the point in wp-comments-post.php where now it dies with an error
> message? The default action could just be what it does now, for backwards
> compatibility, but theme designers and plugin authors could remove that and
> add their own.
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
On 10/7/05, David House <dmhouse at gmail.com> wrote:
> On 07/10/05, Owen Winkler <ringmaster at midnightcircus.com> wrote:
> > Add a new function comment_error_message(). By default, this function
> > echoes a hidden form field, like:
> > <input type="hidden" name="commenterrors" value="1" />
> Or name="show_comment_errors" or something like that.
> > If this field is present when the comment is submitted, then when an
> > error occurs, it reloads the comment page in a way (by passing an
> > additional "commenterr=1" query value?) that causes
> > comment_error_message() to output an error in addition to the hidden field.
> We'd have to pass the error through the query string anyway, so
> comment_error_message() could just do get_query_var('comment_error'),
> echo it if it exists, or output the hidden input if not.
> > Yeah, that's convoluted.
> Not as much as you might think. From a theme designer's point of view,
> all that's required is adding a comment_error_message() function to
> their comment form. The only inelegance comes from the hidden input
> and the forking that would be necessary in wp-comments-post.php to
> check whether the hidden input was there, both of which are required
> for backward compatability.
> -David House, dmhouse at gmail.com, http://xmouse.ithium.net
More information about the wp-hackers