「WYSIWYG Editor搭載」
なんて売り文句を見る度に眉をひそめてきた私ですが、いろいろとテストした限り、HTMLPurifierを信用して良さそうなので、最新の d3forum-0.77 でfckxoopsを利用できるようにしてみました。
それもあえてこのサイトで運用してます。(自信の顕れ? 無謀な挑戦? )
HTML allowed FORUM
http://xoops.peak.ne.jp/md/d3forum/index.php?forum_id=12
このフォーラムでのみ、WYSIWYGエディタが有効になっており、HTML許可の投稿が出来ます。そして、HTML許可の場合は、無条件で、HTMLPurifierを通過します。
(当たり前ですが、d3forumでは、フォーラム毎に、それらの設定を細かくコントロールできます。フォーラムオプションでの指定法は記事の最後を参照のこと)
プレビューとかでいろいろ試してみるのも良いかもしれません。
試しに投稿しちゃっても良いですよ。但し、残しておく保証はありません。(fckxoopsの画像も同じ)
default_options:smiley,xcode,number_entity,html
allow_html:1
body_editor:common_fckeditor
@@ -101,27 +101,33 @@
</tr>
<tr valign="top" align="left">
<th class="d3f_head"><label for="message"><{$smarty.const._MD_D3FORUM_TH_BODY}></label></th>
<td class="even">
- <{if $body_wysiwyg}>
- <{$body_wysiwyg}>
- <{else}>
- <input type="checkbox" id="message_bbcode_onoff" onclick="if(this.checked){xoopsGetElementById('message_bbcode_buttons_pre').style.display='block';xoopsGetElementById('message_bbcode_buttons_post').style.display='block'}else{xoopsGetElementById('message_bbcode_buttons_pre').style.display='none';xoopsGetElementById('message_bbcode_buttons_post').style.display='none'};" /><label for="message_bbcode_onoff"><{$smarty.const._MD_D3FORUM_LABEL_INPUTHELPER}></label>
- <br />
- <{xoopsdhtmltarea name="message" cols="60" rows="15" value=$message pre_style="display:none;" post_style="display:none;"}>
- <{/if}>
+ <input type="checkbox" id="message_bbcode_onoff" onclick="if(this.checked){xoopsGetElementById('message_bbcode_buttons_pre').style.display='block';xoopsGetElementById('message_bbcode_buttons_post').style.display='block'}else{xoopsGetElementById('message_bbcode_buttons_pre').style.display='none';xoopsGetElementById('message_bbcode_buttons_post').style.display='none'};" /><label for="message_bbcode_onoff"><{$smarty.const._MD_D3FORUM_LABEL_INPUTHELPER}></label>
+ <br />
+ <{xoopsdhtmltarea name="message" cols="60" rows="15" value=$message pre_style="display:none;" post_style="display:none;"}>
<{if $reference_quote}>
<br />
<input type="button" name="quote" id="quote" onclick="d3forum_quote_message();" value="<{$smarty.const._MD_D3FORUM_BTN_QUOTE}>" />
<{/if}>
</td>
</tr>
<tr valign="top" align="left">
<th class="d3f_head"><{$smarty.const._MD_D3FORUM_OPTIONS}></th>
<td class="even">
<!-- approval -->
- <{if $forum.isadminormod && $mode == "edit" && ! $post.approval}>
+ <{if $forum.isadminormod && ! $approval}>
<input type="checkbox" name="approval" id="approval" value="1" <{$approval_checked}> /><label for="approval"><{$smarty.const._MD_D3FORUM_LABEL_DOAPPROVAL}></label>
<br />
<{/if}>
@@ -215,11 +221,9 @@
function xoopsFormValidate_postform() {
myform = window.document.postform;
if ( myform.subject.value.replace(/^\s+|\s+$/g,"") == "" ) { window.alert("<{$smarty.const._MD_D3FORUM_SUBJECT|string_format:$smarty.const._FORM_ENTER}>"); myform.subject.focus(); return false; }
- <{if ! $body_wysiwyg}>
if ( myform.message.value.replace(/^\s+|\s+$/g,"") == "" ) { window.alert("<{$smarty.const._MD_D3FORUM_ERR_NOMESSAGE}>"); myform.message.focus(); return false; }
- <{/if}>
<{$antispam.js_in_validate_function}>
return true;
}
function d3forum_quote_message() {
top_message => "<h1 class="d3f_title">..."
show_breadcrumbs => 1
default_options => "smiley,xcode,number_entity,html"
allow_html => 1
allow_textimg => 0
allow_sig => 1
allow_sigimg => 0
posts_per_topic => 100
hot_threshold => 10
topics_per_page => 20
use_vote => 1
use_solved => 1
allow_mark => 1
allow_hideuid => 0
viewallbreak => 10
selfeditlimit => 31536000
selfdellimit => 0
css_uri => "{mod_url}/index.php?page=main_css"
images_dir => "images"
body_editor => "common_fckeditor"
anonymous_name => "Guest"
guest_vote_interval => 86400
antispam_groups => Array (1)
0 => ""
antispam_class => "default"
notification_enabled => 0
I guess, even if we don't enable these options in the preferences in d3forum administration, these can be enable if we option them for each forum.
default_options:smiley,xcode,number_entity,html
allow_html:1
body_editor:common_fckeditor
allow_html:1
allow_textimg:0
allow_sig:1
allow_sigimg:0
posts_per_topic:100
hot_threshold:10
topics_per_page:20
use_vote:1
use_solved:1
allow_mark:1
allow_hideuid:0
viewallbreak:10
selfeditlimit:31536000
selfdellimit:0
css_uri:{mod_url}/index.php?page=main_css
images_dir:images
body_editor:common_fckeditor
guest_vote_interval:86400