title; $brief_description = $event->description; $venue = $event->venue; // this is a form redisplay, so take the values as submitted $start_date = $event->start_date; $end_date = $event->end_date; if ($event_calendar_region_display) { $region = $event->region; if (!$region) { $region = '-'; } } if ($event_calendar_spots_display) { $spots = trim($event->spots); } if ($event_calendar_type_display) { $event_type = $event->event_type; if (!$event_type) { $event_type = '-'; } } $fees = $event->fees; $contact = $event->contact; $organiser = $event->organiser; $event_tags = $event->event_tags; $long_description = $event->long_description; $access = $event->access_id; if ($event_calendar_times == 'yes') { $start_time = $event->start_time; $end_time = $event->end_time; } $event_action = 'manage_event'; $event_guid = $event->guid; } else { $title = $fd['title']; $brief_description = $fd['description']; $venue = $fd['venue']; $start_date = $fd['start_date']; $end_date = $fd['end_date']; $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['event_tags']; $long_description = $fd['long_description']; $access = $fd['access_id']; if ($event_calendar_times == 'yes') { $start_time = $fd['start_time']; $end_time = $fd['end_time']; } $event_action = 'add_event'; $event_guid = 0; } $body = ''; $body .= elgg_view('input/hidden',array('name'=>'event_action', 'value'=>$event_action)); $body .= elgg_view('input/hidden',array('name'=>'event_guid', 'value'=>$event_guid)); $body .= elgg_view('input/hidden',array('name'=>'group_guid', 'value'=>$vars['group_guid'])); $body .= '
'; $body .= ''.$prefix['title'].elgg_echo('event_calendar:title_description').'
'; $body .= ''; $body .= ''.$prefix['venue'].elgg_echo('event_calendar:venue_description').'
'; if ($event_calendar_times == 'yes') { $body .= '
';
$body .= elgg_view("input/timepicker",array('name' => 'start_time','value'=>$start_time));
$body .= '
'.$prefix['start_time'].elgg_echo('event_calendar:start_time_description').'
'; } $body .= ''; $body .= ''.$prefix['start_date'].elgg_echo('event_calendar:start_date_description').'
'; if ($event_calendar_hide_end != 'yes') { if ($event_calendar_times == 'yes') { $body .= '
';
$body .= elgg_view("input/timepicker",array('name' => 'end_time','value'=>$end_time));
$body .= '
'.$prefix['end_time'].elgg_echo('event_calendar:end_time_description').'
'; } $body .= ''; $body .= ''.$prefix['end_date'].elgg_echo('event_calendar:end_date_description').'
'; } if ($event_calendar_spots_display == 'yes') { $body .= ''; $body .= ''.$prefix['spots'].elgg_echo('event_calendar:spots_description').'
'; } // the following feature has been superceded by the manage subscribers feature /*if ($event_calendar_add_users == 'yes') { $body .= ''.elgg_echo('event_calendar:add_user_description').'
'; }*/ $body .= ''; $body .= ''.$prefix['brief_description'].elgg_echo('event_calendar:brief_description_description').'
'; if ($event_calendar_region_display == 'yes') { $region_list = trim(elgg_get_plugin_setting('region_list', 'event_calendar')); $region_list_handles = elgg_get_plugin_setting('region_list_handles', 'event_calendar'); // make sure that we are using Unix line endings $region_list = str_replace("\r\n","\n",$region_list); $region_list = str_replace("\r","\n",$region_list); if ($region_list) { $options = array(); $options[] = '-'; foreach(explode("\n",$region_list) as $region_item) { $region_item = trim($region_item); if ($region_list_handles == 'yes') { $options[$region_item] = elgg_echo('event_calendar:region:'.$region_item); } else { $options[$region_item] = $region_item; } } $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 .= ''.$prefix['event_type'].elgg_echo('event_calendar:type_description').'
'; } } $body .= ''; $body .= ''.$prefix['fees'].elgg_echo('event_calendar:fees_description').'
'; $body .= ''; $body .= ''.$prefix['contact'].elgg_echo('event_calendar:contact_description').'
'; $body .= ''; $body .= ''.$prefix['organiser'].elgg_echo('event_calendar:organiser_description').'
'; $body .= ''; $body .= ''.$prefix['event_tags'].elgg_echo('event_calendar:event_tags_description').'
'; $body .= ''; $body .= ''.$prefix['long_description'].elgg_echo('event_calendar:long_description_description').'
'; if($event_calendar_hide_access == 'yes') { $event_calendar_default_access = elgg_get_plugin_setting('default_access', 'event_calendar'); if($event_calendar_default_access) { $body .= elgg_view("input/hidden",array('name' => 'access_id','value'=>$event_calendar_default_access)); } else { $body .= elgg_view("input/hidden",array('name' => 'access_id','value'=>ACCESS_PRIVATE)); } } else { $body .= ''; } $body .= elgg_view('input/submit', array('name'=>'submit','value'=>elgg_echo('event_calendar:submit'))); echo $body;