- UID
- 1
- 积分
- 9952464
- 金币
- 9951975
- 阅读权限
- 200
- 注册时间
- 2020-5-22
- 在线时间
- 123 小时
管理员
  
- UID
- 1
- 阅读权限
- 200
- 积分
- 9952464
- 威望
- -1
- 金币
- 9951975

 鲜花( 0)  鸡蛋( 0)
|
打开文件:
source/module/forum/forum_forumdisplay.php
找到如下代码
- if($thread['rushreply']) {
- $rushtids[$thread['tid']] = $thread['tid'];
- }
复制代码
在这段代码下面添加如下代码:
- $threada= C::t('forum_attachment')->fetch_all_by_id('tid', $thread['tid'], 'aid');
- $threadaid = reset($threada);
- $threadpic = C::t('forum_attachment_n')->fetch_by_aid_uid($threadaid['tableid'], $threadaid['aid'], $thread['authorid']);
- $thread['pic'] = $threadpic['attachment'];
复制代码
这样就可以在列表页模板中使用
$thread['pic']
$thread['pic']所调用的是“附件”不分格式,也就是说,有可能调用到.rar/.zip之类的附件,并不是专调图片,算是个弊端。
|
|
关于我们