Joomler!.net - Decided on Joomla!

デル株式会社

Wiki or Wordpress? No it is JContentPlus.

Home » Blog » 'wrap'
0 votes
Written by:Joomler! 5037 hits Saturday, 09 February 2008 16:36

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を使われることが多いのかな・・・。

 

JContentPlus for Joomla!1.5 powered by Joomler!.net

デル株式会社
joomler.net is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
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.