[官方認證MOD] Prime Notify PM
發表於 : 2008-03-06 , 15:46
Modification name: Prime Notify PM
Author: primehalo
Modification description: This MOD will insert the message body of a private message into the private message notification e-mail (and will insert the private message subject line into the subject line of the e-mail).
Modification version: 1.0.0a
Tested on phpBB version: See below
原網址:http://www.phpbb.com/community/viewtopi ... 9&t=645065
下載檔案Download file: Prime Notify PM.zip
File size: 29475 Bytes
Files to Edit檔案編輯
includes/functions_privmsgs.php
Included Files
root/language/en/email/prime_notify_privmsg.txt
Copy拷貝: root/language/en/email/prime_notify_privmsg.txt
To到: language/en/email/prime_notify_privmsg.txt
Open: includes/functions_privmsgs.php
Find 發現
Add after 之後加上
Find發現
Add after 之後加上
Find 發現
Add after 之後加上
--------------------------------------------------------------------------------
Save all files. End of MOD. 儲存(記得備份)
中文化
prime_notify_privmsg.txt
繁體
prime_notify_privmsg.txt
簡體
Author: primehalo
Modification description: This MOD will insert the message body of a private message into the private message notification e-mail (and will insert the private message subject line into the subject line of the e-mail).
Modification version: 1.0.0a
Tested on phpBB version: See below
原網址:http://www.phpbb.com/community/viewtopi ... 9&t=645065
下載檔案Download file: Prime Notify PM.zip
File size: 29475 Bytes
Files to Edit檔案編輯
includes/functions_privmsgs.php
Included Files
root/language/en/email/prime_notify_privmsg.txt
Copy拷貝: root/language/en/email/prime_notify_privmsg.txt
To到: language/en/email/prime_notify_privmsg.txt
Open: includes/functions_privmsgs.php
Find 發現
代碼: 選擇全部
$messenger = new messenger();
Add after 之後加上
代碼: 選擇全部
//-- mod: Prime Notify PM ---------------------------------------------------//
// It's better to keep BBCodes so the intended formatting can be seen
//strip_bbcode($message); // Uncomment this line to remove all BBCodes
// Strip user_id out of BBCode
$uid = '[0-9a-z]{5,}';
$message = preg_replace("#\[(\/?[a-z0-9\*\+\-]+(?:=.*?)?(?::[a-z])?)(\:?$uid)\]#", '[\1]', $message);
// Transform special BBCode characters into human-readable characters
$str_from = array('<', '>', '[', ']', '.', ':');
$str_to = array('<', '>', '[', ']', '.', ':');
$message = str_replace($str_from, $str_to, $message);
// If there is a URL between BBCode URL tags, then add spacing so
// the email program won't think the BBCode is part of the URL.
$message = preg_replace('#](http://.*?)\[/url]#', '] \1 [/url]', $message);
// Remove HTML tags and remove backslashes that appear directly before single quotes
$message = strip_tags($message);
$message = stripslashes(trim($message));
//-- end: Prime Notify PM ---------------------------------------------------//
代碼: 選擇全部
$messenger->template('privmsg_notify', $addr['lang']);
代碼: 選擇全部
//-- mod: Prime Notify PM ---------------------------------------------------//
$messenger->template('prime_notify_privmsg', $addr['lang']);
//-- end: Prime Notify PM ---------------------------------------------------//
代碼: 選擇全部
'USERNAME' => htmlspecialchars_decode($addr['name']),
代碼: 選擇全部
//-- mod: Prime Notify PM ---------------------------------------------------//
'MESSAGE' => htmlspecialchars_decode($message),
//-- end: Prime Notify PM ---------------------------------------------------//
Save all files. End of MOD. 儲存(記得備份)
中文化
prime_notify_privmsg.txt
繁體
代碼: 選擇全部
Subject: 【岐黃醫林】新的私人訊息通知: {SUBJECT}
親愛的 {USERNAME}, 你收到了新私人的訊息,請到"{SITENAME}"登錄您的帳號 . 您也可以利用以下的連結檢視您剛收到的私人訊息. 連結: {U_INBOX}
_____________________________________________________________________
發訊息者: {AUTHOR_NAME}
短訊主題: {SUBJECT}
短訊內容:
{MESSAGE}
_____________________________________________________________________
您已經申請討論區在這類事件中通知您, 記得您可以在個人資料設定中關閉它而不再收到這類的通知。
{EMAIL_SIG}
prime_notify_privmsg.txt
簡體
代碼: 選擇全部
Subject:【岐黄医林】新的私人短信通知: {SUBJECT}
亲爱的 {USERNAME}, 你收到了新私人的短信,请到"{SITENAME}"登录您的帐号 . 您也可以利用以下的链接查看您刚收到的私人短信.
链接: {U_INBOX}
_____________________________________________________________________
发信息者: {AUTHOR_NAME}
短信主题: {SUBJECT}
短信属性:
{MESSAGE}
_____________________________________________________________________
您的个人设置中允许论坛在此类事件中通知您, 如果您不希望再次收到这样的通知, 您可以在个人资料设置中关闭它。
{EMAIL_SIG}