By zshanthi on Wednesday, 16 March 2016
Replies 13
Likes 0
Views 1.9K
Votes 0
Hello

Is there an API reference document for jevents?
I'm looking to add an event programmatically in joomla 3 to the jevents calendar?
Think of it as a single line import of jevents.
You can use an iCal or CSV import either from a file or a URL - that is probably the easiest approach. See https://www.jevents.net/frequently-aske ... csv-format
·
Wednesday, 16 March 2016 15:48
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks . So are you talking about manually logging in and doing the CSV import ? I am looking for ways to programmatically add a new jevents event to a calendar ? Is it possible ?
·
Wednesday, 16 March 2016 15:51
·
0 Likes
·
0 Votes
·
0 Comments
·
What is your data source?
·
Wednesday, 16 March 2016 15:54
·
0 Likes
·
0 Votes
·
0 Comments
·
Actually it is dynamically generated based on user input in joomla3, so I need help where I can find API to jevents so that maybe I can call that function like add_new_event(...) or something like that.
·
Wednesday, 16 March 2016 15:58
·
0 Likes
·
0 Votes
·
0 Comments
·
You could take a look at the file administrator/components/com_jevents/libraries/saveIcalEvent.php - it isn't designed as an API function but you may be able to adapt it to your needs.
·
Wednesday, 16 March 2016 16:02
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks a lot indeed. I was able to forge ahead but now I'm getting stuck at

Unknown column 'data' in 'field list' SQL=INSERT INTO `hwe_jevents_rrule` (`data`,`freq`,`eventid`,`until`,`untilraw`,`count`,`rinterval`,`bysecond`,`byminute`,`byhour`,`byday`,`bymonthday`,`byyearday`,`byweekno`,`bymonth`,`bysetpos`,`wkst`,`irregulardates`) VALUES ('','','24','1607839199','','9999','1','','','','','','','','','','','\"\"')
·
Wednesday, 16 March 2016 17:29
·
0 Likes
·
0 Votes
·
0 Comments
·
Here is the actual code I'm using

$lang = JFactory::getLanguage();
$lang->load("com_jevents", JPATH_SITE);
$lang->load("com_jevents", JPATH_ADMINISTRATOR);

include_once(JPATH_SITE . "/components/com_jevents/jevents.defines.php");

$params = JComponentHelper::getParams("com_jevents");
$array = array();
$array['publish_down'] = '2016-03-25';
$array['publish_up'] = '2016-03-23';
$array['freq'] = 'NONE';
$array['title'] = "test test";
$array['jev_creatorid'] = 111;//
$array['ics_id'] = 1;//default calendar
$array['catid'] = 17;// default category
$array['access'] = 8; //usegroup
$array['state'] = 1; // published
$array['jevtype'] = 'icaldb';
$array['evid'] = 0;
$array['rp_id'] = -1;
$db = JFactory::getDBO();
$dataModel = new JEventsDataModel("JEventsAdminDBModel");
$queryModel = new JEventsDBModel($dataModel);
$rrule = SaveIcalEvent::generateRRule($array);

$event = SaveIcalEvent::save($array, $queryModel, $rrule);
·
Wednesday, 16 March 2016 17:36
·
0 Likes
·
0 Votes
·
0 Comments
·
I completely uninstalled and deleted the mysql tables of jEvents and then installed new, i.e the tables were created new but still I get the error Unknown column 'data' in 'field list' . Is the table definition of rrule cached somewhere ?
·
Thursday, 17 March 2016 02:46
·
0 Likes
·
0 Votes
·
0 Comments
·
Joomla may have cached the database table columns - did you clear the Joomla cache files?
·
Thursday, 17 March 2016 10:46
·
0 Likes
·
0 Votes
·
0 Comments
·
Yes cleared all cache files. Thanks.
·
Thursday, 17 March 2016 11:06
·
0 Likes
·
0 Votes
·
0 Comments
·
I am logged in as a Bronze member but when I click on the link at the bottom of frequently-asked-questions/importing-events-in-csv-format it just brings me to the Join club page: /join-club-jevents

How do i get the csv file?
·
Wednesday, 01 June 2016 18:56
·
0 Likes
·
0 Votes
·
0 Comments
·
This other link I found does not work for me either: jevents.net/en/downloads/category/40-sample-files?download=183%3Acsv-import-sample-file
·
Wednesday, 01 June 2016 20:58
·
0 Likes
·
0 Votes
·
0 Comments
·
I am logged in as a Bronze member but when I click on the link at the bottom of frequently-asked-questions/importing-events-in-csv-format it just brings me to the Join club page: /join-club-jevents

How do i get the csv file?

Are you sure you are logged in when you try to download this file - I can access it with no problems.
·
Thursday, 02 June 2016 09:41
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post