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