Love the module. However, it's field weight defaults to "0" and there is no way to change that I could see. This interferes with existing CCK fileds that are already set to 0, especially when the CCK field's CSS is "float:left."

Comments

calefilm’s picture

This is an issue I am having now. I have to learn CSS and figure out how to change the placement of the Protected Node option within the CCK fields. Is there any way to do this easily or do I have to rework this in CSS? Cuz it's in the middle of a bunch of my CCK categories. would like it either at the top or the bottom...

thank you.

3rdLOF’s picture

D6 - Change the weight of the fieldset in protected_node.module by adding '#weight' => 40 line at the end of the
$form['protected_node'] array on line 92

calefilm’s picture

THANK YOU!

NOTE: Must place '#weight' => 40 after '#collapsed' => TRUE, (making sure you put a comma after "TRUE")

Working Example:

$form['protected_node'] = array(
'#type' => 'fieldset',
'#description' => t( 'Here if you check the checkbox and provide a password your newly created node will be password protected.' ),
'#title' => t( 'Password protect this @node', array('@node' => $node_type->name) ),
'#collapsible' => TRUE,
'#collapsed' => TRUE, '#weight' => 40

AlexisWilke’s picture

Title: Ability to set weight » Ability to set weight using CCK

A CCK field has been added to D6 in order to move the 'Protected node' fieldset.

Version 5 may be able to use the same code. I do not know.

function protected_node_content_extra_fields($type_name) {
  $extra = array();

  $extra['protected_node'] = array(
    'label' => t('Protected node'),
    'description' => t('Protected node module form.'),
    'weight' => 20,
  );

  return $extra;
}

Thank you.
Alexis Wilke

P.S. we do not support version 5.x otherwise.

izus’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

Sorry, 5.x is no more supported

acoustika’s picture

How can I change the order in D7? there is no protected node field in my "manage fields" for a content type