问题症状
后台审核帖子不显示标题,包括前台的审核页面不显示帖子标题。
问题方法
方法1:【适用于文件已做自定义二次开发的用户】
一 、 打开文件:source\admincp\moderate\moderate_reply.php
1 、找到代码:
- if($postarr) {
- $_fids = array();
- foreach($postarr as $_post) {
- $_fids[$_post['fid']] = $_post['fid'];
- }
- $_forums = C::t('forum_forum')->fetch_all($_fids);
- }
复制代码 替换为:
- if($postarr) {
- $_tids = $_fids = array();
- foreach($postarr as $_post) {
- $_fids[$_post['fid']] = $_post['fid'];
- $_tids[$_post['tid']] = $_post['tid'];
- }
- $_forums = C::t('forum_forum')->fetch_all($_fids);
- $_threads = C::t('forum_thread')->fetch_all($_tids);
- }
复制代码
2、找到代码:- $post['dateline'] = dgmdate($post['dateline']);
复制代码 替换为:
- $post['dateline'] = dgmdate($post['dateline']);
- $post['tsubject'] = $_threads[$post['tid']]['subject'];
复制代码 3、找到代码:- "<h3><a href="javascript:;" onclick="display_toggle('$post[pid]');">$post[subject]</a> $post_censor_text</h3><p>$post[useip]</p>",
复制代码 替换为:- "<h3>$post[tsubject] › <a href="javascript:;" onclick="display_toggle('$post[pid]');">$post[subject]</a> $post_censor_text</h3><p>$post[useip]</p>",
复制代码
二 、 打开文件:source\include\modcp\modcp_moderate.php
1、找到代码:
- $_fids[$_post['fid']] = $post['fid'];
复制代码
替换为:
- $_fids[$post['fid']] = $post['fid'];
- $_tids[$post['tid']] = $post['tid'];
复制代码 2、找到代码:
- $_forums = array();
- if($_fids) {
- $_forums = C::t('forum_forum')->fetch_all($_fids);
- foreach($postlist as &$_post) {
- $_forum = $_forums[$_post['fid']];
- $_arr = array(
- 'forumname' => $_forum['name'],
- 'allowsmilies' => $_forum['allowsmilies'],
- 'allowhtml' => $_forum['allowhtml'],
- 'allowbbcode' => $_forum['allowbbcode'],
- 'allowimgcode' => $_forum['allowimgcode'],
- );
- $_post = array_merge($_post, $_arr);
- }
- }
复制代码
替换为:
- $_threads = $_forums = array();
- if($_fids) {
- $_forums = C::t('forum_forum')->fetch_all($_fids);
- foreach($postlist as &$_post) {
- $_forum = $_forums[$_post['fid']];
- $_arr = array(
- 'forumname' => $_forum['name'],
- 'allowsmilies' => $_forum['allowsmilies'],
- 'allowhtml' => $_forum['allowhtml'],
- 'allowbbcode' => $_forum['allowbbcode'],
- 'allowimgcode' => $_forum['allowimgcode'],
- );
- $_post = array_merge($_post, $_arr);
- }
- }
- if($_tids) {
- var_dump($_tids);
- $_threads = C::t('forum_thread')->fetch_all($_tids);
- foreach($postlist as &$_post) {
- $_post['tsubject'] = $_threads[$_post['tid']]['subject'];
- }
- }
复制代码
然后您看看是否正常显示了。
方法2:【适用于文件未做修改的用户】
下载覆盖文件:
解压覆盖文件
source\admincp\moderate\moderate_reply.php
source\include\modcp\modcp_moderate.php
|
上一篇: Discuz X2.5全站的默认搜索改成搜索文章的教程下一篇: Discuz X2.5首页N格卸载不了,我想把首页N格彻底卸载或删除
|