Discuz! x3.1 板块规则和简介支持Html代码解决方案
打开source/admincp/admincp_forums.php 文件
查找
showsetting('forums_edit_basic_description', 'descriptionnew', htmlspecialchars_decode(html2bbcode($forum['description'])), 'textarea');
替换为
showsetting('forums_edit_basic_description', 'descriptionnew', htmlspecialchars_decode($forum['description']), 'textarea');
再查找
showsetting('forums_edit_basic_rules', 'rulesnew', htmlspecialchars_decode(html2bbcode($forum['rules'])), 'textarea');
替换为
showsetting('forums_edit_basic_rules', 'rulesnew', htmlspecialchars_decode($forum['rules']), 'textarea');
再查找
$descriptionnew = preg_replace('/on(mousewheel|mouseover|click|load|onload|submit|focus|blur)="[^"]*"/i', '', discuzcode($_GET['descriptionnew'], 1, 0, 0, 0, 1, 1, 0, 0, 1));
一共有两处相同的代码
替换为
$descriptionnew = addslashes(dstripslashes($_GET['descriptionnew']));
再查找
$rulesnew = preg_replace('/on(mousewheel|mouseover|click|load|onload|submit|focus|blur)="[^"]*"/i', '', discuzcode($_GET['rulesnew'], 1, 0, 0, 0, 1, 1, 0, 0, 1));
替换为
$rulesnew = addslashes(dstripslashes($_GET['rulesnew']));
修改前请先备份
修改后记得更新缓存
当您要添加 html 语法时
要将有这些" " 符号去掉不然会没有效果
如
<font color="ff0000">大家好</font>
替换为
<font color=ff0000>大家好</font>
页:
[1]