in an attempt to integrate/bridge a custom-written CMS script of mine with WP, I wanted to allow people to leave comments on the non-WP content I have and for me to have the ability to administer those comments from within WP...
What are the conditions that have to be met for a comment to be left?
Is it enough that a post with the correct ID exists?
would I be able to hack the comment gathering PHP file so that it doesn't require a post to exist? Where would I look for that?
...I forgot to ask: how is "comment_post_ID" is generated?
How does WP assign the value of comment_post_ID? I used to think it was the ID of the post but it isn't, or else every comment to one post would have that number
I know what you're after, just not sure how to do it. What I do know is that the function wp_insert_comment is responsible for inserting the comment and all relevant data into the database. Since no one else has responded yet, I thought I'd at least post the following two articles. They may help.
http://codex.wordpress.org/Function_Reference/wp_insert_comment
http://codex.wordpress.org/Database_Description#Table:_wp_comments
Thanks for the links macmanx, very helpful!
Do you know how the IDs of the comments are generated?
I believe that comments IDs are sequential, starting with 1. The first comment is 1, the second is 2, etc.