- Posts: 25
- Thank you received: 0
email administration when inviting a friend
- maitri
- Topic Author
- Offline
- Junior Member
-
I was wondering if there is a chance I can be emailed when someone chooses to invite a friend.
I know the email gets sent to the address indicated by the person filing the form but, I wonder if there might be a way to
either
set the email address to where the invitation is always sent (the administrator's email). The person in this case would be able to indicate in a different place of the form the email of the friend (I would change the wording with the translator feature) and I the administrator would send manually the invitation
or just be notified when an invitation is sent by the machine....
Thanks, that would be of great help for the purpose of my work.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
1. Open the file components/com_eventbooking/models/invite.php
2. Find the code below :
3. Change it to :
Please make sure you replace email@domain.com with your actual email. After that , you will receive notification when someone invites a friend .
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- maitri
- Topic Author
- Offline
- Junior Member
-
- Posts: 25
- Thank you received: 0
This option would be perfect. However, I have changed the code as you mentioned and the email is still sent to the friend's address. I am attaching the invite.php file that I have modified, please let me know if I missed something, although I am pretty sure followed your indications.
Thanks.
Just in case the attached file does not upload correctly, these is the portion of the file with the code with the changes on it:
$body = $config->invitation_email_body ;
$subject = str_replace('[EVENT_TITLE]', $event->title, $subject) ;
foreach ($replaces as $key=>$value) {
$key = strtoupper($key) ;
$body = str_replace("[$key]", $value, $body) ;
}
$emails = explode("\r\n", $data);$emails[] = 'info@bitacoraeventos.com';
$names = explode("\r\n", $data);
for ($i = 0 , $n = count($emails) ; $i < $n ; $i++) {
$emailBody = $body ;
$email = $emails[$i] ;
$name = $names[$i] ;
if ($name && $email) {
$emailBody = str_replace('[NAME]', $name, $emailBody) ;
//Send emails here
JUtility::sendMail($fromEmail, $fromName, $email, $subject, $emailBody, 1);
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
Please Log in or Create an account to join the conversation.
- maitri
- Topic Author
- Offline
- Junior Member
-
- Posts: 25
- Thank you received: 0
Thanks.
ups... I'm not sure that the file is uploading even ziped but hopefully the code pasted previously would be enough.
thank you.
Please Log in or Create an account to join the conversation.
- maitri
- Topic Author
- Offline
- Junior Member
-
- Posts: 25
- Thank you received: 0
While waiting for you to get back, I have a second question that would be really helpful and I wonder if it can be done somehow: I noticed that for events that don´t allow registration the invite a friend option doesn't come out. Is there a way it can be configured for it to appear on them as well?
Also, you don't get the option to invite untill you go into the details of the events, at the end of the page, would it be possible for the button to appear in the category layout page after the brief description of the event next to the "details" button?
This way, we increase the chances of people sharing/inviting friends to the events.
Thanks a lot.
Please Log in or Create an account to join the conversation.
- maitri
- Topic Author
- Offline
- Junior Member
-
- Posts: 25
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
Here's the file invite.php
Thanks.
ups... I'm not sure that the file is uploading even ziped but hopefully the code pasted previously would be enough.
thank you.
=> You still forgot to attach the file, so I could not check it . Maybe you can email me directly to contact@joomdonation.com so that I can check the code you modified .
Tuan
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
While waiting for you to get back, I have a second question that would be really helpful and I wonder if it can be done somehow: I noticed that for events that don´t allow registration the invite a friend option doesn't come out. Is there a way it can be configured for it to appear on them as well?
=> Please get this file, unzip it, get the file and upload it to components/com_eventbooking/views/event/tmpl folder. After that, it should work as expected .
Also, you don't get the option to invite untill you go into the details of the events, at the end of the page, would it be possible for the button to appear in the category layout page after the brief description of the event next to the "details" button?
=> Unfortunately, the feature is not supported in the extension. So if you want to have it, you will have to customize the code yourself .
Tuan
Attachment default-20120416.zip not found
Support
Documentation
Information
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.