I am working on a bit of a modification/addition for my site and I am in need of some help. I am building a script that will be cronned and will insert events into the calendar every day. I have the script built and the insert query working however for some reason the even does not show in the calendar. I can access the event via the url for the eventid and it works fine, and I can edit the event and it will then show in the calendar. So I am missing something that needs to happen in addition to the INSERT into the event table.
To complicate matters, I can't find where the existing functions are for the event creation in the files. I am looked through calendar.php, class_dm_event and functions_calendar and can't find a single insert there anywhere.
Code:
$vbulletin->db->query_write("
INSERT INTO " . TABLE_PREFIX ."event (eventid, userid, event, title, allowsmilies, recurring, recuroption, calendarid, customfields, visible, dateline, utc, dst, dateline_from, dateline_to)
VALUES ('', '1', 'Open', '" . $day1post1title . "', '1', '0', '', '5', NULL, '1', '" . $day1 . "', '0.00', '0', '" . $day1 . "', '0')
");
Again, this inserts the event into the database just fine, but the event will not show on the calendar until it is edited via the UI. Thoughts?
--------------- Added [DATE]1273603886[/DATE] at [TIME]1273603886[/TIME] ---------------
Entering a row directly to the database does the same thing. So it must be some cache function I am missing or something.