| 
UID4积分89021节操0 萌点6640 贡献15123 活跃63546 资币23147 最后登录2025-10-25在线时间8083 小时听众62收听2 
 
 
 用户组:管理员 论坛客服,有问题请发邮件,邮箱地址点击注册的时候会显示。 
UID4节操0 资币23147 萌点6640 活跃63546 贡献15123 推广8852 在线时间8083 小时注册时间2002-2-2 | 
 
| 
目前版块简介和版块规则是不支持 html 代码,但是 html 代码具有多样性和美化性,如果能让更多的版块部分支持 html 代码,那么可以起到美化的作用。以下测试DZ版本为3.1,其它版本请自行体验。修改的时候请注意备份!
×
星梦很平凡,希望您能喜欢这里,欢迎联系我们开通注册账号哦~您需要 登录 才可以下载或查看,没有账号?欢迎注册  
 打开文件 source/admincp/admincp_forums.php
 
 {:194:} 查找以下代码
 
 复制代码showsetting('forums_edit_basic_description', 'descriptionnew', htmlspecialchars_decode(html2bbcode($forum['description'])), 'textarea');
修改为
 
 复制代码showsetting('forums_edit_basic_description', 'descriptionnew', htmlspecialchars_decode($forum['description']), 'textarea');
 {:194:} 接着继续查找
 
 复制代码showsetting('forums_edit_basic_rules', 'rulesnew', htmlspecialchars_decode(html2bbcode($forum['rules'])), 'textarea');
修改为
 
 复制代码showsetting('forums_edit_basic_rules', 'rulesnew', htmlspecialchars_decode($forum['rules']), 'textarea');
 {:194:} 然后再继续找(有两处相同的代码,注意都要修改)
 
 复制代码$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']));
 {:194:} 最后再查找
 
 复制代码$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>
 
 修改完毕之后记得更新一下缓存,这样就可以让本来不支持 html 代码的编辑器支持了。再强调一下,修改前一定要记得备份,以免出现什么问题不好还原。
 
 | 
 |