首先在舊系統以管理者登入,強制重設所有使用者的佈景主題為預設值,在模組中升級SMF直到1.1.9版,最後用mysqldump將資料庫整個倒出來,記得修改編碼為UTF-8
重新安裝SMF於新的目錄,清空新建立的資料庫並將舊的資料匯入,將舊有attachments目錄複製到新的目錄,登入管理介面測試
已知問題
1.使用中文化出現"Sorry, the copyright must be in the template.",因為中文化未更新copyright導致的,修改languages底下的index.chinese-traditional-utf8.php檔案,將forum_copyright這個翻譯改為
$forum_copyright = '<a href="http://www.simplemachines.org/" title="Simple Machines Forum" target="_blank">Powered by ' . $forum_version . '</a> | <a href="http://www.simplemachines.org/about/copyright.php" title="Free Forum Software" target="_blank">SMF © 2006-2009, Simple Machines LLC</a>';
2.中文在斷字的時候被切掉變成問號(?),因為PHP無法正確判斷中文字的問題須改用mb_string系列的函數,修改Sources目錄底下的Load.php檔案,將$func = array的substr與strlen這兩個索引內容中的return片斷改為
if(function_exists(\'mb_substr\')){
return $length === null ? mb_substr($string,$start,mb_strlen($string,\'UTF-8\'),\'UTF-8\') : mb_substr($string,$start,$length,\'UTF-8\');
}else{
return $length === null ? implode(\'\', array_slice($ent_arr, $start)) : implode(\'\', array_slice($ent_arr, $start, $length));
}
if(function_exists(\'mb_strlen\')){
return mb_strlen($string,\'UTF-8\');
}else{
return strlen(preg_replace(\'~' . $ent_list . ($utf8 ? '|.~u' : '~') . '\', \'_\', ' . implode('$string', $ent_check) . '));
}
3.中文字看起來太小,因為字體是定義成9pt,可修改Themes目錄中的style.css,在.smalltext區段之後加上
.tborder .bordercolor .windowbg2 b a{
font-size: 1.3em;
}
#upshrinkHeaderIC .windowbg2 b a{
font-size: 1em;
}
#upshrinkHeader2 .titlebg2 span{
font-size: 1.5em
}
.windowbg .smalltext,.windowbg2 .smalltext,.windowbg3 .smalltext{
font-size: 1em;
}
沒有留言:
張貼留言