Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By migajos on
I have a content type which can be flagged by users. I want to permit writing comments only users who flagged the node. Is it possible? How to do that?
Will appreciate help.
thx
Comments
Hi, By default set the
Hi,
By default set the comment of your content type disable mode.When loading a particular node hook_node_load, check whether the node is flagged or not like below if not set the node comment value 2 otherwise by default it is 1
r@mmi