Wow - I just spent the whole morning trying to do exactly the same thing, basing my work on the image_import module with the code to import imagefield content...

I suppose this is a task...
I saw this bit commented out :

  //if (module_exists('comment')) {
 //  $node->comment = variable_get("comment_$node->type", COMMENT_NODE_READ_WRITE);
  //}

It will work with the following correction - adding curly braces.

  if (module_exists('comment')) {
    $node->comment = variable_get("comment_{$node->type}", COMMENT_NODE_READ_WRITE);
  }

Comments

jmlavarenne’s picture

I didn't say it in my earlier post, but I was really happy to find this module - just imagine!

Thanks for the great work adapting the module for CCK!

vordude’s picture

I took most of the image_import.module and adapted it, commenting out anything that might cause conficts along the way, then re-adding features as I went--

If you could roll a patch that would be great!

(are you adding {} someplace? Perhaps I just need more coffee at this hour)

jmlavarenne’s picture

Yes -

comment_{$node->type}

instead of

comment_$node->type

Sorry I'm not ready to write patches just yet - started looking into it but not enough time right now (soon hopefuly!).

vordude’s picture

Assigned: Unassigned » vordude
Category: task » feature
Status: Active » Closed (fixed)

Applied-- Comments in 1.2 Beta

Thank you.

vordude’s picture

Status: Closed (fixed) » Fixed

Am I supposed to use Fixed, or closed?

Either way it's fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.