1)Создаю сценарий, называю его calc:
Код: Выделить всё
$command=$matches[1];
$com=str_replace(',','.',$command);
$com=str_replace('один','1',$com);
$com=str_replace('два','2',$com);
$com=str_replace('три','3',$com);
$com=str_replace('x','*',$com);
$com=str_replace('х','*',$com);
$com=str_replace('делить на','/',$com);
$com=str_replace('разделить на','/',$com);
$com=str_replace('на','*',$com);
$com=str_replace('плюс','+',$com);
$com=str_replace('минус','-',$com);
$command=str_replace('x',' умножить на ',$command);
$command=str_replace('х',' умножить на ',$command);
//$command=str_replace('+',' плюс ',$command);
$command=str_replace('/',' делить на ',$command);
$command=str_replace('-',' минус ',$command);
$com='$result=' . $com .';';
eval($com);
$result = round($result,2);
say($command . ' равно ' . $result,2);
в шаблоне поведения выбираю КОД PHP и вписываю runScript('calc');
И ничего не происходит...