- 阅读权限
- 255
- 精华
- 2
- 最后登录
- 2012-2-10
- 积分
- 10624
- 帖子
- 8177
- 威望
- 199
- 金币
- 1368 个
- 体力
- 7537
- 激情
- 1888
- 注册时间
- 2005-10-20
    
- UID
- 263098
- 积分
- 10624
- 帖子
- 8177
- 威望
- 199
- 在线时间
- 1464 小时
- 注册时间
- 2005-10-20
|
发表于 2007-10-19 10:40:24
|显示全部楼层
适应版本:Discuz!6.0.0(0904版本)
修正问题:查看帖子的时候出现诸如- php?name=%B5%C8%C0%EB%D7%D3" onclick="tagshow(event)" class="t_tag">
复制代码 的多余内容
修正方法:
1.打开viewthread.php
查找- $postlist[$firstpid]['message'] = preg_replace('#(^|>)([^<]+)(?=<|$)#sUe', "highlight('\\2', \$_DCACHE[tags], '\\1')", $postlist[$firstpid]['message']);
复制代码 改为- $postlist[$firstpid]['message'] = preg_replace('#(^|>)([^<]+)(?=<|$)#sUe', "highlight('\\2', \$_DCACHE[tags], '\\1')", $postlist[$firstpid]['message']);
- $postlist[$firstpid]['message'] = preg_replace('#<highlight>(.*)</highlight>#siUe', "'<span href=\"tag.php?name='.rawurlencode('\\1').'\" onclick=\"tagshow(event)\" class=\"t_tag\">\\1</span>'", $postlist[$firstpid]['message']);
复制代码 2.打开include/discuzcode.func.php
查找- $message = preg_replace('#(^|>)([^<]+)(?=<|$)#sUe', "highlight('\\2', \$highlightarray, '\\1', 0)", $message);
复制代码 改为- $message = preg_replace('#(^|>)([^<]+)(?=<|$)#sUe', "highlight('\\2', \$highlightarray, '\\1', 0)", $message);
- $message = preg_replace('#<highlight>(.*)</highlight>#siU', "<strong><font color=\"#FF0000\">\\1</font></strong>", $message);
复制代码 查找- global $_DCACHE;
- if($_DCACHE['tags'][$key] && @strexists($text, $replaceword)) {
- $text = str_replace($replaceword, '<span href="tag.php?name='.rawurlencode($replaceword).'" onclick="tagshow(event)" class="t_tag">'.$replaceword.'</span>', $text);
- unset($_DCACHE['tags'][$key]);
- }
- } else {
- $text = str_replace($replaceword, '<strong><font color="#FF0000">'.$replaceword.'</font></strong>', $text);
- }
复制代码 改为- global $_DCACHE;
- if($_DCACHE['tags'][$key] && @strexists($text, $replaceword)) {
- $text = str_replace($replaceword, '<highlight>'.$replaceword.'</highlight>', $text);
- unset($_DCACHE['tags'][$key]);
- }
- } else {
- $text = str_replace($replaceword, '<highlight>'.$replaceword.'</highlight>', $text);
- }
复制代码 如若未对文件进行过修改,可以直接下载附件里的程序进行覆盖同名文件即可
[ 本帖最后由 lu5266 于 2007-10-19 10:54 编辑 ] |
-
总评分: 金币 + 1
查看全部评分
|