That js-kit.com thing would be great, except that I can’t get it to work with my dynamically generated URLs. Posted on the thread there, and no one has been able to help. ??
Vkaryl, thanks for posting your soln. I’m not sure I completely understand what you did, but I don’t think I want to do exactly the same thing. I want to put add/view comments on *many* non-wp pages on my site — a few thousand photo pages. I think it’s going to require hacking the post/comment ID system.
It looks possible, but I’ll probably break a bunch of stuff along the way. :-/
One problem: Without an associated ID in the wp_posts table, comments won’t be recognized as open so people won’t be able to make them. The best workaround seems to be modifying the check for comment status in wp-comments-post.php so I can tell it to treat comments as open. (I think that’s better than adding dummy posts to the wp_posts table, and I don’t mind not being able to close comments on a post easily.)
Another (smaller) problem: In reading comments out of the DB, I’ll have to come up with an ID system for them that won’t interfere with the association of regular comments with wp_posts. Since it’s a numeric field, the only option I see is to start at the max value for the field and count down, betting that it will never meet my post count. (A good bet.) I can automatically assign that ID when I create each non-WP page.
Final problem: I’ll have to modify the comment_template function, since it looks up the post ID…I think I’ll have to feed it the post ID as a parameter and only let it look up if the parameter is null.
If anyone’s found a different way or has other thoughts, let me know!! Otherwise, I’ll tackle it this weekend, and let you know how it works out. Good thing it’s going to rain…