Moderated comments
By default, new comments added by users are visible right after posting. To create a moderated board where comments remain hidden until site owner reviews them, you have to enable “FAQ mode” for the section that contains the articles or any other object the comments are added to.
To enable FAQ mode and set the moderators e-mail address, use the custom_conf_load and custom_conf_save functions in the content template which displays the articles:
{* show configuration area for editor *}
{if $in_editor}
{* save configuration *}
{if $smarty.request.save}
{custom_conf_save id=$id faq_mode=$smarty.request.faq_mode email=$smarty.request.email}
{/if}{* /save configuration *}
{* load configuration *}
{custom_conf_load id=$id name="tpl_conf"}
<form name="custom_conf_vars" action="{$self}" method="POST">
<fieldset>
<legend>Settings</legend>
<table>
<tr>
<td><input type="checkbox" name="faq_mode" id="faq_mode" value="1"{if $tpl_conf.faq_mode} checked="checked"{/if}></td>
<td><label for="faq_mode">Comments are not published, instead a notification is sent to a moderator, who then can publish the comment.</label></td>
</tr>
<tr>
<td>Moderator's e-mail:</td>
<td><input type="text" name="email" value="{$tpl_conf.email}"></td>
</tr>
</table>
<input type="hidden" name="save" value="1">
<input type="hidden" name="id" value="{$id}">
<input type="submit" value="Save">
</fieldset>
</form>
{/if}{* /show configuration area for editor *}
To let users know that the comment has been successfully submitted a "lisa_alert" GET variable with value "1" will be sent (value "2" is for misspelled CAPTCHA), use following in your article template eg the page with the comment form:
{if $smarty.get.lisa_alert == 1}
<script type="text/javascript">
alert('Thank you for commenting, your comment will be reviewed before publishing.');
</script>
{/if}
