Customizing the Phoca Download for email Notofication.

Phoca Download - download manager
manolis66
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 29 Jul 2014, 12:06

Customizing the Phoca Download for email Notofication.

Post by manolis66 »

Hello I have just start to customize the phoca Download Component. I want to send emails Notifications if one User upload a file.
I went to administrator/components/com_phocadownload/helpers/phocadownload.php and start customizing.
now I can find the id from (User 1) is locked and upload files. but I want now find the other user2 who have the accesse to the folder from User 1.
Where can I find the id from folders or Categories from user 1
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48566
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Customizing the Phoca Download for email Notofication.

Post by Jan »

No, not sure what you exactly mean with user1 and user?

Jan
If you find Phoca extensions useful, please support the project
manolis66
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 29 Jul 2014, 12:06

Re: Customizing the Phoca Download for email Notofication.

Post by manolis66 »

Ok I try to explain again.
I have on my website 2 different user groups. I have the photographers and the customers.
One photoigrapher can upload pictures on the website and the customer can download this picture.
If the photographer upload a picture the customer must take an Email Notification.
The Administrator from the Website must make a Folder for this Transaction. I mean he make a folder for each Photographer and his Customers.
That means the Photographer John can have customers Nick and Chris. So tha Admin makes 2 folders John-Nick and John-Chris and gives permisions to access this folders. Now if the photographer John upload a file for Nick to folder John-Nick tha user Nick must take an Email Notification.
So I start to customize the phocadownload.php. After customization I can find the id from photographer John who upload the files butI need also the Id from Folder John-Nick and I cantfind the way to this.
Here is my work area

$message = $title . "\n\n"
. JText::_( 'Website' ) . ': '. $sitename . "\n"
. JText::_( 'Date' ) . ': '. $date . "\n"
. 'IP: ' . $_SERVER["REMOTE_ADDR"]. "\n\n"
. JText::_( 'Message' ) . ': '."\n"
. "\n\n"
. $messageText
. "\n\n"
. JText::_( 'Regards' ) .", \n"
. $sitename ."\n";

$subject = html_entity_decode($subject, ENT_QUOTES);
$message = html_entity_decode($message, ENT_QUOTES);

JUtility::sendMail($mailfrom, $fromname, $email, $subject, $message);

$max = sizeof($ArrayWithEmails);
for($i = 0; $i<$max; $i++)
{
// edo stelnei ta mail
JUtility::sendMail($mailfrom, $fromname, $ArrayWithEmails[$i], $subject, $message);
}
manolis66
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 29 Jul 2014, 12:06

Re: Customizing the Phoca Download for email Notofication.

Post by manolis66 »

I try to explain.
In the Webseit we have Photographers and customers.
The Admin from Joomla must make the reletionship between a photographer and cutomer from photographer. That means he make a folder with the name from Photographer and tghe customer for example (Photographername=Nick and customername = John) the folder name is Nick-John and he gives access to this folder only for Nick and John. Now the Photographer can upload photos for John and John can download this photos. Also one Photographer can have more than one customer.
But the John must take a notification Email from Nick when Nick upload the Photos.
I want to know what is the id from the folder Nick-John, because in my customization I have allready the id from the User Nick but I could't found the id from the folders who Nick and john have access.
Can you help me there?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48566
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Customizing the Phoca Download for email Notofication.

Post by Jan »

Hi, I understand but I didn't such or similar customizing yet, so cannot give any clue advice (sometimes if the component has over 50.000 lines of code, it is really not easy to give suggestions what needs to be coded :-( )

Jan
If you find Phoca extensions useful, please support the project
indio
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 09 Nov 2014, 18:57

Re: Customizing the Phoca Download for email Notofication.

Post by indio »

Hi! I need this feature too. Is it possible to know if you can customize the component? I will pay, of course. Many thanks.
Post Reply