| 1 |
README (comment.module)
|
| 2 |
-----------------------
|
| 3 |
|
| 4 |
-- Overview
|
| 5 |
|
| 6 |
In order to import all the necessary data from Movable Type to Drupal, it's necessary to make some changes to comments.module. The module didn't have a clean means of validating and saving new or edited comments to the database. My work tries to address those needs by creating a new function, comment_validate, to handle validation of all comment fields before calling comment_save to save the comment to the database. Much of the needed functionality was already in comment_post.
|
| 7 |
|
| 8 |
-- Status
|
| 9 |
|
| 10 |
This is a work-in-progress and has not been tested. Do not even think about using these changes on a production site.
|
| 11 |
|
| 12 |
-- Notes
|
| 13 |
|
| 14 |
Items in comments database:
|
| 15 |
|
| 16 |
cid = comment id, unique identifier for comments (set by comment_save)
|
| 17 |
pid = Parent ID, ie cid of the comment which is the parent of the current one (used in threading) (0 = no parent) (set by comment_save)
|
| 18 |
nid = node id, the node the comment is posted to
|
| 19 |
uid = user id of commentor (0 = anonymous comment)
|
| 20 |
subject = subject of comment
|
| 21 |
comment = comment body
|
| 22 |
hostname = IP of commentor
|
| 23 |
timestamp = timestamp of comment (Unix format)
|
| 24 |
score = moderation score of comment
|
| 25 |
status = publication status of comment (http://drupal.org/book/view/4739)
|
| 26 |
thread = thread depth (set by comment_save)
|
| 27 |
users = no idea (set by comment_save) |