<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<font size="-1"><font face="Helvetica, Arial, sans-serif">Hi everyone,<br>
<br>
if anybody is interested: I added a line to the commentboxplus recipe
which introduces a global variable $PreventDirectives.<br>
<br>
It enables the admin to prevent users from posting directives like
(:title:) as part of their comment, by changing the colon to the
corresponding HTML entity. Thus, when the user comments with (:title
this page sucks:), this will simply show up as his comment.<br>
<br>
The last four lines are the ones which I have added. I also just posted
this on the cookbook page (can someone reformat the indent there?).<br>
<br>
Best,<br>
Mike<br>
<br>
<br>
<br>
<br>
function HandleCommentPost($pagename) {<br>
&nbsp; global $_GET,$_POST,$JournalPattern,$DiaryPattern,$Author;<br>
&nbsp; global $AuthFunction, $oAuthFunction;<br>
&nbsp; if (!@$_POST['post'] || @$_POST['text']=='') Redirect($pagename);<br>
&nbsp; if (@$_POST['author']=='') $Author = 'anon';<br>
&nbsp; if (isset($_GET['message'])) { $message = $_GET['message']; echo
$message; }<br>
&nbsp; if (@$_POST['postto']) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SDV($EditRedirectFmt, $pagename);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $pagename = MakePageName($pagename, $_POST['postto']);<br>
&nbsp; }<br>
<br>
&nbsp;&nbsp;&nbsp; SDV($PreventDirectives,0);<br>
&nbsp;&nbsp;&nbsp; if($PreventDirectives == 1){&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $_POST['text'] = ereg_replace(":","&amp;#58;",$_POST['text']);<br>
&nbsp;&nbsp;&nbsp; }<br>
<br>
<br>
</font></font>
</body>
</html>