The whole problem is following:
Lets say we have Items, Items can have Bids, Items can have Questions and Question can have Answer.
When an Item is displayed, all content associated with this Item should also be displayed. Additionally depending on roles, certain forms to make Bids, ask Questions and replay Answers should be display.
How to achieve this? Should I have separate node type for each type? Or should I treat some subtypes like Questions and Answers as comments? Should I use some well-known modules for this?
I am using Drupal 7 and I tried to write a custom module but I didn't get it working properly.
To get a node edit form, you need to include node.pages.inc.
<?php
// required for Drupal 6
module_load_include('inc', 'node', 'node.pages');
// which nodeform you want
$node_type = 'YOURNODETYPE';
$form_id = $node_type . '_node_form';
// maybe add current users info
global $user;
// create a blank node
$node = array(
'uid' => $user->uid,
'name' => (isset($user->name) ? $user->name : ''),
'type' => $node_type,
);
// Invoke hook_nodapi and hook_node
node_object_prepare($node);
// Or you can also use an exiting node, for example
// $node = node_load(123);
// and the display the form:
$output = drupal_get_form($form_id, $node);
?>