RSS

LuxCal Forum

The place for questions, suggestions and news about the LuxCal Event Calendar

User:   Password:   Remember Me?   
LuxCal Forum / General / Support / Email Notification of Event
Posted:  13 Jan 2013 18:46
Sorry if this has been asked before, but I couldn't find anything in the forum... smile

When adding/editing an event, it seems that the default email address shown on the event form is always the user's own email.

I would like to change this to a specific email address (a group one that actually sends an email to everyone in the club), as some of my users have forgotten to change it when adding an event biggrin

I have looked around event.php but am reluctant to change anything in case it all goes wrong.

Could you point me in the right direction?

Kind regards - John
Posted:  14 Jan 2013 22:54   Last Edited By: Roel B.
Ok, here we go (based on LuxCal 2.7.3):
- in event.php (you're on the right track) the variable $nml (Notification MaiL) is holding the email address(es) / address list(s) that should receive an email reminder
- on line 177 $nml is set in case an event gets edited, so it's taken from the event record from the database
- on line 214 $nml is set to the value entered in the event form when a new event is added
So if you change line 214 to:
$nml = 'mymaillist';
and in this case there must be a file with email addresses (one per line) in a file called mymaillist.txt in the 'emlists' folder,
then when adding an event, this 'mymaillist' will be the default value.
However,
1. the user can still override this value in the event form and
2. if the admin changes the owner of an event, then on line 343 $nml will be set to the email address of the new owner.

If you don't want the user to override the $nml value, you might as well forget what I said above and just before the event is stored in the database - so at line 352 - add the following:
$nml = 'mymaillist';
but then, in order not to confuse the users, you should remove the field where the user can add email addresses (and the line below with the explanation) from the event form in the file eventform1.php (lines 80 and 81)

I hope you can follow my scribbles wink
I've not tested this, I'm just pointing you in the right direction.
Rgds, Roel
Posted:  15 Jan 2013 13:54
Thank you very much (as always) biggrin

I have changed the email address successfully and it all works well...

Greatly appreciatedthump_up

Kind regards - John