I am not an expert in php but I like to use it, I find it useful. Unfortunatly I don't know enough. I was wondering if there would be a command to call the function from a page (a node) for a user to be able to make a clone automatically of that node. I would do it by clicking on a button or something. Of course you would ask why the user would not simple click on the "clone" tab. That is because I want to have many other functions done automatically when the user presses the submit button. I would like the clone to be done and saved without the user having to even look at the code (and have a chance to temper with it). Can it be done? Please help!! This is very important to me :-)

Comments

pwolanin’s picture

This is not really easy, since you can't make the clone from within the hook_nodeapi('save') for obvious reasons. What you could do is implement a module that registers a shut-down funtion in hook_nodeapi('save') and then makes that clone in the shut-down funciton. Or for higher reliability, maybe have a table that represents a queue of nodes that need to be cloned on shutdown.

pwolanin’s picture

Status: Active » Closed (fixed)