论坛帖子列表页调用帖子摘要教程
来源:互联网 发布:高斯多峰曲线拟合算法 编辑:程序博客网 时间:2024/06/06 00:50
欢迎使用Markdown编辑器写博客
增加到 module/forum/forum_forumdisplay.php line 810
前一句是
//内容摘要 include_once libfile('function/post'); include_once libfile('function/attachment'); $thread['post'] = C::t('forum_post')->fetch_all_by_tid_position($thread['posttableid'],$thread['tid'],1); $thread['post'] = array_shift($thread['post']); $thread['preview'] = messagecutstr($thread['post']['message'], 200); $attachments = C::t('forum_attachment_n')->fetch_all_by_id('tid:'.$thread['post']['tid'], 'pid', $thread['post']['pid']); $attachs = $imgattachs = array(); foreach(C::t('forum_attachment')->fetch_all_by_id('pid', $thread['post']['pid'], 'aid') as $attach) { $attach = array_merge($attach, $attachments[$attach['aid']]); $attach['filenametitle'] = $attach['filename']; $attach['ext'] = fileext($attach['filename']); getattach_row($attach, $attachs, $imgattachs); } $thread['attachments'] = $imgattachs; //内容摘要END
模板调用代码:
$thread[‘preview’]
后一句是
两个之间. 获取主题内容以及附件
阅读全文
0 0
- 论坛帖子列表页调用帖子摘要教程
- DeDecms 调用论坛帖子
- discuz帖子列表页调用帖子作者头像
- 获取CSDN论坛帖子列表
- Discuz!论坛教程之去掉帖子列表页的附件图标的方法
- discuz论坛列表页调用帖子第一张图片。最简单的办法之一
- discuz 帖子列表页调用封面图片
- 如何在网页中调用论坛帖子
- 动易网站首页调用动网论坛最新帖子列表的操作方法
- 爬北邮人论坛帖子
- 收藏论坛帖子
- 学习Discuz! X3.2记录:自定义论坛帖子字段,在门户中显示帖子列表
- discuzX 论坛列表页获取帖子内容页主题的pid
- 帖子
- 帖子
- 网站开发-php开发手机论坛(10)-帖子列表显示
- Discuz!教程之帖子摘要(简介)截取函数messagecutstr()详解
- asp.net中如何调用动网论坛的帖子
- 高性能IO模型浅析
- 一次误删除mysql数据表的历险记
- 理论篇~第五章 事实表设计
- JAVA网络编程
- Flex 布局教程:语法篇
- 论坛帖子列表页调用帖子摘要教程
- Android中Handler的作用和使用方法
- 【angular】项目实践-表格显示
- Web前端开发推荐阅读书籍-精华
- 面试题总结(一)
- Php7的这些新特性你掌握了吗?
- windows搭建python开发环境并操作MySQL
- Flex 布局教程:实例篇
- C语言之指针专题四:指针做函数参数