天天看點

jive Forums 4中使用中文的方法

修改jiveHome目錄中的jive_startup.xml檔案,增加以下内容:

     <locale>

         <characterEncoding>UTF-8</characterEncoding>

         <country>CN</country>

         <timeZone>Asia/Beijing</timeZone>

         <language>zh</language>

     </locale>

然後按照附件修改SetCharacterEncodingFilter.java檔案,重新編譯後放在WEB-INF/classes目錄中。

步驟1、安裝mySQL的時候必須設定資料庫編碼為UTF8。

步驟2、按附件修改com.jivesoftware.util.SetCharacterEncodingFilter類,編譯好後放回jivebase.jar中替換調原來的SetCharacterEncodingFilter.class檔案,注意路徑。

步驟3、将jiveforums.jar中的jive_forums_i18n_en.properties釋放出來,将裡面的英文資源翻譯成中文并儲存為jive_forums_i18n_zh.ori.properties,再用native2ascii -encoding GBK jive_forums_i18n_zh.ori.properties jive_forums_i18n_zh.properties生成jive_forums_i18n_zh.properties檔案,将該檔案複制至WEB-INF/classes目錄裡。

步驟4、進入jive forums的管理界面,在system-->jive properties裡,增加以下屬性

                  Property Name                 Property Value 

                locale.characterEncoding               UTF-8      

                locale.country                           CN      

                locale.language                          zh      

                locale.timeZone                       Asia/Beijing

在settings-->local settings裡,将字元集設定為UTF-8,并将local和timeZone設定好

步驟5、重新開機jive,

License的破解可反編譯com.jivesoftware.base.License類,修改getExpiresDate函數,讓它傳回一個大時間(例如2999年12月31日),重新編譯,放到WEB-INF/classes下(注意建相應的路徑),重新啟動jive即可。