| 本帖最后由 m.king 于 2012-11-7 12:08 编辑 
 问题症状
 后台审核帖子不显示标题,包括前台的审核页面不显示帖子标题。
 
 问题方法
 方法1:【适用于文件未做修改的用户】
 下载覆盖文件:
 
  patch.zip
(10.44 KB, 下载次数: 1735) 
 解压覆盖文件
 source\admincp\moderate\moderate_reply.php
 source\include\modcp\modcp_moderate.php
 
 方法2:【适用于文件已做自定义二次开发的用户】
 
 一 、 打开文件: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);
        }
2、找到代码:复制代码        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);
        }
替换为:复制代码$post['dateline'] = dgmdate($post['dateline']);
3、找到代码:复制代码$post['dateline'] = dgmdate($post['dateline']);
                $post['tsubject'] = $_threads[$post['tid']]['subject'];
替换为:复制代码"<h3><a href="javascript:;" onclick="display_toggle('$post[pid]');">$post[subject]</a> $post_censor_text</h3><p>$post[useip]</p>",
4、 找到代码:复制代码"<h3>$post[tsubject] › <a href="javascript:;" onclick="display_toggle('$post[pid]');">$post[subject]</a> $post_censor_text</h3><p>$post[useip]</p>",
替换为:复制代码$post['subject'] = $post['subject'] ? '<b>'.$post['subject'].'</b>' : '<i>'.$lang['nosubject'].'</i>';
二 、 打开文件:source\include\modcp\modcp_moderate.php复制代码$post['subject'] = $post['subject'] ? '<b>'.$post['subject'].'</b>' : '';
1、找到代码:
 替换为:复制代码$_fids[$_post['fid']] = $post['fid'];
2、找到代码:复制代码$_fids[$post['fid']] = $post['fid'];
                        $_tids[$post['tid']] = $post['tid'];
替换为:复制代码$_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'];
                        }
                }
有问题跟帖说明情况啊!
 
 
 
 |