I am not able to select a forum on new content type.
Usually, I am able to select the content type in the DiscussThis admin page, and then select the default forum.
After creating new content types, and selecting DiscussThis for those in the admin page, the selectable forum does not appear ... so I cannot use DiscussThis?

Please, can you help me? what I am doing wrong (comments are enabled... where should I look next???)

Comments

AlexisWilke’s picture

Lionux,

Hmmm... Are you saying that you created a new Forum type or a new Node type to which you want to attach an existing DiscussThis forum?

Because I don't think you can create new types for the forum nodes. You can add new forum entries however... those are like terms in a taxonomy.

Thank you.
Alexis

lionux’s picture

Dear AlexisWilke;

I have created a new node type, and I want to be able to use DiscussThis on that node type.
However, I can see it in the DiscussThis admin page, but when I enable it (tick in the field), the forum selection widget is not made visible.

Do not know how to go around this really?

Thanks for your help.

AlexisWilke’s picture

Lionux,

Hmmm... I tried on one of my websites and it worked.

It uses some JavaScript to show the 2 drop-downs. But if you see it on one or two and not on that one, that's strange!

I'm not too sure how I can help on this one... If you could save the HTML of the page and post it here (if there are private things, send that to me directly...)

Thank you.
Alexis

lionux’s picture

AlexisWilke;

I changed the code ;(( on line 128 discussthis.admin.inc as follows:

// foreach ($discussthis_nodetypes as $type => $name) {
foreach ($node_types as $type => $name) {

now, I have the right behavior ... not sure what went wrong on $discussthis_nodetypes.
This might help you ... as I do not really understand the code.

Thanks.

AlexisWilke’s picture

Hi Lionux,

It seems to me that you don't have the correct version since the correction you made cannot be on line 128...

The following is the current code. It first loads the existing $node_types then gets the $discussthis_nodetypes up to date:

1. In the 1st loop, it adds new $node_types to the $discussthis_nodetypes and makes sure that those new types are unselected by default.

2. In the 2nd loop it deletes any $discussthis_nodetypes that is still set when the corresponding $node_type was deleted.

Is your code really the same?!

Thank you.
Alexis Wilke

  $node_types = node_get_types('names');
  $discussthis_nodetypes = variable_get('discussthis_nodetypes', array());

  // prevent Discuss This! in forums
  unset($node_types['forum']);
  unset($discussthis_nodetypes['forum']);

  // adjust the discussthis_nodetypes arrays
  foreach ($node_types as $type => $name) {
    if (!isset($discussthis_nodetypes[$type])) {
      $discussthis_nodetypes[$type] = 0;
    }
  }
  foreach ($discussthis_nodetypes as $type => $enabled) {
    if (!isset($node_types[$type])) {
      unset($discussthis_nodetypes[$type]);
    }
  }
lionux’s picture

Hi AlexisWilke;

thanks for the response. I might not indeed use the right version. I have to look, and I'll come back to you.
right now my changes or OK, although I found some strange things going on with forum topics pointing to the content of the page instead of pointing to the comments (forum itself)...

I might need to update the entire module. I'll try.
Thanks a lot.

dom.’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

Module maintainer has changed. I'm closing this issue after years of inactivity, please open a new issue if needed.