由於本人精力有限,mod的製作中遇到了關鍵性的兩個難題,希望有能力的朋友能加以修正。
好了,不多說了,著重介紹我的mod方法。 本mod引用fckeditor編輯器,請先在 http://sourceforge.net/project/download ... _2.6.4.zip 下載FCKeditor_2.6.4.zip,解壓縮後將fckeditor資料夾放入當前風格的template資料夾中。
1、打開template/posting_buttons.html 文件查找
代碼: 選擇全部
<script type="text/javascript" src="{T_TEMPLATE_PATH}/editor.js"></script>代碼: 選擇全部
<script type="text/javascript" src="{T_TEMPLATE_PATH}/fckeditor/fckeditor.js"></script>代碼: 選擇全部
<div id="message-box">代碼: 選擇全部
<script type="text/javascript">
window.onload = function()
{
var oFCKeditor = new FCKeditor( 'message' ) ;
oFCKeditor.BasePath = "{T_TEMPLATE_PATH}/fckeditor/" ;
oFCKeditor.ReplaceTextarea() ;
}
</script>
代碼: 選擇全部
//
$postrow = array(
'POST_AUTHOR_FULL' => get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
'POST_AUTHOR_COLOUR' => get_username_string('colour', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
'POST_AUTHOR' => get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
'U_POST_AUTHOR' => get_username_string('profile', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
代碼: 選擇全部
$DDD = array('<','>','"',' ','&');
$replaced = array('<','>','"','','&');
$message = str_replace($DDD,$replaced,$message);
1、因為fckeditor發送的是html源碼,因此預覽不能實現html解析,但因本人已將viewtopic.php 做了mod,發帖後流覽沒有發現問題;
2、系統的bbcode及附件如何正確和fckeditor相接。
解決這兩個問題後,phpbb3 就可以完美實現視覺化編輯。我也希望能和朋友相探討,請發站內信或郵件 mtme@ymail.com

