This module is almost exactly what I've been looking for! However, I would really like for it to be able to bulk convert posts from the Content page. I converted a 300+ Page (not blog posts) WordPress site over to Drupal with the wp2drual module and it pushed all of the Pages into the Blog node :-(. Now I've got to manually modify 300+ pages into the proper node type PLUS recreate the original page hierarchy...

Interested?

CommentFileSizeAuthor
#20 nodetype6_0.patch943 bytesandypost
#13 nodetype6.patch748 bytesreaneyk
#6 nodetype6.patch631 bytesandypost
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

FreeFox’s picture

How did you know I would search for the same thing 16 hours later. I've exactly the same problem. My suggestion would be to integrate this possibility in the content page. There you have check boxes already in place and if you add "Change node-type" in the list of the "Update options" it would integrate nicely.

How does this sound?

I'm eager to know when this would be possible.
Thanks in advance
Jan

fellow’s picture

Version: 5.x-1.x-dev » 5.x-1.0

I also want this feature. Thank you!

momper’s picture

+1

lomz’s picture

+1

andypost’s picture

Version: 5.x-1.0 » 6.x-1.0
Status: Active » Needs review

For use at admin/content/node adds operations like
- Set type to Page
- Set type to Story

function nodetype_node_operations() {
  $operations = array();
  if (user_access('change node types')) {
    $node_types = node_get_types();
    foreach ($node_types as $type => $info) {
      $operations['change-'. $type] = array(
        'label' => t('Set type to @type', array('@type' => $info->name)),
        'callback' => 'node_mass_update',
        'callback arguments' => array('updates' => array('type' => $type)),
      );
    }
  }
  return $operations;
}
andypost’s picture

FileSize
631 bytes

Sorry, forget about access

tecnosalva’s picture

sorry, bat this patch d'ont work for Drupal 5.11. In admin/content/node appear:

- Set type to Page
- Set type to Story..

however when update, the type nodes d'ont change.

Thanks in advance
Salva

andypost’s picture

This patch for 6.x

About 5.x branch - this batch operation should be written as function!

tecnosalva’s picture

Then, It is not possible the bulk "Change node type" in drupal 5.x with this module?

Thank you!

andypost’s picture

@capitanZ everything possible but what for :) It's a lot of code to produce for old branch

jcamfield’s picture

Yeah, but 5.x has a large install base...

+

:)

reaneyk’s picture

Status: Needs review » Needs work

Hmmm, I'm getting the following error when I try to change the node type of several nodes:

warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'node_mass_update' was given in /mysite/sites/default/modules/views_bulk_operations/views_bulk_operations.module on line 532.

Using:
VBO 6.x-1.5
NodeType 6.x-1.0 with applied patch

reaneyk’s picture

Status: Needs work » Needs review
FileSize
748 bytes

Seems that node.admin.inc must be included in order for this to work. I've attached an updated patch.

KC

krabbe’s picture

Sorry, I'm still a newbee in drupal.

Where do I put the batch-file, or what do I do with it.
Or do I have to put the function into the template.php?

I have to change so many content-types, so that I really would appreciate some hints.

Thanx.

andypost’s picture

@reaneyk my patch from #6 is for standard admin/content/node so there's no need to include node.admin.inc because it's done already
but for VBO it's required (I never used VBO before)

tsi’s picture

Status: Needs review » Reviewed & tested by the community

I'm in need for this feature too but just could not get the hang of patch work, if someone is willing to published the pached module i'll be more then happy to test it.

sinasalek’s picture

Subscribed

kerberos’s picture

We added Views Bulk Operation support as well as Rules module support (as a trigger) to this for a client (on top of the configurable content types from the patch). We are planning on contributing the changes back to this project if the maintainer is interested.

-Daniel
Adulmec

asb’s picture

Hi,

thank you for the patch - #13 applies cleanly and works fine!

I'd love to see this in the next release of the 'Nodetype' module, as well as VBO support (#18)!

Greetings, -asb

andypost’s picture

Version: 6.x-1.0 » 6.x-1.x-dev
Component: User interface » Code
FileSize
943 bytes

This patch should be changed to use API

kerberos’s picture

We put our version of this patch with some extra functionality here:

http://drupal.org/node/682272