无限星辰工作室-客户无限互联网动力之源

标题: Discuz! x3.1 板块规则和简介支持Html代码解决方案 [打印本页]

作者: crx349    时间: 2014-4-12 01:29
标题: Discuz! x3.1 板块规则和简介支持Html代码解决方案
打开

source/admincp/admincp_forums.php 文件

查找

  1. showsetting('forums_edit_basic_description', 'descriptionnew', htmlspecialchars_decode(html2bbcode($forum['description'])), 'textarea');
复制代码




替换为

  1. showsetting('forums_edit_basic_description', 'descriptionnew', htmlspecialchars_decode($forum['description']), 'textarea');
复制代码




再查找

  1. showsetting('forums_edit_basic_rules', 'rulesnew', htmlspecialchars_decode(html2bbcode($forum['rules'])), 'textarea');
复制代码




替换为

  1. showsetting('forums_edit_basic_rules', 'rulesnew', htmlspecialchars_decode($forum['rules']), 'textarea');
复制代码




再查找

  1. $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));
复制代码




一共有两处相同的代码
替换为

  1. $descriptionnew = addslashes(dstripslashes($_GET['descriptionnew']));
复制代码




再查找

  1. $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));
复制代码




替换为

  1. $rulesnew = addslashes(dstripslashes($_GET['rulesnew']));
复制代码




修改前请先备份
修改后记得更新缓存

当您要添加 html 语法时
要将有这些" " 符号去掉不然会没有效果



  1. <font color="ff0000">大家好</font>
复制代码



替换为

  1. <font color=ff0000>大家好</font>
复制代码






欢迎光临 无限星辰工作室-客户无限互联网动力之源 (https://www.xmspace.net/) Powered by Discuz! X3.4