Hi,

weeks ago i started working on the book content type to sort out a article system to allow my members to create multipages articles. Next to my problemes stated here im experiencing a lack of feature from this, well made but unfinished module, that is Book.

In short i would like to have the ability to display all the comments posted on a book's child page on evry other linked pages (parent node and it's other childs). Aswell as integrate new ones from nodes i would possibily outline in a book. Simply meaning if 'USER A post a comment on CHILDPAGE #3 - PARENT PAGE & CHILDPAGE #1 & #2 would display them as it was it's native comment'.

Quite hard to explain though, hope you understand what i mean.

I'hv found a mod that seems to do that kind of job: Relativity module but even after reading the documentation i'm not sure it's fitting my requierement and as stated in my other topic i'hv seriously not enough time to check it out in details or code something from scratch. So if you, drupal's gurus, could redirect me to a module doing that so or even just giving away a few tips to start coding something flexible and powerfull, it would be VERY appreciated.

thanks in advance.

Comments

chawl’s picture

We desperately need the same functionality. Digging modules for weeks yielded absolutely no solutions. Node comments, views, panels, etc. Nothing.

Any hope?

We are on Drupal 6.4.

Tx in advance.

chawl’s picture

After 20 days of desperation, unfortunately, I had to hack the comment.module for this functionality on Drupal 6.4. Hack is neither semantic, nor proved to be safe but simply works anyway. Even that I am not a PHP coder in any means.

In comment.module on line 925 I changed this:

  global $user;

  $output = '';

to this:

  global $user;

  $output = '';

/*Hack...*/

  unset($article_comment);

  $article_comment = db_fetch_object(db_query("SELECT bid FROM {book} WHERE nid = '%s'", $node->nid));

  $_SESSION['actual_nid'] = $node->nid;
  
  if ($article_comment != NULL && arg(0) == 'node' && is_numeric(arg(1)) && ($article_comment->bid != $node->nid)){
  $node = node_load($article_comment->bid);
  }

And around line 1550 I changed this:

  if ($cid = comment_save($form_state['values'])) {
    $node = node_load($form_state['values']['nid']);
    $page = comment_new_page_count($node->comment_count, 1, $node);

to this:

  if ($cid = comment_save($form_state['values'])) {
    $node = node_load($form_state['values']['nid']);
    $page = comment_new_page_count($node->comment_count, 1, $node);

/*Hack...*/

	$node = node_load($_SESSION['actual_nid']);
	unset($_SESSION['actual_nid']);

I am aware that these sort of hacks should not be encouraged, but this may inspire somebody, some day.

This functionality can be improved for different scenarios and can be included in the core and have some "tick boxes" of its own at node type settings page in the future as well.

Thanks for a great CMS.

chawl’s picture

I hated my own hack, though it works.

Any interest for this feature?