Discuz x 3.4;版块规则支持html代码修改!
Discuz默认版块规则里是不支持html编辑的,我们把discuz版块规则修改位允许使用 html代码,方便站长加入 内嵌或者广告,修改前,务必做好单个文件的备份!<br /><br /><strong>推荐最安全的方法:</strong><br /><br />在发帖编辑器里,选择高级模式,<br /><br />必须选择文本模型<br /><br /><br />这时候,可以任意添加模式编辑,之后复制到,论坛--本版块规则里面,就完全支持html.<br /><br />修改source/admincp/admincp_forums.php<br /><br />查找:<br /><br /><ol><li>showsetting('forums_edit_basic_description', 'descriptionnew', htmlspecialchars_decode(html2bbcode($forum['description'])), 'textarea');</ol><br /><br />替换:<br /><br /><ol><li>showsetting('forums_edit_basic_description', 'descriptionnew', str_replace('&', '&', $forum['description']), 'textarea');</ol><br /><br />查找:<br /><br /><ol><li>showsetting('forums_edit_basic_rules', 'rulesnew', htmlspecialchars_decode(html2bbcode($forum['rules'])), 'textarea');</ol><br /><br />替换:<br /><br /><ol><li>showsetting('forums_edit_basic_rules', 'rulesnew', str_replace('&', '&', $forum['rules']), 'textarea');</ol><br /><br />查找 (这里有两个地方都要改)<br /><br /><ol><li>$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));</ol><br /><br />替换:<br /><br /><ol><li>$descriptionnew = addslashes(dstripslashes($_GET['descriptionnew']));</ol><br /><br />查找:<br /><br /><ol><li>$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));</ol><br /><br />替换:<br /><br /><ol><li>$rulesnew = addslashes(dstripslashes($_GET['rulesnew']));</ol><br /><br /><strong>上传覆盖</strong><br /><br />后台-工具-刷新缓存<br />界面-风格-更新CSS版块<em>, </em>规则<em>, </em>修改<em>, </em>html<em>, </em>编辑 不错哦教程,看一下明天 试了下,好像不行 <br />后台-工具-刷新缓存<br /> 界面-风格-更新CSS<br /><br />若还不行 就是第三方模版问题 <br />谢谢分享
頁:
[1]