I want to provide this option in Drupal that users be able to put comment on each paragraph of an article beside putting comment on the whole article.
I use explode command to make an array which contains paragraphs:
$paragraphs = explode("<p>",render($content));
In order to put comment for the whole article I write:
print render($content['comments']);
I am trying to find the file where $content
is defined, so I can add another array like $content[]['paragraphcomments']
for comments for each paragraph of an article. Does anyone know in which file $content
is defined. Also does anyone have any suggestion?