/** * Creates the output for the details view * * @since 2.0 */ function display($tpl = null) { $mainframe =& JFactory::getApplication(); $id = JRequest::getInt('id'); $settings = redEVENTHelper::config(); // Get data from the model $row = $this->get('Details'); // initiate new CALENDAR $vcal = redEVENTHelper::getCalendarTool(); $vcal->setProperty('unique_id', 'session' . $row->xref . '@' . $mainframe->getCfg('sitename')); $vcal->setConfig("filename", "event" . $row->xref . ".ics"); redEVENTHelper::icalAddEvent($vcal, $row); $vcal->returnCalendar(); // generate and redirect output to user browser // echo $vcal->createCalendar(); // debug $mainframe->close(); }
/** * Creates the raw output for the simplelist view * * @since 2.0 */ function display($tpl = null) { $mainframe =& JFactory::getApplication(); $settings = redEVENTHelper::config(); // Get data from the model $model = $this->getModel(); $model->setLimit($settings->get('ical_max_items', 100)); $model->setLimitstart(0); $rows =& $model->getData(); // initiate new CALENDAR $vcal = redEVENTHelper::getCalendarTool(); $vcal->setProperty('unique_id', 'allevents@' . $mainframe->getCfg('sitename')); $vcal->setConfig("filename", "events.ics"); foreach ($rows as $row) { redEVENTHelper::icalAddEvent($vcal, $row); } $vcal->returnCalendar(); // generate and redirect output to user browser // echo $vcal->createCalendar(); // debug $mainframe->close(); }