Posted by mattman on August 27, 2008 at 9:04pm
| Project: | Override Node Options |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | spiderman |
| Status: | closed (fixed) |
Issue Summary
Because I only wanted to provide the 'published' status and not whether a user can promote, make sticky or create revisions - I enhanced the module to provide individual controls over which overrides could be used.
I did this in form_alter but not in nodeapi in the 'presave' - assuming that missing form values will simply be skipped over (and because I'm lazy right now and didn't determine if I should cycle through the options there too)
This patch needs some review and it will apply to the DRUPAL-5 branch. It takes the code from D5 to D6, so don't expect that you can have individual control in a D5 install. If you want to backport then simply reference the patch code.
| Attachment | Size |
|---|---|
| override_node_options_admincontrol_d6.patch | 4.7 KB |
Comments
#1
Been a little busy on this one today. I found that I also needed to allow users to change published dates on nodes.
I didn't need the ability to change the author, but I threw it in anyway - to make things complete.
The attached patch will apply to the current DRUPAL-5 branch (as of 8/27/08). It will make the module D6 compatible and provide an admin screen with options to control the individual settings for Published, Promoted to front page, Sticky at top of lists, Create new revision, Authored by, and Authored on fields.
Leave feedback and comments in this issue.
#2
V2 should definitivly build the foundations for d6 of this module.
I have been missing the ability to reset the timestamp
#3
darn...
was hoping to find this for D5
any kind soul feel like adding this functionality to D5?
#4
i've re-rolled the patch in #1 against the latest 5.x-1.x-dev.tar.gz and attached it here.
while this patch accomplishes the same basic function as the D6 version, I am not completely satisfied with it, as it behaves a little bit strangely in the case of either the Publishing or Authoring settings being empty (ie. the user with permissions is granted NONE of the group of options to override). In this case, the fieldset still shows up, without any options, which is not a big deal for us at present, but surely counts as a bug. I've tracked this far enough to know that it has something to do with the way the array of options in the admin/settings form are (re)stored and used in the nodeapi hook, but I'm not sure how to fix it at present.
#5
This functionality is already included in the latest CVS code. We'll create a new Drupal 5 release shortly.
#6
Automatically closed -- issue fixed for 2 weeks with no activity.