Index: clone.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/node_clone/clone.install,v
retrieving revision 1.1.4.2
diff -u -r1.1.4.2 clone.install
--- clone.install 3 May 2008 23:59:55 -0000 1.1.4.2
+++ clone.install 12 Aug 2008 19:03:19 -0000
@@ -10,6 +10,7 @@
variable_del('clone_method');
variable_del('clone_omitted');
variable_del('clone_nodes_without_confirm');
+ variable_del('clone_modify_title');
$types = node_get_types('names');
foreach ($types as $type => $name) {
variable_del('clone_reset_'. $type);
Index: clone.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/node_clone/clone.module,v
retrieving revision 1.9.2.13
diff -u -r1.9.2.13 clone.module
--- clone.module 23 May 2008 00:54:08 -0000 1.9.2.13
+++ clone.module 12 Aug 2008 19:03:19 -0000
@@ -83,7 +83,14 @@
$form['heading'] = array(
'#value' => ''.t('Configuration options for the clone module:').'',
);
-
+
+ $form['clone_modify_title'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Add "Clone Of" to the beginning of cloned node titles?'),
+ '#description' => t('Select this option to add a reminder about cloned nodes to node titles. Otherwise, a message is displayed to the user.'),
+ '#default_value' => variable_get('clone_modify_title', TRUE),
+ );
+
$form['publishing'] = array(
'#type' => 'fieldset',
'#title' => t('Should the publishing options ( e.g. published, promoted, etc) be reset to the defaults?'),
@@ -169,8 +176,15 @@
}
}
}
- // Add indicator text to the title.
- $node->title = t('Clone of !title', array('!title' => $node->title));
+
+ // Add indicator text to the title if enabled, otherwise set a message.
+ if (variable_get('clone_modify_title', TRUE)) {
+ $node->title = t('Clone of !title', array('!title' => $node->title));
+ }
+ else {
+ drupal_set_message(t('This form is a clone of @title.', array('@original-node' => url('node/' . $nid), '@title' => $node->title)));
+ }
+
drupal_set_title(check_plain($node->title));
if (variable_get('clone_reset_'. $node->type, FALSE)) {