Project:Protected node
Version:5.x-1.4
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

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

#1

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.

#2

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

#3

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

#4

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.

<?php
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.