Active
Project:
Scripts
Version:
6.x-1.1
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 Apr 2010 at 10:15 UTC
Updated:
3 May 2010 at 09:29 UTC
Is it possible to "Run on init" a script only when loading certain nodes, instead of running it always when any URL is called? It would be great if we could execute different scripts calling each of them only from certain node's code.
I mean: is this module created for just running general purpose scripts and commands, or would it be used to execute particular scripts, as a way of a code extension from nodes, too?
Another question is: where does the output of a command go to? For example, after executing "ls -l -a -s", how can we display the result into a node?
Thanks.
Comments
Comment #1
waleedq commentedhello you can do something like if statement in the script code to check if this is the node you want
for example
if(arg(1) == "5"){
// your script here
}
about the output actually this is a good idea saving the output to a node smart :) i will start working to add this feature to the module for the mean while i think you can execute a php code that will take your output and save it to a node using the function node_save