2

my task is, to create a forum-like behaviour which resembles StackExchange's platform with the only difference that only the question's poster will be able to comment on the replies.

My thought is to create a Content Type that describes the initial post/question, and then add a "Reply to this" button that should somehow create a new node of type "Reply" or something (ideally in the front-end, but that's another story - feel free to comment on it though) that should get automatically referenced to the initial post/question.

The "Reply" Content Type should maybe support Drupal's core comment functionality but restricted somehow to the initial post/question's creator.

The basic question is the automatic referencing. Other than that if you got any idea about the front-end content creation and/or the limitation of comments to the afforementioned role and CT, I'd be glad to get some extra input :)

EDIT: using Entity Reference module, not Node Reference module, fyi.

  • guessing that in the node.tpl.php for the post/question CT, I could add the form for creating a "reply" node regarding the front-end content creation. – magtak Aug 8 '12 at 10:18
  • Is there a reason the built in comments are not working for you? – BetaRide Aug 8 '12 at 12:19
  • Well seeing as the response concept-wise should be fieldable as it is a "rich" entity, I wouldn't like to be restricted by the default commenting system. Plus, I am not sure if they support nesting. – magtak Aug 8 '12 at 12:37
1

For the automatic referencing you could use entityreference_prepopulate. So your button to answer from the question node would link to something like node/add/answer/27 where 27 is the question node nid. The module supports to hide the field once the value is in the URL so the user dont have to see the field.

1

I am in little doubt for not using comment as reply here. Module Question/Answer does with same entity combination of nodes and comments.

Otherwise modules like :

can be used to auto populate the node to be refereced with from url.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.