Joomler!.net - Decided on Joomla!

デル株式会社

Wiki or Wordpress? No it is JContentPlus.

Home » Blog » Fireboardのプレビューの文字化けを直そう
Feb
9
2008

Fireboardのプレビューの文字化けを直そう

EMailPrintPDF
0 votes
Written by:Joomler! 3621 hits

Fireboardの投稿時のプレビューの文字化けは、バージョンがあがって初めて投稿したときに知っていたのですが、何か悪い物でもみてしまったかのようにすぐ投稿のボタンを押した覚えがあります。ぉぃ それからは、いつもプレビューしませんでした。<=臭い物にフタ。忙しいし・・・。

さて、今回投稿にあったので見てみました。Javascriptがらみだろうと思っていましたが、やはりそうでした。

Root/components/com_fireboard/template/defaults/js/bojForumCore.js

var content = escape(content);

var content = encodeURIComponent(content);

に変更します。そしてさらに

Root/components/com_fireboard/fireboard.php

$message = urldecode(utf8_decode($msgpreview));
    //$message = str_replace("_@fb@_", "\n", $message);

    $msgbody = smile::smileReplace( $message , 0, _CLEXUSPM_LIVEPATH, $ClexusPMconfig->show_smiles);
    $msgbody = smile::htmlwrap($msgbody, $fbConfig['wrap']);
    header("Content-Type: text/html; charset=utf-8");
    echo utf8_encode($msgbody);

$message = rawurldecode($msgpreview);
    //$message = str_replace("_@fb@_", "\n", $message);

    $msgbody = smile::smileReplace( $message , 0, _CLEXUSPM_LIVEPATH, $ClexusPMconfig->show_smiles);
    $msgbody = smile::htmlwrap($msgbody, $fbConfig['wrap']);
    header("Content-Type: text/html; charset=utf-8");
    echo $msgbody;

に変更します。

以前に他のCMSでも同じようなことがありました。英語圏だとescapeを使われることが多いのかな・・・。

 

ADD A COMMENT

Subject*
:
Color Swatch




Email Link Page Code Text Align Center Text Align Justify Text Align Left Text Align Right Text Bold Text Quote Text Italic Text List Bullets Text List Numbers Text Strikethrough Text Underline World Link
Sun Unhappy Smile Evilgrin Wink Tongue Lightning Surprised Grin Rain Clouds Cloudy Snow Waii
Name*
:
EMail*
:
Website
:

JContentPlus for Joomla!1.5 powered by Joomler!.net

デル株式会社

Related Items

The Joomla!(R) name is used under a limited license from Open Source Matters in the United States and other countries.
joomler.net is not affiliated with or endorsed by Open Source Matters or the Joomla! Project.