Drupal Answers Asked by quest on February 6, 2021
I have a specific requirement.
Apart from the general comments which everyone can view or post for my custom node I also require private comments thread which will be shared only by the node created user and selected few.
Using the same comments form will not work as it will be viewed by all.
Any inputs on achieving this?
If you are up for a bit of code you can try the following approach,
Create a content type "private comments", it will have the title and body field that you need by default, you need to add a node reference field to the content type on which you want this private comments enabled. Now you need to create a block that will render the node add form for this content type. You can then enable this block where you want your private comments.
On the submit function, the title and body will be saved by Drupal, you need to add a submit handler so that the reference between your content type and comments is saved.
The advantage of creating a content type is you will get integration with views and you can then show your comments anywhere.
Answered by Kimi on February 6, 2021
For Drupal 7 see the Reply module. It lets you create your own set of "comments" attached to any Entities you want.
With some custom code you could limit the field to a specific user role or set of users. Be sure to read the README in the module.
Answered by tenken on February 6, 2021
0 Asked on December 19, 2021 by idjit
1 Asked on December 19, 2021 by arcy
1 Asked on December 17, 2021 by leopathu
1 Asked on December 17, 2021 by weblink
1 Asked on December 17, 2021
1 Asked on December 14, 2021 by marshmellow1328
5 Asked on December 14, 2021
1 Asked on December 14, 2021 by siddiq
1 Asked on December 14, 2021 by user7355700
1 Asked on December 12, 2021 by alexander-kim
1 Asked on December 12, 2021 by aaron-s
4 Asked on December 12, 2021
1 Asked on December 12, 2021 by vanessa-abi-rashed
2 Asked on December 10, 2021 by jagmitg
1 Asked on December 10, 2021 by sarah-c
1 Asked on December 10, 2021 by jessica-ix
1 Asked on December 10, 2021
1 Asked on December 10, 2021 by webuser57
1 Asked on December 8, 2021 by jurgenr
1 Asked on December 8, 2021 by alexei-rayu
Get help from others!
© 2023 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP