1.1.6 版,但在關於註冊確認的信件,依然會因為收信軟體的關係,而導致有亂碼出現,所以就決定修改一下相關的程式碼。

因為現行的收信軟體多半是採用大五碼(BIG-5),所以對於UTF-8會變成亂碼,因此底下的修改後,必須將該檔存成 BIG-5 的格式。

記錄如下:

在註冊時,其確認信件需修改的相關檔案有二個,分別是位於

class\summary\mail\summarymailer.class.php
確認信件的標題

templates\summary\email_confirm.template
確認信件的內容

在 summarymailer.class.php 中,尋找

$message->setSubject( $locale->tr( "registration_default_subject" ));

將其中 registration_default_subject 改成您要顯示的中文字樣,如:

$message->setSubject( $locale->tr( "LifeType 網誌註冊認證信" ));

而 email_confirm.template,則是

{$locale->pr("register_confirmation_email_text", $activeLink)}

直接改成

你已注冊成功,請點選下面的連結來啟用你的網誌:
 {$activeLink}

而在系統通知信件部分,也是要修改兩部分,分別是

class\dao\articlenotifications.class.php
通知系統的標題

templates\misc\email_notifier.template
自動回覆系統的內容

在通知系統的檔案 articlenotifications.class.php 裡,要修改的是

尋找 notification_subject 將其取代成為 LifeType 通知系統

自動回覆系統的內容 email_notifier.template,則是

This is LifeType's automatic notification system.

There is a new comment/trackback for post "{$post->getTopic()}". You can see
the new comment/trackback by following this url:

{$url->postPermalink($post)}

Have a nice day.

直接取代成為

這是 LifeType 的自動回覆系統

有一封新的迴響/引用,在您所張貼的文章 "{$post->getTopic()}",您可以去看看,從以下的網址進入:

{$url->postPermalink($post)}

祝您有個愉快的一天。

不過這會有個問題,就是當其他字都正常顯示中文時,反而那些從資料庫裡抓取出來的資料,會變成亂碼,目前暫時不知有何更好的替代方式,但總比全部亂碼來得好吧!

忘記密碼時,所要修改的檔案也有二個,但先說明一下,這個動作並沒有出現亂碼,因為中文語系並未修改到這個動作會用到關鍵字,所以是出現英文字。

class\summary\data\summarytools.class.php
重設密碼的信件標題

templates\summary\resetpasswordemail.template
重設密碼的信件內容

在 summarytools.class.php 中,尋找「password_reset_subject」,將其取代成為您要呈現的字樣,例如我是把它改成「重設密碼的要求確認」。

而 resetpasswordemail.template 信件內容,則是

將 you have requested your password to be reset. Please click the
url below to set up a new password for your user:

改成

一封有著重設密碼連結的電子郵件已經送到你的電子郵件信箱,請點選該連結來重設密碼。

將 Please ignore this message if you did not request your password to be reset.

改成

如果您並沒有要求重設密碼,就請您忽略此信息吧!

就這樣先試試囉!

arrow
arrow
    全站熱搜

    jianmin2 發表在 痞客邦 留言(0) 人氣()