搞了整个下午,终于完美了。另外,在修改 
 
2. include/cache.func.php 查找 
 
case 'settings': 
                        $data['qihoo_links'] = array(); 
                        while($setting = $db->fetch_array($query)) 
 
 
上面加 
 
//首页四格TOPLIST_CACHE版, By oytktk 代码首 
. 
. 
. 
                case 'topdigest': 
                        $colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray'); 
                        while($topthread = $db->fetch_array($query)) { 
                                $threadcolor = sprintf('%02d', $topthread['highlight']); 
                                $digest = array('1'=>'[Ⅰ]','2'=>'[Ⅱ]','3'=>'[Ⅲ]'); 
                                $topthread['subjectc'] = $digest[$topthread['digest']]."-".cutstr($topthread['subject'], 23); 
                                $topthread['author'] = $topthread['author'] ? $topthread['author'] : '游客'; 
                                $topthread['threadcolor'] = $threadcolor[1] ? " style=\"color: ".$colorarray[$threadcolor[1]]."\"" : NULL; 
                                $topthread['dateline'] = gmdate("Y-m-d H:i", $topthread['dateline'] + $timeoffset * 3600); 
                                $topthread['lastpost'] = gmdate("Y-m-d H:i", $topthread['lastpost'] + $timeoffset * 3600); 
                                $topthread['name'] =  AddSlashes(strip_tags(trim($topthread['name']))); 
                                $data[] = $topthread; 
                        } 
                        break; 
 
 
其中 
$topthread['subjectc'] = $digest[$topthread['digest']]."-".cutstr($topthread['subject'], 23); 
 
的 
$digest[$topthread['digest']]  
 
会显示乱码,试了几个方案都不成功,干脆把它去掉。。。 
 
 
另外,给失败的朋友一点提示: 
 
1。我的经验: 
 
第8步: templates\default\discuz.htm 
 
查找 
<!--{if !empty($newpmexists)}--> 
<div style="clear: both; margin-top: 5px"> 
{template pmprompt} 
</div> 
<!--{/if}--> 
 
 
下面加 
<div style="clear: both; margin-top: 5px;"> 
<div class="spaceborder" style="width: 98%"> 
        {template toplist} 
        </div></div> 
 
 
本人却错加在 
<!--{if !empty($newpmexists)}-->  
的下面。 
 
 
2。有乱码的朋友,你的应该是和本人一样是 DISCUZ 5.0 UTF 版吧? 
把全部的中文字易到 templates/default/templates_lang.php 
 
例如: 
 
1. 在 templates_lang.php 适合地方(大约234行)加入 
 
        'forum_latest_post' => '最新发表主题', 
        'forum_latest_reply' => '最新回复主题', 
        'forum_random_digest' => '随机精华主题', 
        'forum_top_reply' => '回复最多主题', 
        'forum_view_latest' => '查看最后回复内容', 
        'forum_latest_update' => '最后更新', 
        'forum_digest_level' => '精华级别', 
 
大约507行 
        'forum_name' => '论坛', 
下面加 
        'forum_section' => '版块', 
 
 
然后把 TOPLIST.HTM 里面的 
"最新发表主题" 改成 {lang forum_latest_post} 
"最新回复主题"改成 {lang forum_latest_reply} 
"随机精华主题"改成 {lang forum_random_digest} 
"回复最多主题"改成 {lang forum_top_reply} 
"查看最后回复内容"改成 {lang forum_view_latest} 
 
"版块"改成 {lang forum_section} 
 
 
其它的依个人需要而做出同样的添加、修改。 
 
 
其中原本的语言有: 
 
欢迎光临:{lang welcometo} 
by:{lang forum_lastpost_by}  //可改自行修改成作者、发贴者 
回复:{lang reply} 
浏览:{lang order_views} |