Over at http://drupal.org/node/88568 I've been researching a way to allow non-admin users to set a node's "athored on" creation date to something other than the current date of submission— basically allowing a non-admin to backdate a node. This can of course be done by checking the box at "access control -> node module -> administer nodes", but that apparently also allows any user (with that permission set) to modify any other user's nodes as well, which is def not what I need. i only want these users to be able to modify their own nodes (not global node admin).
Since i'm not at all familiar with PHP, I thought I could get around it by using something similar to the Actions module's "Touch node creation date" action, except my action would be "Set authored on date" (or similar) and I'd have it fire whenever a particular node type (below) was created.
So does anyone how I could relativey easily create an Action (to be used with the Workflow module) to automatically set a node's "athored on date" to a non-admin, user-supplied field? For instance, I used CCK to create a new node type, and used the standard categories menu to add the following vocabularies to that node type:
- Production Day
- Production Month
- Production Year
Now non-admin users won't actually see the "authored on" option when creating this new node type, either. So what I'd like to do is, when a non-admin user creates this new node instance and click's submit, the Workflow action would automatically set that node's hidden "authored on date" to the concatenation of my custom date fields (which the non-admin can see).
Problems are that (a) I don't know enough PHP to know how to write that "Set athored on date" action, and (b) i'm not even sure Drupal will allow an action like that to run because maybe Actions/Workflow will still want to respect the user permissions and therefore not allow "authored on" date to be set even behind the scenes.
For reference, here's a smattering of code/users I've found on other pages that seem to be trying to do something similar:
- Manually importing nodes - how to set the creation date?
- published date vs. creation date
- Authenticated users can change permissions
- Dating posts into the 1800's...
BTW, it could be that using Actions in this way is actually more complicated and/or unsafe than using the small module hook_form idea that pwolanin suggested at http://drupal.org/node/88568. If so, I'd appreciate hearing that, too, so i know which way to look.
Any/all help appreciated.
Thanks,
KV
Comments
Did you ever find anything
Did you ever find anything out on this.. I have the exact same issue.