- Posts: 11
- Thank you received: 0
[SOLVED] Custom Field type "File"?
- sg6
- Topic Author
- Offline
- New Member
Less
More
9 years 5 months ago - 9 years 4 months ago #52900
by sg6
[SOLVED] Custom Field type "File"? was created by sg6
Last edit: 9 years 4 months ago by sg6.
Please Log in or Create an account to join the conversation.
- sg6
- Topic Author
- Offline
- New Member
Less
More
- Posts: 11
- Thank you received: 0
9 years 5 months ago #52902
by sg6
Replied by sg6 on topic Custom Field type "File"?
Ok, via Google I found that thread (couldn't find it via the forum search)
joomdonation.com/forum/events-booking-ge...ad-custom-field.html
So it seems that file upload does not work right now, am I right?
I would like to integrate it by myself, because it is really urgent and I cannot wait. Could you tell me which function in the controller is responsible for storing the data in the database? Because I would integrate the file upload into this function. I only use individual registration and it's always the same custom field, so I guess it won't be much work.
I thought it was the public function process_individual_registration() (line #204 in controller/controller.php), but editing this function does not affect anything for me.
Thank you!
joomdonation.com/forum/events-booking-ge...ad-custom-field.html
So it seems that file upload does not work right now, am I right?
I would like to integrate it by myself, because it is really urgent and I cannot wait. Could you tell me which function in the controller is responsible for storing the data in the database? Because I would integrate the file upload into this function. I only use individual registration and it's always the same custom field, so I guess it won't be much work.
I thought it was the public function process_individual_registration() (line #204 in controller/controller.php), but editing this function does not affect anything for me.
Thank you!
Please Log in or Create an account to join the conversation.
- sg6
- Topic Author
- Offline
- New Member
Less
More
- Posts: 11
- Thank you received: 0
9 years 4 months ago #53301
by sg6
Replied by sg6 on topic Custom Field type "File"?
*bump*
Any help? Advice? Hints?
Any help? Advice? Hints?
Please Log in or Create an account to join the conversation.
- sg6
- Topic Author
- Offline
- New Member
Less
More
- Posts: 11
- Thank you received: 0
9 years 4 months ago #53305
by sg6
Replied by sg6 on topic Custom Field type "File"?
I could finally fix it. I am very disappointed that this feature is not a part of the component, even though it seems like it. Even worse, customers uploaded files which are gone now.
But on the bright side: here's my solution:
Open the controller's function process_individual_registration
/components/com_eventbooking/controller/controller.php line #204
public function process_individual_registration()
20 lines below there is the following line: $model->processIndividualRegistration($post);
I've added the following lines:
The name of my custom field is file-upload, that's why it's $input->files->get('file-upload');
Afterwards go to the register model and add the following function
/components/com_eventbooking/models/register.php line #262
function processGroupRegistration($data)()
Above that line, add the following:
Save it, and the files are uploaded now.
Not the best solution, but at least, it's a solution!
But on the bright side: here's my solution:
Open the controller's function process_individual_registration
/components/com_eventbooking/controller/controller.php line #204
public function process_individual_registration()
20 lines below there is the following line: $model->processIndividualRegistration($post);
I've added the following lines:
Code:
$files = $input->files->get('file-upload');
$model->uploadFiles($files);
The name of my custom field is file-upload, that's why it's $input->files->get('file-upload');
Afterwards go to the register model and add the following function
/components/com_eventbooking/models/register.php line #262
function processGroupRegistration($data)()
Above that line, add the following:
Code:
function uploadFiles() {
$uploaddir = './'; // add your custom dir. if you just write ./ it will be uploaded into the model dir
$uploadfile = $uploaddir . basename($_FILES['file-upload']['name']);
move_uploaded_file($_FILES['file-upload']['tmp_name'], $uploadfile);
}
Save it, and the files are uploaded now.
Not the best solution, but at least, it's a solution!
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
9 years 4 months ago #53377
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Custom Field type "File"?
Hi
At the moment, we are dealing with our hosting issue and could not give more information about it. Your solution works, but not the correct one.
We will update the proper code to download package on Monday next week. For the time being, please use the solution you are having
Regards,
Tuan
At the moment, we are dealing with our hosting issue and could not give more information about it. Your solution works, but not the correct one.
We will update the proper code to download package on Monday next week. For the time being, please use the solution you are having
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- Rafal
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
9 years 4 months ago #54461
by Rafal
Replied by Rafal on topic [SOLVED] Custom Field type "File"?
Hello,
I am having the same issue. Is there new code published to fix this? I see in a previous post that it was expected around the first Monday of December.
Thanks!
Rafal
I am having the same issue. Is there new code published to fix this? I see in a previous post that it was expected around the first Monday of December.
Thanks!
Rafal
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
9 years 4 months ago #54472
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic [SOLVED] Custom Field type "File"?
Hi Rafal
We will release new version (1.6.9) this week and will have the fix for it (for the time being, only for individual registration)
Regards,
Tuan
We will release new version (1.6.9) this week and will have the fix for it (for the time being, only for individual registration)
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- Rafal
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
9 years 4 months ago #54483
by Rafal
Replied by Rafal on topic [SOLVED] Custom Field type "File"?
Thank you Tuan, I just purchased Membership Pro on December 5th so hope I qualify for the individual registration.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
9 years 4 months ago #54501
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic [SOLVED] Custom Field type "File"?
We provide free upgrade for one year for each purchase, don't worry
Tuan
Tuan
Please Log in or Create an account to join the conversation.
- Rafal
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
9 years 3 months ago #55197
by Rafal
Replied by Rafal on topic [SOLVED] Custom Field type "File"?
Hi,
Is the fixed code out yet? Is there a special location where I can download it from?
Rafal
Is the fixed code out yet? Is there a special location where I can download it from?
Rafal
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
Support
Documentation
Information
Copyright © 2024 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.