From 0b25adcd921149b50845647980284e8ab66d8fed Mon Sep 17 00:00:00 2001 From: Kevin Jardine Date: Tue, 3 Apr 2012 12:31:42 +0200 Subject: major changes to add new features, including a full calendar and repeating events --- views/default/plugins/event_calendar/settings.php | 44 +++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'views/default/plugins/event_calendar/settings.php') diff --git a/views/default/plugins/event_calendar/settings.php b/views/default/plugins/event_calendar/settings.php index 93724484c..908818998 100644 --- a/views/default/plugins/event_calendar/settings.php +++ b/views/default/plugins/event_calendar/settings.php @@ -79,6 +79,28 @@ $body .= elgg_view('input/radio',array('name'=>'params[listing_format]','value'= $body .= '
'; +$event_calendar_repeated_events = elgg_get_plugin_setting('repeated_events', 'event_calendar'); +if (!$event_calendar_repeated_events) { + $event_calendar_repeated_events = 'no'; +} + +$body .= elgg_echo('event_calendar:settings:repeated_events:title'); +$body .= '
'; +$body .= elgg_view('input/radio',array('name'=>'params[repeated_events]','value'=>$event_calendar_repeated_events,'options'=>$yn_options)); + +$body .= '
'; + +$event_calendar_reminders = elgg_get_plugin_setting('reminders', 'event_calendar'); +if (!$event_calendar_reminders) { + $event_calendar_reminders = 'no'; +} + +$body .= elgg_echo('event_calendar:settings:reminders:title'); +$body .= '
'; +$body .= elgg_view('input/radio',array('name'=>'params[reminders]','value'=>$event_calendar_reminders,'options'=>$yn_options)); + +$body .= '
'; + $event_calendar_times = elgg_get_plugin_setting('times', 'event_calendar'); if (!$event_calendar_times) { $event_calendar_times = 'yes'; @@ -90,6 +112,17 @@ $body .= elgg_view('input/radio',array('name'=>'params[times]','value'=>$event_c $body .= '
'; +$event_calendar_restricted_times = elgg_get_plugin_setting('restricted_times', 'event_calendar'); +if (!$event_calendar_restricted_times) { + $event_calendar_restricted_times = 'no'; +} + +$body .= elgg_echo('event_calendar:settings:restricted_times:title'); +$body .= '
'; +$body .= elgg_view('input/radio',array('name'=>'params[restricted_times]','value'=>$event_calendar_restricted_times,'options'=>$yn_options)); + +$body .= '
'; + $event_calendar_time_format = elgg_get_plugin_setting('timeformat', 'event_calendar'); if (!$event_calendar_time_format) { $event_calendar_time_format = '24'; @@ -158,6 +191,17 @@ $body .= elgg_view('input/radio',array('name'=>'params[venue_view]','value'=>$ev $body .= '
'; +$event_calendar_fewer_fields = elgg_get_plugin_setting('fewer_fields', 'event_calendar'); +if (!$event_calendar_fewer_fields) { + $event_calendar_fewer_fields = 'no'; +} + +$body .= elgg_echo('event_calendar:settings:fewer_fields:title'); +$body .= '
'; +$body .= elgg_view('input/radio',array('name'=>'params[fewer_fields]','value'=>$event_calendar_fewer_fields,'options'=>$yn_options)); + +$body .= '
'; + $options = array(elgg_echo('event_calendar:settings:no')=>'no', elgg_echo('event_calendar:settings:site_calendar:admin')=>'admin', elgg_echo('event_calendar:settings:site_calendar:loggedin')=>'loggedin', -- cgit v1.2.3 From 872381995dbcd77b90ac5175ffc7ba51ec75c42a Mon Sep 17 00:00:00 2001 From: Kevin Jardine Date: Thu, 26 Apr 2012 16:21:00 +0200 Subject: Merges in BBB web conference functionality from now defunct sched_conf plugin --- languages/en.php | 10 +++ models/model.php | 79 ++++++++++++++++++++-- views/default/event_calendar/conference_button.php | 32 +++++++++ views/default/forms/event_calendar/edit.php | 9 ++- views/default/object/event_calendar.php | 4 ++ views/default/plugins/event_calendar/settings.php | 26 +++++++ 6 files changed, 152 insertions(+), 8 deletions(-) create mode 100644 views/default/event_calendar/conference_button.php (limited to 'views/default/plugins/event_calendar/settings.php') diff --git a/languages/en.php b/languages/en.php index d4cb8ac9e..e23d78924 100644 --- a/languages/en.php +++ b/languages/en.php @@ -318,6 +318,16 @@ takes place at You can visit the event page here: %s ", + + /** + * BBB support + */ + + 'event_calendar:bbb_server_url' => "Big Blue Button server URL (must end with slash)", + 'event_calendar:bbb_security_salt' => "Big Blue Button security salt", + 'event_calendar:bbb_create_error' => "Error: unable to create BBB conference, message was: %s", + 'event_calendar:bbb_settings_error' => "Error: must set conference URL and salt in plugin settings", + 'event_calendar:join_conf_button' => "Join conference", /** * Event calendar river diff --git a/models/model.php b/models/model.php index 0dd72a595..cf00c4b1c 100644 --- a/models/model.php +++ b/models/model.php @@ -152,6 +152,7 @@ function event_calendar_set_event_from_form($event_guid,$group_guid) { $event->send_reminder = get_input('send_reminder'); $event->reminder_number = get_input('reminder_number'); $event->reminder_interval = get_input('reminder_interval'); + $event->web_conference = get_input('web_conference'); $event->real_end_time = event_calendar_get_end_time($event); foreach ($required_fields as $fn) { if (!trim($event->$fn)) { @@ -160,6 +161,9 @@ function event_calendar_set_event_from_form($event_guid,$group_guid) { } } if ($event->save()) { + if (!$event_guid && $event->web_conference) { + event_calendar_create_bbb_conf($event); + } if ($group_guid && (elgg_get_plugin_setting('autogroup', 'event_calendar') == 'yes')) { event_calendar_add_personal_events_from_group($event->guid,$group_guid); } @@ -173,12 +177,12 @@ function event_calendar_set_event_from_form($event_guid,$group_guid) { event_calendar_add_personal_event($event->guid,$user_id); if (elgg_get_plugin_setting('add_users_notify', 'event_calendar') == 'yes') { notify_user($user_id, $CONFIG->site->guid, elgg_echo('event_calendar:add_users_notify:subject'), - sprintf( - elgg_echo('event_calendar:add_users_notify:body'), - $user->name, - $event->title, - $event->getURL() - ) + sprintf( + elgg_echo('event_calendar:add_users_notify:body'), + $user->name, + $event->title, + $event->getURL() + ) ); } } @@ -1598,6 +1602,7 @@ function event_calendar_prepare_edit_form_vars($event = NULL) { 'event-calendar-repeating-saturday-value' => 0, 'event-calendar-repeating-sunday-value' => 0, 'personal_manage' => 'open', + 'web_conference' => NULL, 'long_description' => NULL, 'access_id' => ACCESS_DEFAULT, 'group_guid' => NULL, @@ -2210,3 +2215,65 @@ function event_calendar_queue_reminder($e) { message_queue_set_for_sending($m->guid); } } + +function event_calendar_create_bbb_conf($event) { + $bbb_security_salt = elgg_get_plugin_setting('bbb_security_salt','event_calendar'); + $bbb_server_url = rtrim(elgg_get_plugin_setting('bbb_server_url','event_calendar'), '/') . '/'; + if ($bbb_security_salt) { + $day_in_minutes = 60*24; + $duration = (int)(($event->real_end_time-$event->start_date)/60)+$day_in_minutes; + $title = urlencode($event->title); + $params = "name=$title&meetingID={$event->guid}&duration=$duration"; + $checksum = sha1('create'.$params.$bbb_security_salt); + $params .= "&checksum=$checksum"; + + // create curl resource + $ch = curl_init(); + + // set url + curl_setopt($ch, CURLOPT_URL, $bbb_server_url.'api/create?'.$params); + + //return the transfer as a string + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + + // $output contains the output string + $output = curl_exec($ch); + + // close curl resource to free up system resources + curl_close($ch); + + /*error_log("BBB create request:"); + error_log($bbb_server_url.'api/create?'.$params); + + error_log("BBB create response:"); + error_log($output);*/ + + $xml = new SimpleXMLElement($output); + if ($xml->returncode == 'SUCCESS') { + $event->bbb_attendee_password = (string) $xml->attendeePW; + $event->bbb_moderator_password = (string) $xml->moderatorPW; + } else { + register_error(elgg_echo('event_calendar:bbb_create_error',array($xml->message))); + } + } else { + register_error(elgg_echo('event_calendar:bbb_settings_error')); + } +} + +function event_calendar_get_join_bbb_url($event) { + $bbb_security_salt = elgg_get_plugin_setting('bbb_security_salt','event_calendar'); + $bbb_server_url = rtrim(elgg_get_plugin_setting('bbb_server_url','event_calendar'), '/') . '/'; + $user = elgg_get_logged_in_user_entity(); + $full_name = urlencode($user->name); + if ($event->canEdit()) { + $password = urlencode($event->bbb_moderator_password); + } else { + $password = urlencode($event->bbb_attendee_password); + } + $params = "fullName=$full_name&meetingID={$event->guid}&userID={$user->username}&password=$password"; + $checksum = sha1('join'.$params.$bbb_security_salt); + $params .= "&checksum=$checksum"; + $url = $bbb_server_url.'api/join?'.$params; + return $url; +} + diff --git a/views/default/event_calendar/conference_button.php b/views/default/event_calendar/conference_button.php new file mode 100644 index 000000000..f6fedf4f6 --- /dev/null +++ b/views/default/event_calendar/conference_button.php @@ -0,0 +1,32 @@ +real_end_time + 60*60*24; + if ($termination_time < time()) { + $in_time_window = FALSE; + } else if ($event->canEdit()) { + $in_time_window = TRUE; + } else if (event_calendar_has_personal_event($event->guid, $user_guid) && ($event->start_date - 15*60) >= time()) { + $in_time_window = TRUE; + } else { + $in_time_window = FALSE; + } + if ( $in_time_window ) { + $button = elgg_view('output/url', array( + 'href' => event_calendar_get_join_bbb_url($event), + 'text' => elgg_echo('event_calendar:join_conf_button'), + 'class' => 'elgg-button elgg-button-action', + 'target' => '_blank', + )); + + echo '
'.$button.'
'; + } +} diff --git a/views/default/forms/event_calendar/edit.php b/views/default/forms/event_calendar/edit.php index 260e8afe0..79e2a5d0b 100644 --- a/views/default/forms/event_calendar/edit.php +++ b/views/default/forms/event_calendar/edit.php @@ -26,6 +26,7 @@ $event_calendar_more_required = elgg_get_plugin_setting('more_required', 'event_ $event_calendar_personal_manage = elgg_get_plugin_setting('personal_manage', 'event_calendar'); $event_calendar_repeated_events = elgg_get_plugin_setting('repeated_events', 'event_calendar'); $event_calendar_reminders = elgg_get_plugin_setting('reminders', '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', @@ -168,9 +169,13 @@ $body .= elgg_view('event_calendar/container',array('container_guid'=>$vars['con $body .= '

'; $body .= '

'.$prefix['calendar'].elgg_echo('event_calendar:calendar_description').'

'; -if(elgg_plugin_exists('sched_conf')) { +if($event_calendar_bbb_server_url) { $body .= '

'; - $body .= elgg_view('input/checkbox',array('name'=>'web_conference','value'=>$web_conference,'options_values'=>array('1'))); + 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 .= '

'; } diff --git a/views/default/object/event_calendar.php b/views/default/object/event_calendar.php index 717e2803e..b72c869ea 100644 --- a/views/default/object/event_calendar.php +++ b/views/default/object/event_calendar.php @@ -16,6 +16,10 @@ $full = elgg_extract('full_view', $vars, FALSE); if ($full) { $body = elgg_view('event_calendar/strapline',$vars); + if ($event->web_conference) { + $body .= '
'; + $body .= elgg_view('event_calendar/conference_button',array('event'=>$event)); + } $event_items = event_calendar_get_formatted_full_items($event); $body .= '
'; diff --git a/views/default/plugins/event_calendar/settings.php b/views/default/plugins/event_calendar/settings.php index 908818998..2a2e043de 100644 --- a/views/default/plugins/event_calendar/settings.php +++ b/views/default/plugins/event_calendar/settings.php @@ -445,4 +445,30 @@ $body .= elgg_echo('event_calendar:ical_auth_file_name:title'); $body .= '
'; $body .= elgg_view('input/text',array('name'=>'params[ical_auth_file_name]','value'=>$ical_auth_file_name, 'class'=>'event-calendar-ical-auth-setting')); +$body .= '

'; + +$event_calendar_bbb_server_url = elgg_get_plugin_setting('bbb_server_url', 'event_calendar'); + +$body .= elgg_echo('event_calendar:bbb_server_url'); +$body .= '
'; +$body .= elgg_view('input/text', array( + 'name' => 'params[bbb_server_url]', + 'value' => $event_calendar_bbb_server_url, + 'class' => 'text_input', +)); + +$body .= '

'; + +$event_calendar_bbb_security_salt = elgg_get_plugin_setting('bbb_security_salt', 'event_calendar'); + +$body .= elgg_echo('event_calendar:bbb_security_salt'); +$body .= '
'; +$body .= elgg_view('input/text', array( + 'name' => 'params[bbb_security_salt]', + 'value' => $event_calendar_bbb_security_salt, + 'class' => 'text_input', +)); + +$body .= '

'; + echo $body; -- cgit v1.2.3 From f8b9db301d19813725b9f43020a52587b03baadc Mon Sep 17 00:00:00 2001 From: Kevin Jardine Date: Thu, 10 May 2012 16:56:57 +0200 Subject: removed some outdated (pre Elgg 1.8) code and files --- languages/en.php | 4 +- .../default/event_calendar/forms/add_to_group.php | 8 +- .../event_calendar/forms/delete_confirm.php | 13 -- .../default/event_calendar/forms/manage_event.php | 22 -- .../event_calendar/forms/manage_event_content.php | 254 --------------------- views/default/event_calendar/input/date_local.php | 1 - views/default/event_calendar/input/longtext.php | 25 -- views/default/input/datepicker_popup.php | 31 --- views/default/plugins/event_calendar/settings.php | 4 +- 9 files changed, 6 insertions(+), 356 deletions(-) delete mode 100644 views/default/event_calendar/forms/delete_confirm.php delete mode 100644 views/default/event_calendar/forms/manage_event.php delete mode 100644 views/default/event_calendar/forms/manage_event_content.php delete mode 100644 views/default/event_calendar/input/longtext.php delete mode 100644 views/default/input/datepicker_popup.php (limited to 'views/default/plugins/event_calendar/settings.php') diff --git a/languages/en.php b/languages/en.php index e23d78924..5f060748c 100644 --- a/languages/en.php +++ b/languages/en.php @@ -62,8 +62,6 @@ 'event_calendar:view_link' => "View this event", 'event_calendar:edit_link' => "Edit this event", 'event_calendar:delete_link' => "Delete this event", - 'event_calendar:delete_confirm_title' => "Confirm event deletion", - 'event_calendar:delete_confirm_description' => "Are you sure that you want to delete this event (\"%s\")? This action cannot be undone.", 'event_calendar:delete_response' => "This event has been deleted.", 'event_calendar:error_delete' => "This event does not exist or you do not have the right to delete it.", 'event_calendar:delete_cancel_response' => "Event delete cancelled.", @@ -117,7 +115,7 @@ 'event_calendar:region_description' => "Select the region that this event will be held in.", 'event_calendar:settings:type_display:title' => "Add event type to events", 'event_calendar:settings:type_list:title' => "List of event types (one per line)", - 'event_calendar:type_label' => "Type of event", + 'event_calendar:type_label' => "Type", 'event_calendar:type_description' => "Select the type of event.", 'event_calendar:all' => "All", 'event_calendar:region_filter_by_label' => "Filter by region: ", diff --git a/views/default/event_calendar/forms/add_to_group.php b/views/default/event_calendar/forms/add_to_group.php index 330f72526..2c8fdec53 100644 --- a/views/default/event_calendar/forms/add_to_group.php +++ b/views/default/event_calendar/forms/add_to_group.php @@ -56,21 +56,19 @@ if ($remove_group) { if ($add_options || $remove_options) { echo '
'; - $event_bit = elgg_view('input/hidden', array("internalname" => "event_id","value" => $event_id)); + $event_bit = elgg_view('input/hidden', array("name" => "event_id","value" => $event_id)); if ($add_options) { echo "

".elgg_echo('event_calendar:add_to_group:add_group_title')."

"; - $add_pulldown = elgg_view("input/dropdown",array("internalname" => "group_id","options_values" => $add_options)); + $add_pulldown = elgg_view("input/dropdown",array("name" => "group_id","options_values" => $add_options)); $submit_button = "

".elgg_view("input/submit",array("value"=>elgg_echo('event_calendar:add_to_group:add_group_button')))."

"; echo elgg_view ('input/form',array("body" => $event_bit.$add_pulldown.$submit_button,"action" => $vars['url']."action/event_calendar/add_to_group")); } if ($remove_options) { echo "

".elgg_echo('event_calendar:add_to_group:remove_group_title')."

"; - $remove_pulldown = elgg_view("input/dropdown",array("internalname" => "group_id","options_values" => $remove_options)); + $remove_pulldown = elgg_view("input/dropdown",array("name" => "group_id","options_values" => $remove_options)); $submit_button = "

".elgg_view("input/submit",array("value"=>elgg_echo('event_calendar:add_to_group:remove_group_button')))."

"; echo elgg_view ('input/form',array("body" => $event_bit.$remove_pulldown.$submit_button,"action" => $vars['url']."action/event_calendar/remove_from_group")); } echo '
'; } - -?> \ No newline at end of file diff --git a/views/default/event_calendar/forms/delete_confirm.php b/views/default/event_calendar/forms/delete_confirm.php deleted file mode 100644 index 37134e695..000000000 --- a/views/default/event_calendar/forms/delete_confirm.php +++ /dev/null @@ -1,13 +0,0 @@ -'.sprintf(elgg_echo('event_calendar:delete_confirm_description'),$vars['title']).'

'; - -$body .= '
'; -$body .= elgg_view('input/securitytoken'); -$body .= elgg_view('input/hidden',array('internalname'=>'event_action', 'value'=>'delete_event')); -$body .= elgg_view('input/hidden',array('internalname'=>'event_id', 'value'=>$vars['event_id'])); -$body .= elgg_view('input/submit', array('internalname'=>'submit','value'=>elgg_echo('event_calendar:submit'))); -$body .= '
'; - -echo elgg_view('page_elements/contentwrapper', array('body'=>$body)); -?> \ No newline at end of file diff --git a/views/default/event_calendar/forms/manage_event.php b/views/default/event_calendar/forms/manage_event.php deleted file mode 100644 index f9d78e3f4..000000000 --- a/views/default/event_calendar/forms/manage_event.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Radagast Solutions 2008 - * @link http://radagast.biz/ - * - */ - -elgg_extend_view('metatags','event_calendar/metatags'); - -$body = elgg_view('event_calendar/forms/manage_event_content',$vars); - -$body .= elgg_view('input/submit', array('internalname'=>'submit','value'=>elgg_echo('event_calendar:submit'))); -$form = elgg_view('input/form',array('action'=>$vars['url'].'action/event_calendar/manage','body'=>$body)); - -print elgg_view('page_elements/contentwrapper',array('body'=>$form)); -?> \ No newline at end of file diff --git a/views/default/event_calendar/forms/manage_event_content.php b/views/default/event_calendar/forms/manage_event_content.php deleted file mode 100644 index f28788132..000000000 --- a/views/default/event_calendar/forms/manage_event_content.php +++ /dev/null @@ -1,254 +0,0 @@ -title; - $brief_description = $event->description; - $venue = $event->venue; - if ($event->form_data) { - // this is a form redisplay, so take the values as submitted - $start_date = $event->start_date; - $end_date = $event->end_date; - } else { - // the values are from the database, - // so convert - $start_date = date("l, F j, Y",$event->start_date); - if ($event->end_date) { - $end_date = date("l, F j, Y",$event->end_date); - } else { - $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'; -} else { - $event_id = 0; - $title = ''; - $brief_description = ''; - $venue = ''; - $start_date = ''; - $end_date = ''; - $fees = ''; - if ($event_calendar_spots_display) { - $spots = ''; - } - if ($event_calendar_region_display) { - $region = '-'; - } - if ($event_calendar_type_display) { - $event_type = '-'; - } - $contact = ''; - $organiser = ''; - $event_tags = ''; - $long_description = ''; - $access = get_default_access(); - if ($event_calendar_times == 'yes') { - $start_time = ''; - $end_time = ''; - } - $event_action = 'add_event'; -} -$body = ''; - -$body .= elgg_view('input/hidden',array('internalname'=>'event_action', 'value'=>$event_action)); -$body .= elgg_view('input/hidden',array('internalname'=>'event_id', 'value'=>$event_id)); -$body .= elgg_view('input/hidden',array('internalname'=>'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 != 'no') { - $body .= '


'; - $body .= elgg_view("input/timepicker",array('internalname' => 'start_time','value'=>$start_time)); - $body .= '

'; - $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 != 'no') { - $body .= '


'; - $body .= elgg_view("input/timepicker",array('internalname' => 'end_time','value'=>$end_time)); - $body .= '

'; - $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').'

'; -} - -if ($event_calendar_add_users == 'yes') { - $body .= '



'; - $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 = get_plugin_setting('default_access', 'event_calendar'); - if($event_calendar_default_access) { - $body .= elgg_view("input/hidden",array('internalname' => 'access','value'=>$event_calendar_default_access)); - } else { - $body .= elgg_view("input/hidden",array('internalname' => 'access','value'=>ACCESS_PRIVATE)); - } -} else { - $body .= '

'; -} - -print $body; -?> \ No newline at end of file diff --git a/views/default/event_calendar/input/date_local.php b/views/default/event_calendar/input/date_local.php index f4cb48d11..a0ce7f4d3 100644 --- a/views/default/event_calendar/input/date_local.php +++ b/views/default/event_calendar/input/date_local.php @@ -44,7 +44,6 @@ if ($timestamp) { $vars['class'] = "{$vars['class']} elgg-input-timestamp"; $vars['id'] = $vars['name']; unset($vars['name']); - unset($vars['internalname']); } // convert timestamps to text for display diff --git a/views/default/event_calendar/input/longtext.php b/views/default/event_calendar/input/longtext.php deleted file mode 100644 index 86b0f3fc4..000000000 --- a/views/default/event_calendar/input/longtext.php +++ /dev/null @@ -1,25 +0,0 @@ - - - \ No newline at end of file diff --git a/views/default/input/datepicker_popup.php b/views/default/input/datepicker_popup.php deleted file mode 100644 index 0daeb7307..000000000 --- a/views/default/input/datepicker_popup.php +++ /dev/null @@ -1,31 +0,0 @@ - - * @copyright Radagast Solutions 2008 - * @link http://radagast.biz/ - * - */ - -if ($vars['dateformat']) { - $date_format = $vars['dateformat']; -} else { - $date_format = "yy/mm/dd"; -} -?> - - - \ No newline at end of file diff --git a/views/default/plugins/event_calendar/settings.php b/views/default/plugins/event_calendar/settings.php index 2a2e043de..e91db9969 100644 --- a/views/default/plugins/event_calendar/settings.php +++ b/views/default/plugins/event_calendar/settings.php @@ -358,7 +358,7 @@ if (!$event_calendar_region_list) { $body .= elgg_echo('event_calendar:settings:region_list:title'); $body .= '
'; -$body .= elgg_view('event_calendar/input/longtext',array('name'=>'params[region_list]','value'=>$event_calendar_region_list)); +$body .= elgg_view('input/plaintext',array('name'=>'params[region_list]','value'=>$event_calendar_region_list)); $body .= '
'; @@ -391,7 +391,7 @@ if (!$event_calendar_type_list) { $body .= elgg_echo('event_calendar:settings:type_list:title'); $body .= '
'; -$body .= elgg_view('event_calendar/input/longtext',array('name'=>'params[type_list]','value'=>$event_calendar_type_list)); +$body .= elgg_view('input/plaintext',array('name'=>'params[type_list]','value'=>$event_calendar_type_list)); $body .= '
'; -- cgit v1.2.3 From 1246e9bc6cafc7f186e1d8fe4370786cd8179b27 Mon Sep 17 00:00:00 2001 From: Kevin Jardine Date: Thu, 5 Jul 2012 14:31:34 +0200 Subject: removed deprecated plugin setting --- views/default/plugins/event_calendar/settings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'views/default/plugins/event_calendar/settings.php') diff --git a/views/default/plugins/event_calendar/settings.php b/views/default/plugins/event_calendar/settings.php index e91db9969..db6e00913 100644 --- a/views/default/plugins/event_calendar/settings.php +++ b/views/default/plugins/event_calendar/settings.php @@ -112,7 +112,7 @@ $body .= elgg_view('input/radio',array('name'=>'params[times]','value'=>$event_c $body .= '
'; -$event_calendar_restricted_times = elgg_get_plugin_setting('restricted_times', 'event_calendar'); +/*$event_calendar_restricted_times = elgg_get_plugin_setting('restricted_times', 'event_calendar'); if (!$event_calendar_restricted_times) { $event_calendar_restricted_times = 'no'; } @@ -121,7 +121,7 @@ $body .= elgg_echo('event_calendar:settings:restricted_times:title'); $body .= '
'; $body .= elgg_view('input/radio',array('name'=>'params[restricted_times]','value'=>$event_calendar_restricted_times,'options'=>$yn_options)); -$body .= '
'; +$body .= '
';*/ $event_calendar_time_format = elgg_get_plugin_setting('timeformat', 'event_calendar'); if (!$event_calendar_time_format) { -- cgit v1.2.3