[wp-hackers] Comment Meta

Mark Jaquith mark.wordpress at txfx.net
Sat Jan 14 04:47:57 GMT 2006


This would obviously be a consideration for WP 2.1 or beyond, but how  
do you all feel about comment meta data?

In the same way that data can be attached to posts with Custom  
Fields, I've wanted to attach meta data to comments.

The data for all a post's comments' meta could be fetched with one  
query, and quite quickly, if the wp_commentmeta table has a "post_ID"  
field as well as a comment_ID field.

I had an idea for a plugin that would require this:

The plugin would allow you to specify an additional field to be  
filled by commenters for a specific post.  For example, on a post  
about WordPress 2.0, you could add in a field for "I am currently  
using WordPress Version ____" and then have a dropdown list of  
options.  The question and the options and the "requirement" switch  
would be stored in the postmeta.  The commenters' answers would be  
stored in comment meta.

This would also work well for my Subscribe to Comments plugin, which  
currently adds another column to wp_comments to store the  
"subscription" status.

It'd add one more query on is_single() and is_page() requests.

Thoughts?
--
Mark Jaquith
http://txfx.net/




More information about the wp-hackers mailing list