Hi.
my question is:
there any way to configure the sending of mail when you enter a event in the calendar?
thanks.
Hi.
my question is:
there any way to configure the sending of mail when you enter a event in the calendar?
thanks.
There is no way to configure such action through existing admin part.
( server side code can be altered, to send email after event inserting|updating, but it will require some php knowledge )
OK, so that files should be included php code?? I have PHP knowledge, but not where it should go to not affect the operation of the plugin.
Would be a good feature to include in your next update plugin for better control of events
codebase\dhtmlxSchedulerConfigurator.php
locate next line
$this->scheduler->event->attach("beforeProcessing", Array($this, "set_event_user"));
and add after it
$this->scheduler->event->attach("afterInsert", "my_code");
after that , add to the start of file
function my_code($action){
$text = $action->get_value("text");
mail(....);
}
thanks, I’ll try and let you know the results
Can anyone tell me where this dhtmlxSchedulerConfigurator.php file is? I mean I’ve looked everywhere and it doesn’t seem to exist. Hell, even windows doesn’t find it when I search for it. There’s no PHP file in the codebase directory of my scheduler either, only a CSS and a JS file so I’m obviously missing something here or I don’t have the same version. Anyway, a little pointer here would be greatly appreciated since I’ve been trying to do exactly the same as MrFreaks.
Thanks in advance
Osu
Hi, Osu.
As far as i remember you are using standalone version of scheduler, no?
If so then you don’t need dhtmlxSchedulerConfigurator.php file, same changes should be made in your ‘events.php’ file.
Best regards,
Ilya
I see, thanks a lot
Hello,
I’m using wordpress version and i’m trying to attach a function in dhtmlxSchedulerConfigurator.php and the function i put it below constructor
public function sendEmail($action) {
$text = $action->get_value("text");
echo "alert('".$text."');";
}
and put this
$this->scheduler->event->attach("afterInsert", "sendEmail");
after
$this->scheduler->event->attach("beforeProcessing", Array($this, "set_event_user"));
But it doesn’t work, i need this to send an email after event creation and to change the select query to events.
Thanks in advance
You code may work, but you will not see your echo output in any case.
PHP code elliminates any not expected output, to prevent xml data corruption. Use error_log or mail commands instead of echo.