By matsbarefoot on
Is there any way to run a php script when the node is saved?
I want do make/update an XML file when I save the node, but Im not sure how or if I can do this. I use Drupal 6
Any tips on this?
Regards
Peter P.
Is there any way to run a php script when the node is saved?
I want do make/update an XML file when I save the node, but Im not sure how or if I can do this. I use Drupal 6
Any tips on this?
Regards
Peter P.
Comments
Try creating an action
Try creating an action that's triggered when the node is saved. You'll need to have the trigger module enabled, and a custom module that you'll write with the custom action. Here's a handbook page that should be useful.
http://drupal.org/node/172152
another option is the
another option is the http://drupal.org/project/rules module which will allow you to type your custom php directly into the rule without having to create a module.
===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz
Thanks!
Thanks for quick reply!
WorldFallz: This was what I was looking for. The Rules module did solved my problem. Happy to learn about this new module to!
Brandonian: Thanks for the tip and the link. I will check it out when Im starting with modul development.
Thanks again!
Peter
excellent-- happy to help.
excellent-- happy to help. the rules module is an amazingly powerful module-- once you install it you'll probably end up using it for all sorts of things.
===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz