e107で遊ぼう屋で公開されているv.0.7.5用の日本語化ファイルに追記して、v.0.7.11用にしたものです。
e107.zip (2008/01/07版)
本家英語版のファイルと重複するファイルはないので、初めて導入する場合は、上記のファイルを解凍し、そのままアップロードするだけです。
http://e107.tpot.tk/としてアクセスしても、http://e107.tpot.tk/news.phpと飛ばされてしまうが、そのままhttp://e107.tpot.tk/としてアクセスするための技。.htaccessに次のコードを入れる。
DirectoryIndex news.php
if (!function_exists("parseheader")) { function parseheader($LAYOUT){ global $tp; $tmp = explode("\n", $LAYOUT); for ($c=0; $c < count($tmp); $c++) { if (preg_match("/{.+?}/", $tmp[$c])) { echo $tp -> parseTemplate($tmp[$c]); } else { echo $tmp[$c]; } } } }
を
if (!function_exists("parseheader")) { function parseheader($LAYOUT){ global $tp; $tmp = explode("\n", $LAYOUT); for ($c=0; $c < count($tmp); $c++) { if (preg_match("/{.+?}/", $tmp[$c])) { echo $tp -> parseTemplate($tmp[$c]); } else { echo $tmp[$c]."\n"; } } } }
とし、改行を加える。
サイドバーにフォーラムのコメント一覧とニュースなどのコメント一覧を並べると、書式の違いが気になります。それを統一します。
if($sql2 -> db_Select("user", "user_name", "user_id='".$comment_author_id."' ")) { $row2 = $sql2 -> db_Fetch(); $comment_author_name = ($row2['user_name'] ? $row2['user_name'] : $comment_author_name); }
FAQプラグイン(ver.4.2)で、コメントをつけると、該当するFAQではなく、違うFAQにコメントがついてしまいます。それを修正します。
if (IsSet($_POST['commentsubmit'])) { $tmp = explode(".", e_QUERY); $faq_from = intval($tmp[0]); $action = "cat"; $idx = intval($tmp[2]); $pid = (IsSet($_POST['pid']) ? $_POST['pid'] : 0); $cobj->enter_comment($_POST['author_name'], $_POST['comment'], "faq", $idx, $pid, $_POST['subject']); $e107cache->clear("nq_faqtop_menu"); } // Actions +++++++++++++++++++++++++++++
FAQプラグイン(ver.4.2)で、コメントをつけても、サイドバーのコメント一覧に表示されません。
case '3' : // FAQ if($sql2 -> db_Select("faq", "*", "faq_id='".$row['comment_item_id']."' ")) { $row2 = $sql2 -> db_Fetch(); $ret['comment_type'] = COMLAN_TYPE_3; $ret['comment_title'] = $tp -> toHTML($row2['faq_question'], TRUE,'emotes_off, no_make_clickable'); $ret['comment_url'] = e_BASE."e107_plugins/faq/faq.php?0.cat." .$row2['faq_parent'].".".$row['comment_item_id']; } break;
e107から送信されるメールは、UTF-8で新しいメールソフトでは文字化けしません。ただし、タイトルが途中で欠けてしまします。
/** * Encode a header string to best of Q, B, quoted or none. * @access private * @return string */ function EncodeHeader ($str, $position = 'text') { $x = 0;
if( $position == 'text' ) return mb_encode_mimeheader( mb_convert_encoding( $str , mb_internal_encoding() , 'auto' ),"UTF-8", "B", "\n" );
を挿入する。
記事の中で、'<'や'>'を説明するために'<'と'>'を使っても、再度編集しようと読み込むと'<'や'>'になってしまう。
$_POST['data'] = $tp->toForm($_POST['data']);
$_POST['data'] = str_replace(array("<", ">"), array("&lt;", "&gt;"), $_POST['data']);
を挿入。