Revision history for AddCommentHandler
Deletions:
Additions:
[[http://essay-for.me/ essay sale]]
Additions:
1. In addcomment.php find %%(php) $this->SaveComment($this->tag, $body);
2. Replace this line with the following code
2. Replace this line with the following code
Deletions:
2. Insert the following code
Additions:
1. In addcomment.php find %%(php) $body = nl2br($this->htmlspecialchars_ent($body));%%
// replace the double colon markup with a nice single comma
$body2 = str_replace ('::', ',', $body);
$this->SaveComment($this->tag, $body2);
// notify by email, code from NotifyOnChange action
$SendAdr = $this->LoadSingle("select email from " .$this->config["table_prefix"]."users where name = '".mysql_escape_string($this->GetUserName())."'");
$subject = "[".$this->config["wakka_name"]."] \"" . $this->GetPageTag() . "\" commented by " . $this->GetUserName();
// uncomment below if you like to greet the reader with his/her username
// $message = "<p>Hi ".$Watcher.",</p>";
$message = "<p>".$this->GetUserName()." has commented on <a href=\"".$this->Href("",$tag,"")."\">".$this->GetPageTag()."</a>:</p>";
$message .= "<p><i>".$body2."</i></p>";
$message .= "<p>Do not reply to this message, go to the <a href=\"".$this->Href("",$tag,"")."\">".$this->GetPageTag()."</a> Wiki page instead for follow-up Wiki action.</p>";
// use below from: header if you want to send from dummy address
// $headers = "From: wiki@yourdomain.com\n";
// use below from: header to show who commented, including email address
$headers = "From: ".$this->GetUserName()." <".$SendAdr["email"].">\n";
$mailaddr = "".$Watcher." <".$MailAdr["email"].">";
mail($mailaddr, $subject, $message, $headers);
// replace the double colon markup with a nice single comma
$body2 = str_replace ('::', ',', $body);
$this->SaveComment($this->tag, $body2);
// notify by email, code from NotifyOnChange action
$SendAdr = $this->LoadSingle("select email from " .$this->config["table_prefix"]."users where name = '".mysql_escape_string($this->GetUserName())."'");
$subject = "[".$this->config["wakka_name"]."] \"" . $this->GetPageTag() . "\" commented by " . $this->GetUserName();
// uncomment below if you like to greet the reader with his/her username
// $message = "<p>Hi ".$Watcher.",</p>";
$message = "<p>".$this->GetUserName()." has commented on <a href=\"".$this->Href("",$tag,"")."\">".$this->GetPageTag()."</a>:</p>";
$message .= "<p><i>".$body2."</i></p>";
$message .= "<p>Do not reply to this message, go to the <a href=\"".$this->Href("",$tag,"")."\">".$this->GetPageTag()."</a> Wiki page instead for follow-up Wiki action.</p>";
// use below from: header if you want to send from dummy address
// $headers = "From: wiki@yourdomain.com\n";
// use below from: header to show who commented, including email address
$headers = "From: ".$this->GetUserName()." <".$SendAdr["email"].">\n";
$mailaddr = "".$Watcher." <".$MailAdr["email"].">";
mail($mailaddr, $subject, $message, $headers);
Deletions:
// notify watchers by email
$subject = "[".$this->config["wakka_name"]."] The page \"" . $this->GetPageTag() . "\" has been commented by " . $this->GetUserName();
//$message = "<p>Hi " . $Watcher . ",</p>";
$message = "<p><a href=\"".$this->Href("",$tag,"")."\">".$this->Href("",$tag,"")."<a> has received the following comment:</p>";
$message .= "<p><i>" . $body . "</i></p>";
$message .= "<p>Do not reply to this message, go to the Wiki page instead for follow-up Wiki action.</p>";
$headers = "From: wiki@yourdomain.com\n";
mail($MailAdr["email"], $subject, $message, $headers);