我已经在火车头入库文件intodb.php加了
$title_keywords = param('title_keywords');
$orig_author = param('orig_author');
$original_url= param('original_url');
这个也加了:
$thread = array('fid' => $fid, 'type' => $type, 'doctype' => $doctype, 'subject' => $subject, 'brief' => $brief, 'keyword' => $keyword, 'description' => $description, 'closed' => $closed, 'flags' => $flags, 'thumbnail' => $thumbnail, 'save_image' => $save_image, 'delete_pic' => $delete_pic, 'message' => $message, 'title_keywords' => $title_keywords, 'orig_author' => $orig_author, 'original_url' => $original_url,);
在well_thread_create函数里面的钩子model__thread_create_thread_after.php加
$title_keywords = array_value($arr, 'title_keywords');
$orig_author = array_value($arr, 'orig_author');
$original_url = array_value($arr, 'original_url');
// 创建主题
unset($thread);
$thread = array('fid' => $fid, 'subject' => $subject, 'type' => $type, 'brief' => $brief, 'uid' => $uid, 'create_date' => $time, 'closed' => $closed, 'keyword' => $keyword, 'description' => $description, 'last_date' => $time, 'userip' => $longip, 'attach_on' => $conf['attach_on'], 'flags' => $flags, 'status' => $status, 'title_keywords' => $title_keywords, 'orig_author' => $orig_author, 'original_url' => $original_url);
如果是其他表增加自定义字段的,则需要修改well_thread__create函数,或者直接在intodb.php重写一个well_thread_create函数估计会更方便实现。