Wednesday, 10 April 2019
  1 Replies
  847 Visits
0
Votes
Undo
I am creating a simple Reservation Booking site using JEvents. I want the user to select dates from the calendar and when the event is saved I'd like to trigger a PHP script that makes API calls to a pricing site and return the results for user approval.

I've got the API and am working on the module to support it. What I need to know is does JEvents have a way to make the call to my code when an event is created?

Thank you....
6 years ago
·
#210144
0
Votes
Undo
Hello,

Is this post creation or pre-creation? In essenance yes, you can create a Plugin and hook it in. See:

For pre-creation


$dispatcher = JEventDispatcher::getInstance();
JPluginHelper::importPlugin("jevents");
$res = $dispatcher->trigger( 'onBeforeSaveEvent' , array(&$array, &$rrule, $dryrun));


For post-creation:


$dispatcher = JEventDispatcher::getInstance();
JPluginHelper::importPlugin("jevents");
$res = $dispatcher->trigger( 'onAfterSaveEvent' , array(&$vevent, false));



Many thanks
Tony

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!Join the JEvents club today!

  • Page :
  • 1
There are no replies made for this post yet.

Members Area

Show your support

Unlike many Joomla calendars we do not charge to download JEvents - please show your support for this project by becoming a member of the JEvents Club Club members get access to early releases, exclusive member support forums, and Silver and Gold members can use many exciting JEvents addons

Your membership will ensure that JEvents continues to be the best events calendar for Joomla.