- UID
- 680705
- 积分
- 0
- 金币
- 383
- 精华
- 0
- 威望
- 0
- 贡献
- 0
- 阅读权限
- 220
- 注册时间
- 2009-10-2
- 最后登录
- 2026-5-3
- 在线时间
- 0 小时
热心网友
- 金币
- 383
- 阅读权限
- 220
- 精华
- 0
- 威望
- 0
- 贡献
- 0
- 在线时间
- 0 小时
- 注册时间
- 2009-10-2
|
Discuz默认版块规则里是不支持html编辑的,我们把discuz版块规则修改位允许使用 html代码,方便站长加入 内嵌或者广告,修改前,务必做好单个文件的备份!
推荐最安全的方法:
在发帖编辑器里,选择高级模式,
必须选择文本模型
这时候,可以任意添加模式编辑,之后复制到,论坛--本版块规则里面,就完全支持html.
修改source/admincp/admincp_forums.php
查找:
- showsetting('forums_edit_basic_description', 'descriptionnew', htmlspecialchars_decode(html2bbcode($forum['description'])), 'textarea');
替换:
- showsetting('forums_edit_basic_description', 'descriptionnew', str_replace('&', '&', $forum['description']), 'textarea');
查找:
- showsetting('forums_edit_basic_rules', 'rulesnew', htmlspecialchars_decode(html2bbcode($forum['rules'])), 'textarea');
替换:
- showsetting('forums_edit_basic_rules', 'rulesnew', str_replace('&', '&', $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']));
上传覆盖
后台-工具-刷新缓存 界面-风格-更新CSS版块, 规则, 修改, html, 编辑 |
|