'all_day', elgg_echo('event_calendar:schedule_type:fixed')=>'fixed', ); if (elgg_plugin_exists('event_poll')) { $schedule_options = array_merge(array(elgg_echo('event_calendar:schedule_type:poll')=>'poll'),$schedule_options); } $event_calendar_fewer_fields = elgg_get_plugin_setting('fewer_fields', 'event_calendar'); $event_calendar_repeating_events = elgg_get_plugin_setting('repeating_events', 'event_calendar'); $event_calendar_region_display = elgg_get_plugin_setting('region_display', 'event_calendar'); $event_calendar_type_display = elgg_get_plugin_setting('type_display', 'event_calendar'); $event_calendar_spots_display = elgg_get_plugin_setting('spots_display', 'event_calendar'); $event_calendar_more_required = elgg_get_plugin_setting('more_required', 'event_calendar'); $event_calendar_bbb_server_url = elgg_get_plugin_setting('bbb_server_url', 'event_calendar'); if ($event_calendar_more_required == 'yes') { $required_fields = array('title','venue','start_date','start_time', 'brief_description','region','event_type','fees','contact','organiser', 'event_tags','spots'); } else { $required_fields = array('title','venue','start_date'); } $all_fields = array('title','venue','start_time','start_date','end_time','end_date', 'brief_description','region','event_type','fees','contact','organiser','event_tags', 'long_description','spots','personal_manage'); $prefix = array(); foreach ($all_fields as $fn) { if (in_array($fn,$required_fields)) { $prefix[$fn] = elgg_echo('event_calendar:required').' '; } else { $prefix[$fn] = elgg_echo('event_calendar:optional').' '; } } if ($event) { $event_action = 'manage_event'; $event_guid = $event->guid; } else { $event_action = 'add_event'; $event_guid = 0; } $title = $fd['title']; $brief_description = $fd['description']; $venue = $fd['venue']; $fees = $fd['fees']; if ($event_calendar_spots_display) { $spots = $fd['spots']; } if ($event_calendar_region_display) { $region = $fd['region']; } if ($event_calendar_type_display) { $event_type = $fd['event_type']; } $contact = $fd['contact']; $organiser = $fd['organiser']; $event_tags = $fd['tags']; $all_day = $fd['all_day']; $schedule_type = $fd['schedule_type']; $long_description = $fd['long_description']; $body = '
'; $body .= elgg_view("input/text",array('name' => 'title','class'=>'event-calendar-medium-text','value'=>$title)); $body .= '
'; $body .= ''.$prefix['title'].elgg_echo('event_calendar:title_description').'
'; $body .= ''; $body .= elgg_view("input/text",array('name' => 'venue','class'=>'event-calendar-medium-text','value'=>$venue)); $body .= '
'; $body .= ''.$prefix['venue'].elgg_echo('event_calendar:venue_description').'
'; if ($event_calendar_fewer_fields != 'yes') { $body .= ''; $body .= elgg_view("input/text",array('name' => 'description','class'=>'event-calendar-medium-text','value'=>$brief_description)); $body .= '
'; $body .= ''.$prefix['brief_description'].elgg_echo('event_calendar:brief_description_description').'
'; } else { $body .= ''; $body .= elgg_view("input/longtext",array('name' => 'long_description','class'=>'event-calendar-long-text','value'=>$long_description)); $body .= '
'; $body .= ''.$prefix['long_description'].elgg_echo('event_calendar:long_description_description').'
'; } $body .= ''; $body .= elgg_view("input/tags",array('name' => 'tags','class'=>'event-calendar-medium-text','value'=>$event_tags)); $body .= '
'; $body .= ''.$prefix['event_tags'].elgg_echo('event_calendar:event_tags_description').'
'; if ($event || !$vars['group_guid']) { $body .= ''; $body .= elgg_view('event_calendar/container',array('container_guid'=>$vars['group_guid'])); $body .= '
'; $body .= ''.$prefix['calendar'].elgg_echo('event_calendar:calendar_description').'
'; } else { $body .= elgg_view('input/hidden',array('name'=>'group_guid', 'value'=>$vars['group_guid'])); } if($event_calendar_bbb_server_url) { $body .= ''; if ($fd['web_conference']) { $body .= elgg_view('input/checkbox',array('name'=>'web_conference','value'=>1,'checked'=>'checked')); } else { $body .= elgg_view('input/checkbox',array('name'=>'web_conference','value'=>1)); } $body .= elgg_echo('event_calendar:web_conference_label'); $body .= '
'; } $body .= ''.$prefix['spots'].elgg_echo('event_calendar:spots_description').'
'; } $body .= ''; $body .= ''; $body .= elgg_view("input/dropdown",array('name' => 'region','value'=>$region,'options_values'=>$options)); $body .= '
'; $body .= ''.$prefix['region'].elgg_echo('event_calendar:region_description').'
'; } } if ($event_calendar_type_display == 'yes') { $type_list = trim(elgg_get_plugin_setting('type_list', 'event_calendar')); $type_list_handles = elgg_get_plugin_setting('type_list_handles', 'event_calendar'); // make sure that we are using Unix line endings $type_list = str_replace("\r\n","\n",$type_list); $type_list = str_replace("\r","\n",$type_list); if ($type_list) { $options = array(); $options[] = '-'; foreach(explode("\n",$type_list) as $type_item) { $type_item = trim($type_item); if ($type_list_handles == 'yes') { $options[$type_item] = elgg_echo('event_calendar:type:'.$type_item); } else { $options[$type_item] = $type_item; } } $body .= ''; $body .= elgg_view("input/dropdown",array('name' => 'event_type','value'=>$event_type,'options_values'=>$options)); $body .= '
'; $body .= ''.$prefix['event_type'].elgg_echo('event_calendar:type_description').'
'; } } if ($event_calendar_fewer_fields != 'yes') { $body .= ''; $body .= elgg_view("input/text",array('name' => 'fees','class'=>'event-calendar-medium-text','value'=>$fees)); $body .= '
'; $body .= ''.$prefix['fees'].elgg_echo('event_calendar:fees_description').'
'; $body .= ''; $body .= elgg_view("input/text",array('name' => 'contact','class'=>'event-calendar-medium-text','value'=>$contact)); $body .= '
'; $body .= ''.$prefix['contact'].elgg_echo('event_calendar:contact_description').'
'; $body .= ''; $body .= elgg_view("input/text",array('name' => 'organiser','class'=>'event-calendar-medium-text','value'=>$organiser)); $body .= '
'; $body .= ''.$prefix['organiser'].elgg_echo('event_calendar:organiser_description').'
'; $body .= ''; $body .= elgg_view("input/longtext",array('name' => 'long_description','class'=>'event-calendar-long-text','value'=>$long_description)); $body .= '
'; $body .= ''.$prefix['long_description'].elgg_echo('event_calendar:long_description_description').'
'; } $body .= '