discuz!怎样实现主题列表页显示帖子正文摘要?非预览功能。 discuz 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 不建议在模版文件中执行查询打开后台文件\source\module\forum\forum_forumdisplay.php//搜索foreach($threadlist as $thread) {//在其上面添加foreach($threadlist as $v){ $tids[]=$v['tid'];}$strtids=join(',',$tids);$msginfos=DB::fetch_all("SELECT tid,message FROM %t WHERE tid IN($strtids)",array('forum_post'));if(!function_exists('messagecutstr')){ require_once libfile('function/post');}foreach($msginfos as $v){ $cutmsginfos[$v['tid']]=messagecutstr($v['message'],200);}//在其下面添加$thread['cutmsg']=$cutmsginfos[$thread['tid']];前台用$thread['cutmsg']就可以获取打开模版文件\template\default\forum\forumdisplay_list.htm<!--230行左右,</tbody>上面添加--><tr> <td colspan="6">$thread['cutmsg']</td> </tr>样子如上图所示,样式自己调 Quote: 引用 3 楼 jam00 的回复:不建议在模版文件中执行查询打开后台文件\source\module\forum\forum_forumdisplay.php谢谢你的答案,很耐心很详细。衷心感谢。 求助,如何让网站识别是否是代理访问? php异步下拉框取值 php !== 和 !=有什么区别 用 php 怎么实现 大文件上传 用phpthumb动态生成的图片,如何保存为文件,多谢 php exec运行linux命令不成功问题!求大家帮忙! cakephp 支付宝 接口 怎么做个序列号申领系统啊?我想稍微严密一点,不会让随意搞序列号的 跪求PHP5 oop技术 求起名网藏头诗算法 thinkphp框架做的项目,反应速度太慢了,不是一般的卡
打开后台文件\source\module\forum\forum_forumdisplay.php//搜索foreach($threadlist as $thread) {
//在其上面添加
foreach($threadlist as $v){
$tids[]=$v['tid'];
}
$strtids=join(',',$tids);
$msginfos=DB::fetch_all("SELECT tid,message FROM %t WHERE tid IN($strtids)",array('forum_post'));
if(!function_exists('messagecutstr')){
require_once libfile('function/post');
}
foreach($msginfos as $v){
$cutmsginfos[$v['tid']]=messagecutstr($v['message'],200);
}
//在其下面添加
$thread['cutmsg']=$cutmsginfos[$thread['tid']];前台用$thread['cutmsg']就可以获取
打开模版文件\template\default\forum\forumdisplay_list.htm<!--230行左右,</tbody>上面添加-->
<tr>
<td colspan="6">$thread['cutmsg']</td>
</tr>
样子如上图所示,样式自己调