I don't know if anyone is interested. I've modified Node_Clone so you can clone across different drupal websites using import/export copy/paste code

I've modified the hook_menu() function and added two new functions.

Please review and use with caution and much testing

<?php

/**
 * Implementation of hook_help().
 */
function clone_help($section) {
  switch ($section) {
    case 'admin/help#clone':
      $output = '<p>'. t('The clone module allows users to make a copy of an existing node and then edit that copy. The authorship is set to the current user, the menu and url aliases are reset, and the words "Clone of" are inserted into the title to remind you that you are not editing the original node.') .'</p>';
      $output .= '<p>'. t('Users with the "clone node" permission can utilize this functionality. A new tab will appear on node pages with the word "Clone".') .'</p>';
      return $output;
  }
}

/**
* Implementation of hook_perm().
*/
function clone_perm() {
  return array('clone node');
}

/**
 * Implementation of hook_menu().
 */
function clone_menu($may_cache) {
  $items = array();

  if ($may_cache) {  
    $items[] = array(
       'path' => 'admin/settings/clone',
       'title' => t('Clone module'),
       'description' => t('Allows users to clone (copy then edit) an existing node.'),
       'callback' => 'drupal_get_form',
       'callback arguments' => 'clone_settings',
       'access' => user_access('administer site configuration'), 
      );
  }
  else { 	  
  
     $items[] = array(
       'path' => 'admin/content/import', 
       'title' => t('Import Node'),
       'description' => t('Allows users to import a node from another site.'),
       'callback' => 'import_node',
       'access' => $access,
     ); 
    if (arg(0) == 'node' && is_numeric(arg(1))){
       $node = node_load(arg(1));
       if ($node->nid) {
         $access = (user_access('clone node') && clone_is_permitted($node->type) && filter_access($node->format) && node_access('create',$node->type));
         $items[] = array(
           'path' => 'node/'. $node->nid.'/clone', 
           'title' => t('Clone'),
           'callback' => 'clone_node',
           'callback arguments' => $node->nid,
           'access' => $access,
           'type' => MENU_LOCAL_TASK, 'weight' => 5,); 
	  $items[] = array(
           'path' => 'node/'. $node->nid.'/export', 
           'title' => t('Export'),
           'callback' => 'export_node',
           'callback arguments' => $node->nid,
           'access' => $access,
           'type' => MENU_LOCAL_TASK, 'weight' => 5,); 
       }
    }
  }

  return $items;
}

function clone_is_permitted($type) {
  return !in_array($type, variable_get('clone_omitted', array()));
}

/**
* menu callback to configure module settings.
*/
function clone_settings() {

  $form['heading'] = array(
    '#value' => '<b>'.t('Configuration options for the clone module:').'</b>',
  );

  $form['publishing'] = array(
    '#type' => 'fieldset',
    '#title' => '<b>'.t('Should the publishing options ( e.g. published, promoted, etc) be reset to the defaults?').'</b>',
  );
  $types = node_get_types('names');
 
  foreach ($types as $type => $name) {
    $form['publishing']['clone_reset_'. $type] = array(
      '#type' => 'checkbox',
      '#title' => t('@s: reset publishing options when cloned', array('@s' => $name)),
      '#default_value' => variable_get('clone_reset_'. $type, FALSE),
    );    
  }
  // Need the variable default key to be something that's never a valid node type.
  $types = array_merge( array('!' => "<". t("none") .">"), $types); 
  $form['clone_omitted'] = array(
    '#type' => 'select', 
    '#title' => t('Omitted content types'), 
    '#default_value' => variable_get('clone_omitted', array('!')), 
    '#options' => $types, 
    '#description' => t('Select any node types which should <em>never</em> be cloned. Typically you should will want to select here all node types for which cloning fails (e.g. image nodes).'), 
    '#multiple' => TRUE
  );

  return system_settings_form($form);
}

/**
 * Implementation of hook_mode_type().
 */
function clone_node_type($op, $type_obj) {

  switch ($op){
    case 'delete':
      variable_del('clone_reset_'. $type_obj->type);
      break;
    case 'update':
      if (!empty($type_obj->old_type) && $type_obj->old_type != $type_obj->type) {
        if (variable_get('clone_reset_'. $type_obj->old_type, FALSE)) {
          variable_del('clone_reset_'. $type_obj->old_type);
          variable_set('clone_reset_'. $type_obj->type, TRUE);
        }
      }
      break;
  }
}

