Re: button patch for comment post section

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: button patch for comment post section

Danny Dawson-2
What exactly happened to this train of thought? Is there any
development going on with user-friendly error handling, or is this a
back-burner idea?

Just trying not to invent the wheel twice.

Thanks,
-Danny

On 10/7/05, Austin Matzko <[hidden email]> wrote:

> >From: Owen Winkler <[hidden email]>
> >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
> [hidden email]
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


On 10/7/05, David House <[hidden email]> wrote:

> On 07/10/05, Owen Winkler <[hidden email]> 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, [hidden email], http://xmouse.ithium.net

--
Danny Dawson
http://quasistoic.org
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: button patch for comment post section

Austin Matzko
On 3/8/06, Danny Dawson <[hidden email]> wrote:

> What exactly happened to this train of thought? Is there any
> development going on with user-friendly error handling, or is this a
> back-burner idea?
>
> Just trying not to invent the wheel twice.
>
> Thanks,
> -Danny
>
> On 10/7/05, Austin Matzko <[hidden email]> wrote:
> > >From: Owen Winkler <[hidden email]>
> > >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.

I submitted this ticket, which apparently was queued for commit for "2.1."
http://trac.wordpress.org/ticket/1786

I'd be interested in replacing "die" calls through WP with similar hooks.
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers