It would be very useful to be able to set the field's default, rather than having it always default to FALSE.

Comments

damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new1.93 KB

Here's a patch that extends privacy_settings() with an extra per-content-type set of checkboxes allowing for a default value to be assigned, and extends privacy_is_private() to check for the default value.

This patch sponsored by Bluespark Labs.

damienmckenna’s picture

StatusFileSize
new3.55 KB

Updated patch that fixes a small oversight (use of "$type" instead of "$node->type") and fixes handling for node/add/* pages.

damienmckenna’s picture

Status: Needs review » Needs work

I overlooked a logic error that meant that when the default was set to ON there was no way to uncheck the box, it would always set the value to Private. I was about to upload a new patch with this included but then realized the hook_nodeapi() code also had to change. I'll be right back with a new patch..

damienmckenna’s picture

StatusFileSize
new7.84 KB

Updated patch, adds a new column to track the specific value of each node field, updates hook_nodeapi() and privacy_is_private() to support the new field, along with an update script (6101) to handle it all.

damienmckenna’s picture

Status: Needs work » Needs review