/**
 *  Clones a node - prepopulate a node editing form
 */
function clone_node($nid)
{
  if (is_numeric($nid)) {
    global $user;
    
    $node = node_load($nid);
    if (isset($node->nid) && clone_is_permitted($node->type)) {
      
      $node->nid = NULL;
      $node->uid = $user->uid;
      $node->created = NULL;   
      $node->menu = NULL;
      $node->path = NULL;
      $node->files = array();
      $node->title = t('Clone of @title', array('@title' => $node->title));
      drupal_set_title(check_plain($node->title));
      
      if (variable_get('clone_reset_'. $node->type, FALSE)) {
        $node_options = variable_get('node_options_'. $node->type, array('status', 'promote'));
        // fill in the default values
        foreach (array('status', 'moderate', 'promote', 'sticky', 'revision') as $key) {
          $node->$key = in_array($key, $node_options);
        } 
      }
      if (empty($_POST['op'])) {
        drupal_set_message('This clone will not be saved to the database until you submit.');
      }
      return drupal_get_form($node->type .'_node_form', $node); 
    }
  }
}


/**
 *  Exports a node 
 */
function export_node($nid)
{
  if (is_numeric($nid)) {
    global $user;
    
    $node = node_load($nid);
    if (isset($node->nid) && clone_is_permitted($node->type)) {
      
      $node->nid = NULL;
      $node->uid = $user->uid;
      $node->created = NULL;   
      $node->menu = NULL;
      $node->path = NULL;
      $node->files = array();
      $node->title = t('@title', array('@title' => $node->title));
      drupal_set_title(check_plain($node->title));
      
      if (variable_get('clone_reset_'. $node->type, FALSE)) {
        $node_options = variable_get('node_options_'. $node->type, array('status', 'promote'));
        // fill in the default values
        foreach (array('status', 'moderate', 'promote', 'sticky', 'revision') as $key) {
          $node->$key = in_array($key, $node_options);
        } 
      }

      $output;
      $output .= "<div>Export Code:</div> <textarea cols='60' rows='20'>";
      //print "<pre>"; print_r($node); print "</pre>"; exit;
      $output .= var_export($node, true);
      $output .= "</textarea>";
      return t($output);
    }
  }
}

/**
 *  Import Node UI 
 */
function import_node()
{
      $output;
      if ($_POST['import_code']) {
                $node_code = str_replace("stdClass::__set_state", "array", $_POST['import_code']);
		$imp = eval("return ".$node_code.";");
                return drupal_get_form($imp[0]['type'] .'_node_form', $imp[0]); 

      } else {
	      $output .= "<form method='post' action='/admin/content/import'>";
	      $output .= "<div>Import Code:</div> <textarea name='import_code' cols='60' rows='20'></textarea>";
	      $output .= "<br /><input type='submit' value='Submit Code'>";
	      $output .= "</form>";
	      return t($output);
      }


}

Comments

danielb’s picture

Update: I've changed the last function there to... you know.... make it work...

/**
 *  Import Node UI 
 */
function import_node()
{
      global $user;
      $output;
      if ($_POST['import_code']) {
                $node_code = str_replace("stdClass::__set_state", "array", $_POST['import_code']);
		$imp = eval("return ".$node_code.";");
		return str_replace('/admin/content/import', '/node/add/'.$imp[0]['type'].'', drupal_get_form($imp[0]['type'] .'_node_form', $imp[0])); 

      } else {
	      $output .= "<form method='post' action='/admin/content/import'>";
	      $output .= "<div>Import Code:</div> <textarea name='import_code' cols='60' rows='20'></textarea>";
	      $output .= "<br /><input type='submit' value='Submit Code'>";
	      $output .= "</form>";
	      return t($output);
      }


}
pwolanin’s picture

Status: Needs review » Postponed

hmmm, I'll have to take a look in more detail, but looks like something I don't want to include. The beauty of this module is its bare simplicity.

danielb’s picture

Status: Postponed » Closed (fixed)

OK no problem, I will start a new project