Header(array('settings' => 'Settings', 'help' => 'Help'), 'chrono_app_task_config_{n}'); ?>
tabStart('settings'); ?>
input('action_chrono_app_task_{n}_mode_config', array('type' => 'select', 'label' => 'Mode', 'options' => array('controller' => 'Controller', 'view' => 'View'), 'smalldesc' => 'When should this code run ? during the controller code processing (early) or later when the ouput is viewed.')); ?>
input('action_chrono_app_task_{n}_action_label_config', array('type' => 'text', 'label' => "Action Label", 'class' => 'medium_input', 'smalldesc' => 'Label for your action in the wizard.')); ?>
input('action_chrono_app_task_{n}_option_config', array('type' => 'text', 'label' => "Option", 'class' => 'medium_input', 'smalldesc' => 'The Chrono option you need to run without the com_, leave empty and this will be auto configured by your Chrono App.')); ?>
input('action_chrono_app_task_{n}_task_config', array('type' => 'text', 'label' => "Task", 'class' => 'medium_input', 'smalldesc' => 'The Chrono task you need to run, leave empty and this will be auto configured by your Chrono App.')); ?>
input('action_chrono_app_task_{n}_content1_config', array('type' => 'textarea', 'label' => "Code", 'rows' => 20, 'cols' => 70, 'smalldesc' => 'any code can be placed here, any PHP code should include the PHP tags.')); ?>
tabEnd(); ?>
tabStart('help'); ?>
- This action will execute a Chrono App task.
tabEnd(); ?>
PK X:R\ËÑäà< < chrono_app_task.phpnu W+A„¶ 'Chrono App Task', 'tooltip' => 'Run a Chrono App task.');
var $group = array('id' => 'x_chronoforms_apps', 'title' => 'ChronoForms Apps');
function run($form, $actiondata){
$mainframe = JFactory::getApplication();
$params = new JParameter($actiondata->params);
$option = $params->get('option', '');
$task = $params->get('task', '');
if(!empty($option) && !empty($task)){
require_once(JPATH_SITE.DS.'components'.DS.'com_chronoconnectivity'.DS.'libraries'.DS.'chronoapp.php');
/*if(strpos($task, '.') !== false){
$pcs = explode('.', $task);
$task = $pcs[0];
$fn = $pcs[1];
}else{
$fn = 'index';
}*/
$new_app_instance = new CEChronoApp($option, $task, false);
$new_app_instance->taskControl = false;
$new_app_instance->runTask();
//$Controller = $new_app_instance->controllers[trim($option).'.'.trim($task)];
//$Controller = CEChronoApp::getInstance($option, $task);
//$Controller->$fn();
}
}
function load($clear){
if($clear){
$action_params = array(
'content1' => '',
'option' => '',
'task' => '',
'action_label' => '',
'mode' => 'controller'
);
}
return array('action_params' => $action_params);
}
}
?>PK X:R\žÙÜ
index.htmlnu W+A„¶ PK X:R\®)ÕÐ W .htaccessnu W+A„¶ PK X:R\"ìMNÚ Ú chrono_app_task.ctpnu W+A„¶ PK X:R\ËÑäà< < , chrono_app_task.phpnu W+A„¶ PK 9 «