Hi there,
I have a form to edit profile in CB, I make a button to go to the form in profile (hack core unfortunately) and it works good on load the user data.
I'm reading the data with a Data Reading Action, but I'm updating with a custom code, because I need some custom functions.
I'm updating everything good, but my problem is the File upload (user avatar). I don't know how to handle it.
I need to give a custom name to the file like "usernameDateTime.jpg" and save it in "images/comprofiler".
How can I do it in php?
Thanks in advance,
BN
I have a form to edit profile in CB, I make a button to go to the form in profile (hack core unfortunately) and it works good on load the user data.
I'm reading the data with a Data Reading Action, but I'm updating with a custom code, because I need some custom functions.
I'm updating everything good, but my problem is the File upload (user avatar). I don't know how to handle it.
I need to give a custom name to the file like "usernameDateTime.jpg" and save it in "images/comprofiler".
How can I do it in php?
Thanks in advance,
BN
HI BN,
Again there is a Joomla! JFile class for doing this see JFile::upload()
Bob
Again there is a Joomla! JFile class for doing this see JFile::upload()
Bob
Hi Bob,
This is what I need, like I said in the other post, I'm not familiarity with the joomla functions, the only I knew was the db and user functions.
I really appreciate your help, very thanks once again.
BN
This is what I need, like I said in the other post, I'm not familiarity with the joomla functions, the only I knew was the db and user functions.
I really appreciate your help, very thanks once again.
BN
Hi BN,
Sorry, but I can’t write Joomla! tutorials for you - Googling should find you a few.
Bob
PS I'd feel a lot happier replying to your posts if you remove the flappy image from your signature. I find it very distracting, not to mention large.
Sorry, but I can’t write Joomla! tutorials for you - Googling should find you a few.
Bob
PS I'd feel a lot happier replying to your posts if you remove the flappy image from your signature. I find it very distracting, not to mention large.
Hi Bob,
Didn't saw this last post. I found a way, Not working 100% but almost there, only need one tip.
I have a event switcher and I'm trying to know if there is a a file to upload, but it doesn't work.
Here's my code:
The $form->data['avatar'] field is the upload field.
I'm using the event switcher because I need different types of saves.
BN
p.s. I've removed the flappy, I'm sorry, I don't wanted to annoying nobody.
Didn't saw this last post. I found a way, Not working 100% but almost there, only need one tip.
I have a event switcher and I'm trying to know if there is a a file to upload, but it doesn't work.
Here's my code:
<?php
if ( isset($form->data['avatar']) ) {
return 'success';
}
else
{return 'fail';}
?>
The $form->data['avatar'] field is the upload field.
I'm using the event switcher because I need different types of saves.
BN
p.s. I've removed the flappy, I'm sorry, I don't wanted to annoying nobody.
This topic is locked and no more replies can be posted.