1、嵌套回覆php
我參考的 數據庫
http://www.liudon.org/?p=1079也是在 forum_post 創建的 兩個字段,因爲涉及到程序的 修改,因此,纔有了下面的 東西
數組
2、快速回復 流程
以這個 url爲例子: http://127.0.0.1/bbs/forum.php?
mod=post&action=reply&fid=53&tid=1171&repquote=2502&extra=page%3D1&page=1
提交回復後
post
第一步 最早訪問的是 forum.php ui
最後一句 require DISCUZ_ROOT.'./source/module/forum/forum_'.$mod.'.php'; 根據 url 得知 ,這裏的$mod = post
因此 其實是 require DISCUZ_ROOT.'./source/module/forum/forum_post.php';
第二步
this
根據url 中的 action=reply , 在source/module/forum/forum_post.php中 342行左右url
elseif($_GET['action'] == 'reply') {
$navtitle .= ' - '.$thread['subject'].' - '.$_G['forum']['name'];
require_once libfile('post/newreply', 'include');
}
根據require_once libfile('post/newreply', 'include'); 知道這是 引入 source/include/post/post_newreply.php
第三步 在source/include/post/post_newreply.php中
$params 這個數組中存有一些信息,進一步 處理是在 $return = $modpost->newreply($params); 419行左右
第四步 source/class/model/model_post.php 方法newreply()
get
大約120行左右,$this->pid= insertpost(array()); 的做用就是 將回覆信息的數據存入數據庫 forum_post 表中 it
知道了 這個流程, 我是在第四步中的 $this->pid= insertpost(array()); 中 添加本身的字段賦值
io