Wednesday, 16 March 2016
  13 Replies
  2.3K Visits
0
Votes
Undo
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.
Wednesday, 16 March 2016 15:48
·
#167538
0
Votes
Undo
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:51
·
#167539
0
Votes
Undo
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:54
·
#167540
0
Votes
Undo
What is your data source?
Wednesday, 16 March 2016 15:58
·
#167541
0
Votes
Undo
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 16:02
·
#167542
0
Votes
Undo
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 17:29
·
#167543
0
Votes
Undo
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:36
·
#167544
0
Votes
Undo
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);
Thursday, 17 March 2016 02:46
·
#167545
0
Votes
Undo
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 10:46
·
#167546
0
Votes
Undo
Joomla may have cached the database table columns - did you clear the Joomla cache files?
Thursday, 17 March 2016 11:06
·
#167547
0
Votes
Undo
Yes cleared all cache files. Thanks.
Wednesday, 01 June 2016 18:56
·
#167548
0
Votes
Undo
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 20:58
·
#167549
0
Votes
Undo
Thursday, 02 June 2016 09:41
·
#167550
0
Votes
Undo
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.
  • Page :
  • 1
There are no replies made for this post yet.