- Posts: 2
- Thank you received: 0
create event programatically
- Enrique Alvarez
- Topic Author
- Offline
- New Member
-
Less
More
3 years 2 months ago #149341
by Enrique Alvarez
create event programatically was created by Enrique Alvarez
Hi,
is it possible to create an event programmatically?
In other words, a different extension of Joomla executes a PHP snippet code that creates an event using the capabilities of 'Events booking'
Thanks
is it possible to create an event programmatically?
In other words, a different extension of Joomla executes a PHP snippet code that creates an event using the capabilities of 'Events booking'
Thanks
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
3 years 2 months ago #149354
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic create event programatically
Having new year holiday in our country at the moment, so I could not test it carefully. However, I think something like below should work:
Code:
require_once JPATH_ADMINISTRATOR . '/components/com_eventbooking/libraries/rad/bootstrap.php';
$data = [
'title' => 'Event Title',
'event_date' => '2022-12-01',
'main_category_id' => 10,
'price' => 100,
'short_description' => 'Short Description Of Event',
'description' => 'Description Of Event',
];
$input = new RADInput($data);
JLoader::register('EventbookingModelEvent', JPATH_ADMINISTRATOR . '/components/com_eventbooking/model/event.php');
/* @var EventbookingModelEvent $model */
$model = RADModel::getTempInstance('Event', 'EventbookingModel');
$model->store($input);
Please Log in or Create an account to join the conversation.
- Enrique Alvarez
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 2
- Thank you received: 0
3 years 2 months ago #149360
by Enrique Alvarez
Replied by Enrique Alvarez on topic create event programatically
happy holidays!
that's great,
- can you add a photo to the event with this?
- and an organizer?
We would like our organizer to be able to see the list of registrants and to send emails and communicate. Would that be possible with your solution?
Thanks
that's great,
- can you add a photo to the event with this?
- and an organizer?
We would like our organizer to be able to see the list of registrants and to send emails and communicate. Would that be possible with your solution?
Thanks
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
3 years 2 months ago #149477
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic create event programatically
Hello Enrique
1. You cannot add photo to event because we do not have code to handle upload and resize images by passing data like that.
2. For organizer, we do not have organizer concept in the extension. So this is not possible, too
Regards,
Tuan
1. You cannot add photo to event because we do not have code to handle upload and resize images by passing data like that.
2. For organizer, we do not have organizer concept in the extension. So this is not possible, too
Regards,
Tuan
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
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.
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.