Sunday, 05 November 2017
  2 Replies
  2.8K Visits
0
Votes
Undo
Hello,

I try to create a JEvents from an other component ?

For the others event component, I use this type of code :

\JModelLegacy::addIncludePath(JPATH_SITE . '/administrator/components/com_yyy/models', 'XXXModel');
\JLoader::import('components.com_yyy.helpers.yyy', JPATH_ADMINISTRATOR);
\JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_yyy/tables');

$ev_model = \JModelLegacy::getInstance('Event', 'XXXX');
$ev_model->save($e);


In Jevents, i didn't find the same structure.

COuld you help me ?
7 years ago
·
#195112
0
Votes
Undo
Thanks.

So you use in admin $vevent = iCalEvent::iCalEventFromData($data); to store an event through iCalEvent in site.

I understand that is not possible in one line but all the data aren't mandatory ;-)


Many thanks, I'm going to wrok on it :)
7 years ago
·
#195108
0
Votes
Undo
You need to defined a LOT of data to create an event - dates, times, descriptions, title, category, calendar, repeat pattern, location, contact etc. so a simple one line function isn't possible.

I would suggest you take a look at the save method of the icalevent.php controller in the backend for ideas on how you could code this up

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!

  • 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.