Beispiel #1
0
 /**
  * Standard modular run function for newsletter hooks.
  *
  * @return ?array				Tuple of result details: HTML list of all types that can be choosed, title for selection list (NULL: disabled)
  */
 function choose_categories()
 {
     if (!addon_installed('calendar')) {
         return NULL;
     }
     require_lang('calendar');
     require_code('calendar');
     return array(nice_get_event_types(), do_lang('CALENDAR'));
 }
Beispiel #2
0
 /**
  * UI to display export screen fields
  *
  * @return tempcode		The UI
  */
 function export_ical()
 {
     $title = get_page_title('EXPORT_ICAL');
     $fields = new ocp_tempcode();
     $type_list = nice_get_event_types();
     //Add all cal option
     $type_list->attach(form_input_list_entry('0', true, 'All types'));
     $fields->attach(form_input_list(do_lang_tempcode('TYPE'), do_lang_tempcode('DESCRIPTION_EVENT_TYPE'), 'type_filter', $type_list));
     $post_url = build_url(array('page' => '_SELF', 'type' => '_export'), '_SELF');
     $submit_name = do_lang_tempcode('EXPORT_ICAL');
     return do_template('FORM_SCREEN', array('TITLE' => $title, 'TEXT' => do_lang_tempcode('EXPORT_ICAL_TEXT'), 'HIDDEN' => '', 'FIELDS' => $fields, 'SUBMIT_NAME' => $submit_name, 'URL' => $post_url, 'GET' => true));
 }