2005年11月11日 星期五

LifeType預設模板 blueish 的時間出現亂碼解決的方法

pLog 1.01 的三個預設模板裡,只有 blueish 會有此問題。

解決的方法如下:-

編輯 class/locale/locale.class.php

尋找:

$values["%b"] = function_exists('html_entity_decode') ? htmlentities(substr(html_entity_decode($monthStr), 0, 3 )) : substr($monthStr, 0, 3);

由於 %b 是用來顯示月份的縮寫,可是程式寫法不適用於中文。所以把 %b 改為 %B。

改成:

$values["%B"] = function_exists('html_entity_decode') ? htmlentities(substr(html_entity_decode($monthStr), 0, 3 )) : substr($monthStr, 0, 3);

編輯 templates/blueish 目錄內的 post.template、postandcomments.template、searchresults.template、album.template 及 albums.template。

尋找:

{$locale->formatDate($postDate,"%j %b, %Y")}

改為:

{$locale->formatDate($postDate,"%j %B, %Y")}


沒有留言: