Hello!
I want to ask, how can i email the path of upload folder? Because i`ve set the upload folder name by e-mail field, and i needed date and time of upload action too, i`ve made one hack into upload_files_gh.php.
So because of that i can't simply get the {field_name}but i need a way with php to get the $upload_path into the e-mail template.
Hope You understand me🙂
Thanks!
I want to ask, how can i email the path of upload folder? Because i`ve set the upload folder name by e-mail field, and i needed date and time of upload action too, i`ve made one hack into upload_files_gh.php.
if ( $params->get('upload_path') ) {
$upload_path = $form->curly_replacer($params->get('upload_path'), array_merge($form->data, $curly_array));
$upload_path = $upload_path . date('dmYHi');
$upload_path = str_replace(array("/", "\\"), DS, $upload_path).DS;
$upload_path = str_replace(DS.DS, DS, $upload_path);
$upload_path = str_replace('@', '_', $upload_path);
} else {...
So because of that i can't simply get the {field_name}but i need a way with php to get the $upload_path into the e-mail template.
Hope You understand me🙂
Thanks!
Hi vbarlakoski,
You don't need to hack anything. All of this information is already available (except possibly the date and time). Use the ChronoForms Debugger action to see what data is saved in the $form->data array. (The action Help tab also describes most of it.)
Bob
You don't need to hack anything. All of this information is already available (except possibly the date and time). Use the ChronoForms Debugger action to see what data is saved in the $form->data array. (The action Help tab also describes most of it.)
Bob
Hi Bob!
Well, because i'm using gallery plugin, and it conflicts with @ character of the folders, so that's why i've managed to relace it. However, the debugger says:
Thanks!
Well, because i'm using gallery plugin, and it conflicts with @ character of the folders, so that's why i've managed to relace it. However, the debugger says:
Data Array:
Array
(
[zaglavie] => Тестово заглавие
[grad] => Тестов град
[kategoria] => Кухненски и домакински уреди
[address] => София
[telefon] => 54651590
[email] => vladimir.barlakoski(AT)gmail.com
[opisanie] =>
асфасфасфасф
[snimka1] => 20120502093833_237134185206259704.png
[snimka2] =>
[snimka3] =>
[snimka4] =>
[recaptcha_challenge_field] => 03AHJ_VusfJGpFbnMnn0ItKYU2Hb0otjp8Mx8yxDSegUaKl4_7uErC0nQKBruFCc2Edt0L4UGsI6uHKUWur7KY90uI95ke-OuYbO-FkLHVNF4_Fc0utlKRWwJfc17lq8QNerff1ovoQ6vNF0BDXEJcl3wNkHgiYiPXlQ
[recaptcha_response_field] => 2a padara
[send_btn] => Изпрати
[d701e345e35979eca6c005c01bc7b377] => 1
[view] => form
[chronoform] => tehnika
[event] => submit
[Itemid] => 278
[option] => com_chronoforms
[snimka1_size] => 5
[snimka1_url] => http://www.potarsi24.com/images/tehnika/vladimir.barlakoski_gmail.com020520120938/20120502093833_237134185206259704.png
[snimka1_path] => /home/workbg28/public_html/images/tehnika/vladimir.barlakoski_gmail.com020520120938/20120502093833_237134185206259704.png
[_PLUGINS_] => Array
(
[upload_files] => Array
(
[snimka1] => Array
(
[name] => 20120502093833_237134185206259704.png
[path] => /home/workbg28/public_html/images/tehnika/vladimir.barlakoski_gmail.com020520120938/20120502093833_237134185206259704.png
[size] => 5017
[link] => http://www.potarsi24.com/images/tehnika/vladimir.barlakoski_gmail.com020520120938/20120502093833_237134185206259704.png
)
)
)
)
Thanks!
Hi vbarlakoski ,
OK I understand. '@' isn't valid in a folder name - but you can change that with a Custom Code action before the Upload Files action to create a clean path:
Bob
OK I understand. '@' isn't valid in a folder name - but you can change that with a Custom Code action before the Upload Files action to create a clean path:
<?php
$form->data['email_clean'] = str_replace['@', '_at_', $form->data['email']);
?>
Bob
Hello Bob!
I`ve already done that @ hack into php file (as mentioned before).
So, my question was, if that folder path that is created trough uploading files, can be shown into e-mailed results.
Thanks!
I`ve already done that @ hack into php file (as mentioned before).
So, my question was, if that folder path that is created trough uploading files, can be shown into e-mailed results.
Thanks!
Hi vbarlakowski,
Bob
All of this information is already available (except possibly the date and time). Use the ChronoForms Debugger action to see what data is saved in the $form->data array. (The action Help tab also describes most of it.)
Bob
<?php echo
$form->data['email_clean'] = str_replace('@', '_at_', $form->data['email']).date('dmYHi');
?>
I've inseted this into email template in the place where i want to appear upload folder (is the same generator for the folder). It works, just i hope that it won't be any differences in minutes. For now is ok.
Thanks for pushing me trough this.
V.
This topic is locked and no more replies can be posted.