Search

I've got an article and a comment section both linked together via a section link field. The article section has a checkbox saying allow comments and it's possible to add comments via a frontend form to the comments section.

I'd like to add an event filter that checks if allow comments is set to yes for the article a comment should be posted to. This filter should refuse to save comments in case the checkbox is set to no.

Is there an easy way to achieve this? It all seems a bit overcomplicated when thinking of creating an extension for this (quite simple) task.

Display comments and put the comment form within:

 <xsl:if test="article/entry/allow-comments = 'Yes'"></xsl:if>

Ah, well, this works if I just don't want to display the the comment form. But this is not spam proof. If I know how Symphony works, it's easy to write a script to post comments without a form present on the website.

I'm really looking for a event filter to assure that no more comments can be created for a certain entry.

I suppose you have to modify the trigger of the comment event then.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details