久久久久av_欧美日韩一区二区在线_国产精品三区四区_日韩中字在线
Discuz! 官方交流社區
標題:
Discuz x 3.4;版塊規則支持html代碼修改!
[打印本頁]
作者:
allthebest
時間:
2020-6-20 02:26
標題:
Discuz x 3.4;版塊規則支持html代碼修改!
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
作者:
czwhehehe
時間:
2020-6-20 02:37
不錯哦教程,看一下明天
作者:
312196920
時間:
2020-8-23 18:50
試了下,好像不行
作者:
allthebest
時間:
2020-8-23 18:56
312196920 發表于 2020-8-23 09:50
試了下,好像不行
后臺-工具-刷新緩存
界面-風格-更新CSS
若還不行 就是第三方模版問題
作者:
312196920
時間:
2020-8-23 21:00
allthebest 發表于 2020-8-23 18:56
后臺-工具-刷新緩存
界面-風格-更新CSS
謝謝分享
歡迎光臨 Discuz! 官方交流社區 (http://www.9999xn.com/)
Powered by Discuz! W1.0