--- plugins/forum/lib/ForumMessageNotification.php.bak 2009-05-10 18:33:14.000000000 +0800
+++ plugins/forum/lib/ForumMessageNotification.php 2009-05-22 00:11:44.000000000 +0800
@@ -58,23 +58,36 @@
$project = ProjectPeer::retrieveByPk($this->Forum->getRefId());
// make the body
+ $TrackItemUrl=$url->getFullURL($url->projectUrl($project,'ForumBrowse', 'forum', '', array('_forum_action'=>'MessageReply','message_id' => $this->ForumMessage->getForumMessageId())),true) . "\n";
+ $TrackItemUrl=substr($TrackItemUrl,0,31).":81".substr($TrackItemUrl,31,-1);
+ $TrackItemUrl="" . $TrackItemUrl . "";
+
$body = "Thread " . $this->ForumMessage->getForumThread()->getThreadName() ." had a new message posted at ". $this->ForumMessage->getPostDate() .
- "\nYou can respond by visiting: ".
- "\n" . $url->getFullURL($url->projectUrl($project,'ForumBrowse', 'forum', '', array('_forum_action'=>'MessageReply','message_id' => $this->ForumMessage->getForumMessageId())),true) .
- "\nOr by replying to this e-mail entering your response between the following markers: ".
- "\n".
- "\n".self::FORUM_MAIL_MARKER.
- "\n(enter your response here)".
- "\n".self::FORUM_MAIL_MARKER.
- "\n\n".
+ "\n
You can respond by visiting: ".
+ "\n
" . $TrackItemUrl .
+ "\n
Or by replying to this e-mail entering your response between the following markers: ".
+ "\n
".
+ "\n
".self::FORUM_MAIL_MARKER.
+ "\n
(enter your response here)".
+ "\n
".self::FORUM_MAIL_MARKER.
+ "\n\n
".
"Submitted By: ". $this->ForumMessage->getUser()->getFirstName() . " " . $this->ForumMessage->getUser()->getLastName() .
- " (". $this->ForumMessage->getUser()->getUnixName() . ")"."\n\n";
+ " (". $this->ForumMessage->getUser()->getUnixName() . ")"."\n\n
";
- $body .= StringUtils::getPlainUTF8FromHtml($this->ForumMessage->getBody()) ." \n";
- $body .= "\n\n______________________________________________________________________".
- "\nYou are receiving this email because you elected to monitor this forum.".
- "\nTo stop monitoring this forum, login to ". $url->getFullUrl($url->baseUrl('Login', '', 'account')) ." and visit: ".
- "\n".$url->getFullUrl($url->getMonitorUrl('forum', $this->Forum->getPrimaryKey(), $url->projectUrl($project, '', 'forum'), false),true);
+ $body .= $this->ForumMessage->getBody() ." \n
";
+
+ $TrackItemUrl=$url->getFullUrl($url->baseUrl('Login', '', 'account')) . "\n";
+ $TrackItemUrl=substr($TrackItemUrl,0,31).":81".substr($TrackItemUrl,31,-1);
+ $TrackItemUrl="" . $TrackItemUrl . "";
+
+ $body .= "\n\n
______________________________________________________________________".
+ "\n
You are receiving this email because you elected to monitor this forum.".
+ "\n
To stop monitoring this forum, login to ". $TrackItemUrl ." and visit: ".
+ "\n
";
+ $TrackItemUrl=$url->getFullUrl($url->getMonitorUrl('forum', $this->Forum->getPrimaryKey(), $url->projectUrl($project, '', 'forum'), false),true) . "\n";
+ $TrackItemUrl=substr($TrackItemUrl,0,31).":81".substr($TrackItemUrl,31,-1);
+ $TrackItemUrl="" . $TrackItemUrl . "";
+ $body .= $TrackItemUrl;
return $body;
}
@@ -95,7 +108,7 @@
* @return string
*/
private function getGenericSubject() {
- $subject = "[".$this->Forum->getForumName()."] ". StringUtils::unHtmlSpecialChars($this->ForumMessage->getSubject());
+ $subject = "ForumMessage [".$this->Forum->getForumName()."] ". StringUtils::unHtmlSpecialChars($this->ForumMessage->getSubject());
return $subject;
}