Buy Now
Sign in

How to upload files but not email them?

payotte , September 28 2007, 09:02
P
payotte 30
September 28 2007, 09:02 #2505
Hello,

New here. New to Joomla as well.
I needed something to email and upload, and this does it pretty well; I just bought it!

I've got four questions:


-Is it possible to make the form upload files to the server but not email them? And the reverse?

-Once files are uploaded, the time of the upload is prepended to the file name on the server; is that configurable somewhere in the code?

-I've given the form result an html template; it returns what it should except for the uploaded file name (it stays blank); is that normal?

-I defined a table in Joomla for this form. The form changed name; how do I now delete that table?


Regards,

Pierre
admin 27
September 28 2007, 10:16 #2508
Hi Pierre,

Thanks very much for your support!! let me answer all your questions :

#1- files must be uploaded in order to get them emailed, however it isn't configurable to email them or not, you can NULL the attachments variable before the mosmail function though to turn off all attachments.

#2- Sure, you can find the code for this piece at the top of the uploadandmail function in chronocontact.php.

#3- Yes, thats normal, you can get the file name with this php piece though :
$_FILES['field_name']['name']


#4- tables are named with form id, so if you changed the form name then table will stay assigned to this form!!

Cheers

Max
Max
If your main question got answered then please mark the answer using the button!
Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
P
payotte 30
September 28 2007, 10:27 #2511
Hi Max,

Thanx for your answers.
I should have specified that I don't know much about php... I can probably edit some easily enough though.
I'm fine with html and servers in general.
Not sure how to apply some of what you suggest:

#1 Where is it that I null the attachments variable before the mosmail function to turn off all attachments?

#3 how dow I use your $_FILES['field_name']['name'] line? Inside Joomla or is it more complex?

#4 So to delete a table, it can't be done inside Joomla? CPanel maybe?

Great support by the way.

Cheers
P.
admin 27
September 28 2007, 10:31 #2512
Hi Pierre,

No worries, thats it :

#1- find this line : /**
   * Send the email(s)
   */
just after it write: $attachments = NULL;

#3- use this in teh email template where you want the file name to appear :
<?php echo $_FILES['field_name']['name']; ?>
take care to replace field_name with the field name!!

#4- Yes, or PHPmyadmin!!

Thanks!!

Cheers

Max
Max
If your main question got answered then please mark the answer using the button!
Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
P
payotte 30
October 03 2007, 12:06 #2579
Hi Max,

Everything else worked but this,
I couldn't find that variable to stop files from being emailed:

"#1- find this line : /**
* Send the email(s)
*/
just after it write: $attachments = NULL;"

Which document is it in?
Or is it somewhere else in Joomla?

Regards

P.
GreyHead 64
October 03 2007, 15:39 #2580
Hi Payotte,

In the current release 2.3.4 these needs to go immediately before line 457 in chronocontact.php like this
/**
* Send the email(s)
*/
$attachments = NULL; // <-- insert new code here
$email_sent = . . .
Bob

Post edited by: GreyHead, at: 2007/10/03 11:39<br><br>Post edited by: GreyHead, at: 2007/10/03 20:05
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
admin 27
October 04 2007, 18:37 #2606
Hi Pierre,

Works fine now ?

Max
Max
If your main question got answered then please mark the answer using the button!
Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
P
payotte 30
October 05 2007, 07:00 #2632
Thanx GreyHead.

Turns out I had the wrong version.
Great support!

Cheers

p