Revision history for AddCommentHandler


Revision [21337]

Last edited on 2011-02-15 09:32:45 by BrianKoontz
Deletions:
[[http://essay-for.me/ essay sale]]


Revision [21324]

Edited on 2011-02-10 04:41:33 by FredWinson
Additions:
[[http://essay-for.me/ essay sale]]


Revision [20570]

Edited on 2009-04-24 00:02:32 by AxelMulder
Additions:
1. In addcomment.php find %%(php) $this->SaveComment($this->tag, $body);
2. Replace this line with the following code
Deletions:
1. In addcomment.php find %%(php) $body = nl2br($this->htmlspecialchars_ent($body));%%
2. Insert the following code


Revision [20569]

Edited on 2009-04-24 00:00:56 by AxelMulder
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);
Deletions:
1. In addcomment.php find %%(php) $this->SaveComment($this->tag, $body);%%
// 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);


Revision [20558]

The oldest known version of this page was created on 2009-04-18 14:50:04 by AxelMulder
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki