1、PHP控制文件钩子 \application\bbs\controller\Forum.php
//中介交易信息
if (!empty($data['buid'])) {
$b_uid = is_number($data['buid'])?$data['buid']:0;
$otherid = is_number($data['otherid_val'])?$data['otherid_val']:0;
$type = is_number($data['mystatus'])?$data['mystatus']:0;
$price = is_number($data['agency_price'])?$data['agency_price']:0;
if($otherid!=0&&$otherid!=0&&$otherid!=0){
$res = hook('agencysave', array('type' => $type, 'b_uid' => $b_uid, 'otherid' => $otherid, 'fid' => $forum->id, 'price' => $price));
if ($res && isset($res['code'])) {
if ($res['code'] == 0) {
$forum->delete($forum->id);
$this->error($res['msg'], $_SERVER["HTTP_REFERER"], '', 10);
}
}
}
}
2、发布中介帖子钩子 \template\b_default\html\forum_add.html
{:hook('agencyadd')}
3、帖子详情页面钩子\template\b_default\html\index_thread.html
{:hook('agencyshow',array('id'=>$t.id))}
4、帖子标题扩充 template\b_default\html\index_main.html
{:hook('agencytitle',array('id'=>$vo.id))}