Bulk change request

monstordh - March 2, 2007 - 22:19
Project:Nodetype
Version:6.x-1.0
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:patch (code needs review)
Description

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?

#1

jandoemen - March 3, 2007 - 14:32

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

#2

fellow - May 1, 2008 - 18:08
Version:5.x-1.x-dev» 5.x-1.0

I also want this feature. Thank you!

#3

momper - August 29, 2008 - 08:03

+1

#4

lomz - September 1, 2008 - 15:02

+1

#5

andypost - September 28, 2008 - 03:15
Version:5.x-1.0» 6.x-1.0
Status:active» patch (code needs review)

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

<?php
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;
}
?>

#6

andypost - September 28, 2008 - 03:22

Sorry, forget about access

AttachmentSize
nodetype6.patch631 bytes

#7

capitanZ - October 20, 2008 - 19:13

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

#8

andypost - October 20, 2008 - 22:13

This patch for 6.x

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

#9

capitanZ - October 23, 2008 - 15:58

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

Thank you!

#10

andypost - October 23, 2008 - 17:25

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

#11

jcamfield - November 11, 2008 - 15:49

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

+

:)

 
 

Drupal is a registered trademark of Dries Buytaert.