Email notification of a schedule event?

I just installed scheduler on a website for wife’s Pilates business. Great extension!

I was wondering if there is a way to have the joomla server send an email when an appointment is scheduled?

Thank you

In current version it can be done only through code customization
We plan to include it as one of standard features in next version ( probably in September’s release )

Any chance on getting a quick how to on that. This components is great, but not sure why you would leave out a notification. You tell me what files to modify, and what to modify I shouldn’t have a problem doing myself…Thanks!

You should modify file
components/com_scheduler/codebase/dhtmlxSchedulerConfigurator.php:

  1. edit getEventsRec method:
public function getEventsRec($usertype) {
...
	$this->scheduler = new schedulerConnector($this->connection);
	$this->scheduler->event->attach("afterInsert", Array($this, "send_notification"));
...
  1. add method send_notification in this class:
	protected function replaceHostInURL($url) {
		$url_parsed = parse_url($url);
		$host = $_SERVER['SERVER_NAME'];
		$url = preg_replace("/".preg_quote($url_parsed['host'])."/", $host, $url, 1);
		return $url;
	}

	public function send_notification($action) {
		// send notification code is here
		// you may take information about event from $action object
		// Learn more how use DataAction object
		// http://docs.dhtmlx.com/doku.php?id=dhtmlxconnector:dataaction_object
	}

}

?>

Has a feature been added to the Wordpress plugin yet? If not, can either of you share exactly how you enabled this through Wordpress files. Many thanks in advance.

Hi, this feature hasn’t been added to plugin.
My previous post explains how to implement it yourself.
You have just to write code which will sent email inside send_notification method.

Thanks! Unfortunately, I don’t know how to do the last part.

Any ideas when this will be implemented in the plugin?

Try to use something like this:

function email_friends()  {
    // take users using wordpress api and generate emails list
    $friends = 'bob@example.org,susie@example.org';

    // now you may use php function to send email.
    mail($friends, "email subject is here", "email text is here");
}

Hello!

I can’t get this to work. Is it possible to paste in all the code I need to add in dhtmlxSchedulerConfigurator.php?

BR,
omhelland

Hello!
Where I can insert this function to send email even when a event is edited or deleted?

Thank you!

The above code snippets do not contain full solution.
You need to

a) edit getEventsRec method:

public function getEventsRec($usertype) { ... $this->scheduler = new schedulerConnector($this->connection); //add the next line $this->scheduler->event->attach("afterInsert", Array($this, "send_notification")); ...

  1. in same file add method send_notification in this class:

[code] public function send_notification($action) {
$id = $action->get_id();
$start_date = $action->get_value(“start_date”);
//similar for end_date, text and any other custom propety which you are using in lightbox

  // send notification code is here

}
[/code]

Send Notification code is need to be written according to your goals
?>

Help me.
Sorry, I’m Italian and I do not understand English well.
The code for joomla shown in item 1) for email notification, I’ve tried but I can not.
I do not understand the steps.
I’m not good in php language.
If I send you my file dhtmlxSchedulerConfigurator.php, could you help me to fill it in?
Tanks