Version Description
- Fatal error in PHP 5.4+ https://bugs.php.net/bug.php?id=54657
- Bug fix: {date} and {time} template tags not rendered in details link when run in a template.
- Bug fix: upgrade database button placement off-screen
- Bug fix: layout on stylesheet editor caused usability problems
- Bug fix: added line break in iCal output.
- Change: added alt attribute to category icons in appropriate contexts.
- My Calendar 2.0 beta added to subversion repository. Here there be bugs.
Download this release
Release Info
Developer | joedolson |
Plugin | My Calendar |
Version | 1.11.3 |
Comparing to | |
See all releases |
Code changes from version 1.11.2 to 1.11.3
- mc-styles.css +4 -1
- my-calendar-event-manager.php +50 -50
- my-calendar-group-manager.php +28 -28
- my-calendar-ical.php +1 -1
- my-calendar-output.php +2 -2
- my-calendar-styles.php +4 -4
- my-calendar-templates.php +4 -4
- my-calendar.php +2 -2
- readme.txt +37 -16
mc-styles.css
CHANGED
@@ -34,6 +34,7 @@ ul.links li {float: left;margin: 0 5px 10px;font-size: .9em;}
|
|
34 |
.mc_support {font-family:'Courier New';background:#fff;padding:5px;}
|
35 |
.jd-my-calendar .button-primary { position: absolute; top: -24px; right: 10px;}
|
36 |
.jd-my-calendar .button-primary.group { top: -40px; }
|
|
|
37 |
.template-editor, .style-editor { width: 98%; }
|
38 |
.roles { width: 24%; float: left; min-height: 300px; }
|
39 |
.mc-settings li { display: inline; padding: 3px; margin: 3px; }
|
@@ -43,4 +44,6 @@ ul.links li {float: left;margin: 0 5px 10px;font-size: .9em;}
|
|
43 |
.jd-my-calendar textarea { width: 100%; }
|
44 |
.mc-clear { clear: both; }
|
45 |
.jd-my-calendar pre { background: #fff; padding: 5px; border: 1px solid #ddd; box-shadow: 1px 1px 2px #ddd; }
|
46 |
-
.jd-my-calendar label span { font-size: .9em; color: #c33; }
|
|
|
|
34 |
.mc_support {font-family:'Courier New';background:#fff;padding:5px;}
|
35 |
.jd-my-calendar .button-primary { position: absolute; top: -24px; right: 10px;}
|
36 |
.jd-my-calendar .button-primary.group { top: -40px; }
|
37 |
+
.jd-my-calendar #message .button-primary { position: static; }
|
38 |
.template-editor, .style-editor { width: 98%; }
|
39 |
.roles { width: 24%; float: left; min-height: 300px; }
|
40 |
.mc-settings li { display: inline; padding: 3px; margin: 3px; }
|
44 |
.jd-my-calendar textarea { width: 100%; }
|
45 |
.mc-clear { clear: both; }
|
46 |
.jd-my-calendar pre { background: #fff; padding: 5px; border: 1px solid #ddd; box-shadow: 1px 1px 2px #ddd; }
|
47 |
+
.jd-my-calendar label span { font-size: .9em; color: #c33; }
|
48 |
+
.jd-my-calendar .button-adjust { top: 10px; right: 0; }
|
49 |
+
.jd-my-calendar hr { width: 20%; margin: 0 auto; border: none; border-top: 1px solid #ccc;}
|
my-calendar-event-manager.php
CHANGED
@@ -1102,7 +1102,7 @@ function mc_event_is_grouped( $group_id ) {
|
|
1102 |
}
|
1103 |
}
|
1104 |
|
1105 |
-
function mc_check_data($action,$
|
1106 |
global $wpdb, $current_user, $users_entries;
|
1107 |
$mcdb = $wpdb;
|
1108 |
|
@@ -1116,33 +1116,33 @@ $recurring_ok = 0;
|
|
1116 |
$submit=array();
|
1117 |
|
1118 |
if ( get_magic_quotes_gpc() ) {
|
1119 |
-
$
|
1120 |
}
|
1121 |
|
1122 |
-
if (!wp_verify_nonce($
|
1123 |
return;
|
1124 |
}
|
1125 |
|
1126 |
$errors = "";
|
1127 |
if ( $action == 'add' || $action == 'edit' || $action == 'copy' ) {
|
1128 |
-
$title = !empty($
|
1129 |
-
$desc = !empty($
|
1130 |
-
$short = !empty($
|
1131 |
-
$recur = !empty($
|
1132 |
// if this is a all weekdays event, and it's been scheduled to start on a weekend, the math gets nasty.
|
1133 |
// ...AND there's no reason to allow it, since weekday events will NEVER happen on the weekend.
|
1134 |
-
if ( $recur == 'E' && ( date( 'w', strtotime( $
|
1135 |
-
if ( date( 'w', strtotime( $
|
1136 |
-
$newbegin = my_calendar_add_date( $
|
1137 |
-
if ( !empty( $
|
1138 |
-
$newend = my_calendar_add_date( $
|
1139 |
} else {
|
1140 |
$newend = $newbegin;
|
1141 |
}
|
1142 |
-
} else if ( date( 'w', strtotime( $
|
1143 |
-
$newbegin = my_calendar_add_date( $
|
1144 |
-
if ( !empty( $
|
1145 |
-
$newend = my_calendar_add_date( $
|
1146 |
} else {
|
1147 |
$newend = $newbegin;
|
1148 |
}
|
@@ -1150,29 +1150,29 @@ if ( $action == 'add' || $action == 'edit' || $action == 'copy' ) {
|
|
1150 |
$begin = $newbegin;
|
1151 |
$end = $newend;
|
1152 |
} else {
|
1153 |
-
$begin = !empty($
|
1154 |
-
$end = !empty($
|
1155 |
}
|
1156 |
-
$time = !empty($
|
1157 |
-
$endtime = !empty($
|
1158 |
-
$repeats = !empty($
|
1159 |
-
$host = !empty($
|
1160 |
-
$category = !empty($
|
1161 |
-
$linky = !empty($
|
1162 |
-
$expires = !empty($
|
1163 |
-
$approved = !empty($
|
1164 |
-
$location_preset = !empty($
|
1165 |
-
$event_author = !empty($
|
1166 |
-
$event_open = (isset($
|
1167 |
-
$event_group = !empty($
|
1168 |
-
$event_flagged = ( !isset($
|
1169 |
-
$event_image = esc_url_raw( $
|
1170 |
-
$event_fifth_week = !empty($
|
1171 |
-
$event_holiday = !empty($
|
1172 |
// get group id: if multiple events submitted, auto group OR if event being submitted is already part of a group; otherwise zero.
|
1173 |
-
$group_id_submitted = (int) $
|
1174 |
-
$event_group_id = ( ( is_array($
|
1175 |
-
$event_span = (!empty($
|
1176 |
|
1177 |
// set location
|
1178 |
if ($location_preset != 'none') {
|
@@ -1192,19 +1192,19 @@ if ( $action == 'add' || $action == 'edit' || $action == 'copy' ) {
|
|
1192 |
$event_zoom = $location->location_zoom;
|
1193 |
$event_phone = $location->location_phone;
|
1194 |
} else {
|
1195 |
-
$event_label = !empty($
|
1196 |
-
$event_street = !empty($
|
1197 |
-
$event_street2 = !empty($
|
1198 |
-
$event_city = !empty($
|
1199 |
-
$event_state = !empty($
|
1200 |
-
$event_postcode = !empty($
|
1201 |
-
$event_region = !empty($
|
1202 |
-
$event_country = !empty($
|
1203 |
-
$event_url = !empty($
|
1204 |
-
$event_longitude = !empty($
|
1205 |
-
$event_latitude = !empty($
|
1206 |
-
$event_zoom = !empty($
|
1207 |
-
$event_phone = !empty($
|
1208 |
}
|
1209 |
// Perform some validation on the submitted dates - this checks for valid years and months
|
1210 |
$date_format_one = '/^([0-9]{4})-([0][1-9])-([0-3][0-9])$/';
|
1102 |
}
|
1103 |
}
|
1104 |
|
1105 |
+
function mc_check_data($action,$post, $i) {
|
1106 |
global $wpdb, $current_user, $users_entries;
|
1107 |
$mcdb = $wpdb;
|
1108 |
|
1116 |
$submit=array();
|
1117 |
|
1118 |
if ( get_magic_quotes_gpc() ) {
|
1119 |
+
$post = array_map( 'stripslashes_deep', $post );
|
1120 |
}
|
1121 |
|
1122 |
+
if (!wp_verify_nonce($post['event_nonce_name'],'event_nonce')) {
|
1123 |
return;
|
1124 |
}
|
1125 |
|
1126 |
$errors = "";
|
1127 |
if ( $action == 'add' || $action == 'edit' || $action == 'copy' ) {
|
1128 |
+
$title = !empty($post['event_title']) ? trim($post['event_title']) : '';
|
1129 |
+
$desc = !empty($post['content']) ? trim($post['content']) : '';
|
1130 |
+
$short = !empty($post['event_short']) ? trim($post['event_short']) : '';
|
1131 |
+
$recur = !empty($post['event_recur']) ? trim($post['event_recur']) : '';
|
1132 |
// if this is a all weekdays event, and it's been scheduled to start on a weekend, the math gets nasty.
|
1133 |
// ...AND there's no reason to allow it, since weekday events will NEVER happen on the weekend.
|
1134 |
+
if ( $recur == 'E' && ( date( 'w', strtotime( $post['event_begin'][$i] ) ) == 0 || date( 'w', strtotime( $post['event_begin'][$i] ) ) == 6 ) ) {
|
1135 |
+
if ( date( 'w', strtotime( $post['event_begin'][$i] ) ) == 0 ) {
|
1136 |
+
$newbegin = my_calendar_add_date( $post['event_begin'][$i], 1 );
|
1137 |
+
if ( !empty( $post['event_end'][$i] ) ) {
|
1138 |
+
$newend = my_calendar_add_date( $post['event_end'][$i], 1 );
|
1139 |
} else {
|
1140 |
$newend = $newbegin;
|
1141 |
}
|
1142 |
+
} else if ( date( 'w', strtotime( $post['event_begin'][$i] ) ) == 6 ) {
|
1143 |
+
$newbegin = my_calendar_add_date( $post['event_begin'][$i], 2 );
|
1144 |
+
if ( !empty( $post['event_end'][$i] ) ) {
|
1145 |
+
$newend = my_calendar_add_date( $post['event_end'][$i], 2 );
|
1146 |
} else {
|
1147 |
$newend = $newbegin;
|
1148 |
}
|
1150 |
$begin = $newbegin;
|
1151 |
$end = $newend;
|
1152 |
} else {
|
1153 |
+
$begin = !empty($post['event_begin'][$i]) ? trim($post['event_begin'][$i]) : '';
|
1154 |
+
$end = !empty($post['event_end'][$i]) ? trim($post['event_end'][$i]) : $begin;
|
1155 |
}
|
1156 |
+
$time = !empty($post['event_time'][$i]) ? trim($post['event_time'][$i]) : '';
|
1157 |
+
$endtime = !empty($post['event_endtime'][$i]) ? trim($post['event_endtime'][$i]) : '';
|
1158 |
+
$repeats = !empty($post['event_repeats']) ? trim($post['event_repeats']) : 0;
|
1159 |
+
$host = !empty($post['event_host']) ? $post['event_host'] : $current_user->ID;
|
1160 |
+
$category = !empty($post['event_category']) ? $post['event_category'] : '';
|
1161 |
+
$linky = !empty($post['event_link']) ? trim($post['event_link']) : '';
|
1162 |
+
$expires = !empty($post['event_link_expires']) ? $post['event_link_expires'] : '0';
|
1163 |
+
$approved = !empty($post['event_approved']) ? $post['event_approved'] : '0';
|
1164 |
+
$location_preset = !empty($post['location_preset']) ? $post['location_preset'] : '';
|
1165 |
+
$event_author = !empty($post['event_author']) ? $post['event_author'] : $current_user->ID;
|
1166 |
+
$event_open = (isset($post['event_open']) && $post['event_open']!==0) ? $post['event_open'] : '2';
|
1167 |
+
$event_group = !empty($post['event_group']) ? 1 : 0;
|
1168 |
+
$event_flagged = ( !isset($post['event_flagged']) || $post['event_flagged']===0 )?0:1;
|
1169 |
+
$event_image = esc_url_raw( $post['event_image'] );
|
1170 |
+
$event_fifth_week = !empty($post['event_fifth_week']) ? 1 : 0;
|
1171 |
+
$event_holiday = !empty($post['event_holiday']) ? 1 : 0;
|
1172 |
// get group id: if multiple events submitted, auto group OR if event being submitted is already part of a group; otherwise zero.
|
1173 |
+
$group_id_submitted = (int) $post['event_group_id'];
|
1174 |
+
$event_group_id = ( ( is_array($post['event_begin']) && count($post['event_begin'])>1 ) || mc_event_is_grouped( $group_id_submitted) )?$group_id_submitted:0;
|
1175 |
+
$event_span = (!empty($post['event_span']) && $event_group_id != 0 ) ? 1 : 0;
|
1176 |
|
1177 |
// set location
|
1178 |
if ($location_preset != 'none') {
|
1192 |
$event_zoom = $location->location_zoom;
|
1193 |
$event_phone = $location->location_phone;
|
1194 |
} else {
|
1195 |
+
$event_label = !empty($post['event_label']) ? $post['event_label'] : '';
|
1196 |
+
$event_street = !empty($post['event_street']) ? $post['event_street'] : '';
|
1197 |
+
$event_street2 = !empty($post['event_street2']) ? $post['event_street2'] : '';
|
1198 |
+
$event_city = !empty($post['event_city']) ? $post['event_city'] : '';
|
1199 |
+
$event_state = !empty($post['event_state']) ? $post['event_state'] : '';
|
1200 |
+
$event_postcode = !empty($post['event_postcode']) ? $post['event_postcode'] : '';
|
1201 |
+
$event_region = !empty($post['event_region']) ? $post['event_region'] : '';
|
1202 |
+
$event_country = !empty($post['event_country']) ? $post['event_country'] : '';
|
1203 |
+
$event_url = !empty($post['event_url']) ? $post['event_url'] : '';
|
1204 |
+
$event_longitude = !empty($post['event_longitude']) ? $post['event_longitude'] : '';
|
1205 |
+
$event_latitude = !empty($post['event_latitude']) ? $post['event_latitude'] : '';
|
1206 |
+
$event_zoom = !empty($post['event_zoom']) ? $post['event_zoom'] : '';
|
1207 |
+
$event_phone = !empty($post['event_phone'])? $post['event_phone'] : '';
|
1208 |
}
|
1209 |
// Perform some validation on the submitted dates - this checks for valid years and months
|
1210 |
$date_format_one = '/^([0-9]{4})-([0][1-9])-([0-3][0-9])$/';
|
my-calendar-group-manager.php
CHANGED
@@ -513,7 +513,7 @@ function my_calendar_print_group_fields( $data,$mode,$event_id,$group_id='' ) {
|
|
513 |
</div>
|
514 |
<?php }
|
515 |
|
516 |
-
function mc_check_group_data( $action,$
|
517 |
global $wpdb, $current_user, $users_entries;
|
518 |
$mcdb = $wpdb;
|
519 |
|
@@ -522,27 +522,27 @@ function mc_check_group_data( $action,$_POST ) {
|
|
522 |
$submit=array();
|
523 |
|
524 |
if ( get_magic_quotes_gpc() ) {
|
525 |
-
$
|
526 |
}
|
527 |
|
528 |
-
if (!wp_verify_nonce($
|
529 |
return;
|
530 |
}
|
531 |
|
532 |
$errors = "";
|
533 |
if ( $action == 'add' || $action == 'edit' || $action == 'copy' ) {
|
534 |
-
$title = !empty($
|
535 |
-
$desc = !empty($
|
536 |
-
$short = !empty($
|
537 |
-
$repeats = !empty($
|
538 |
-
$host = !empty($
|
539 |
-
$category = !empty($
|
540 |
-
$linky = !empty($
|
541 |
-
$expires = !empty($
|
542 |
-
$location_preset = !empty($
|
543 |
-
$event_open = !empty($
|
544 |
-
$event_image = esc_url_raw( $
|
545 |
-
$event_span = !empty($
|
546 |
// set location
|
547 |
if ($location_preset != 'none') {
|
548 |
$sql = "SELECT * FROM " . my_calendar_locations_table() . " WHERE location_id = $location_preset";
|
@@ -561,19 +561,19 @@ if ( $action == 'add' || $action == 'edit' || $action == 'copy' ) {
|
|
561 |
$event_zoom = $location->location_zoom;
|
562 |
$event_phone = $location->location_phone;
|
563 |
} else {
|
564 |
-
$event_label = !empty($
|
565 |
-
$event_street = !empty($
|
566 |
-
$event_street2 = !empty($
|
567 |
-
$event_city = !empty($
|
568 |
-
$event_state = !empty($
|
569 |
-
$event_postcode = !empty($
|
570 |
-
$event_region = !empty($
|
571 |
-
$event_country = !empty($
|
572 |
-
$event_url = !empty($
|
573 |
-
$event_longitude = !empty($
|
574 |
-
$event_latitude = !empty($
|
575 |
-
$event_zoom = !empty($
|
576 |
-
$event_phone = !empty($
|
577 |
}
|
578 |
|
579 |
// We check to make sure the URL is acceptable (blank or starting with http://)
|
513 |
</div>
|
514 |
<?php }
|
515 |
|
516 |
+
function mc_check_group_data( $action,$post ) {
|
517 |
global $wpdb, $current_user, $users_entries;
|
518 |
$mcdb = $wpdb;
|
519 |
|
522 |
$submit=array();
|
523 |
|
524 |
if ( get_magic_quotes_gpc() ) {
|
525 |
+
$post = array_map( 'stripslashes_deep', $post );
|
526 |
}
|
527 |
|
528 |
+
if (!wp_verify_nonce($post['event_nonce_name'],'event_nonce')) {
|
529 |
return;
|
530 |
}
|
531 |
|
532 |
$errors = "";
|
533 |
if ( $action == 'add' || $action == 'edit' || $action == 'copy' ) {
|
534 |
+
$title = !empty($post['event_title']) ? trim($post['event_title']) : '';
|
535 |
+
$desc = !empty($post['content']) ? trim($post['content']) : '';
|
536 |
+
$short = !empty($post['event_short']) ? trim($post['event_short']) : '';
|
537 |
+
$repeats = !empty($post['event_repeats']) ? trim($post['event_repeats']) : 0;
|
538 |
+
$host = !empty($post['event_host']) ? $post['event_host'] : $current_user->ID;
|
539 |
+
$category = !empty($post['event_category']) ? $post['event_category'] : '';
|
540 |
+
$linky = !empty($post['event_link']) ? trim($post['event_link']) : '';
|
541 |
+
$expires = !empty($post['event_link_expires']) ? $post['event_link_expires'] : '0';
|
542 |
+
$location_preset = !empty($post['location_preset']) ? $post['location_preset'] : '';
|
543 |
+
$event_open = !empty($post['event_open']) ? $post['event_open'] : '2';
|
544 |
+
$event_image = esc_url_raw( $post['event_image'] );
|
545 |
+
$event_span = !empty($post['event_span']) ? 1 : 0;
|
546 |
// set location
|
547 |
if ($location_preset != 'none') {
|
548 |
$sql = "SELECT * FROM " . my_calendar_locations_table() . " WHERE location_id = $location_preset";
|
561 |
$event_zoom = $location->location_zoom;
|
562 |
$event_phone = $location->location_phone;
|
563 |
} else {
|
564 |
+
$event_label = !empty($post['event_label']) ? $post['event_label'] : '';
|
565 |
+
$event_street = !empty($post['event_street']) ? $post['event_street'] : '';
|
566 |
+
$event_street2 = !empty($post['event_street2']) ? $post['event_street2'] : '';
|
567 |
+
$event_city = !empty($post['event_city']) ? $post['event_city'] : '';
|
568 |
+
$event_state = !empty($post['event_state']) ? $post['event_state'] : '';
|
569 |
+
$event_postcode = !empty($post['event_postcode']) ? $post['event_postcode'] : '';
|
570 |
+
$event_region = !empty($post['event_region']) ? $post['event_region'] : '';
|
571 |
+
$event_country = !empty($post['event_country']) ? $post['event_country'] : '';
|
572 |
+
$event_url = !empty($post['event_url']) ? $post['event_url'] : '';
|
573 |
+
$event_longitude = !empty($post['event_longitude']) ? $post['event_longitude'] : '';
|
574 |
+
$event_latitude = !empty($post['event_latitude']) ? $post['event_latitude'] : '';
|
575 |
+
$event_zoom = !empty($post['event_zoom']) ? $post['event_zoom'] : '';
|
576 |
+
$event_phone = !empty($post['event_phone']) ? $post['event_phone'] : '';
|
577 |
}
|
578 |
|
579 |
// We check to make sure the URL is acceptable (blank or starting with http://)
|
my-calendar-ical.php
CHANGED
@@ -32,7 +32,7 @@ PRODID:-//Accessible Web Design//My Calendar//http://www.mywpcal.com//v'.$mc_ver
|
|
32 |
$event =& $events[$key];
|
33 |
if ( is_object($event) ) {
|
34 |
$array = event_as_array($event);
|
35 |
-
$output .= jd_draw_template($array,$template,'ical');
|
36 |
}
|
37 |
}
|
38 |
}
|
32 |
$event =& $events[$key];
|
33 |
if ( is_object($event) ) {
|
34 |
$array = event_as_array($event);
|
35 |
+
$output .= "\n".jd_draw_template($array,$template,'ical');
|
36 |
}
|
37 |
}
|
38 |
}
|
my-calendar-output.php
CHANGED
@@ -131,7 +131,7 @@ function my_calendar_draw_event($event, $type="calendar", $process_date, $templa
|
|
131 |
if ($event->category_icon != "") {
|
132 |
$path = (is_custom_icon())?$wp_plugin_url.'/my-calendar-custom/':plugins_url('icons',__FILE__).'/';
|
133 |
$hex = (strpos($event->category_color,'#') !== 0)?'#':'';
|
134 |
-
$image = '<img src="'.$path.$event->category_icon.'" alt="" class="category-icon" style="background:'.$hex.$event->category_color.';" />';
|
135 |
} else {
|
136 |
$image = "";
|
137 |
}
|
@@ -458,7 +458,7 @@ echo '
|
|
458 |
|
459 |
// Actually do the printing of the calendar
|
460 |
function my_calendar($name,$format,$category,$showkey,$shownav,$showjump,$toggle,$time='month',$ltype='',$lvalue='',$id='jd-calendar',$template='',$content='') {
|
461 |
-
|
462 |
$mcdb = $wpdb;
|
463 |
if ( get_option( 'mc_remote' ) == 'true' && function_exists('mc_remote_db') ) { $mcdb = mc_remote_db(); }
|
464 |
$my_calendar_body = '';
|
131 |
if ($event->category_icon != "") {
|
132 |
$path = (is_custom_icon())?$wp_plugin_url.'/my-calendar-custom/':plugins_url('icons',__FILE__).'/';
|
133 |
$hex = (strpos($event->category_color,'#') !== 0)?'#':'';
|
134 |
+
$image = '<img src="'.$path.$event->category_icon.'" alt="'.__('Category','my-calendar').': '.esc_attr($event->category_name).'" class="category-icon" style="background:'.$hex.$event->category_color.';" />';
|
135 |
} else {
|
136 |
$image = "";
|
137 |
}
|
458 |
|
459 |
// Actually do the printing of the calendar
|
460 |
function my_calendar($name,$format,$category,$showkey,$shownav,$showjump,$toggle,$time='month',$ltype='',$lvalue='',$id='jd-calendar',$template='',$content='') {
|
461 |
+
global $wpdb, $wp_plugin_url;
|
462 |
$mcdb = $wpdb;
|
463 |
if ( get_option( 'mc_remote' ) == 'true' && function_exists('mc_remote_db') ) { $mcdb = mc_remote_db(); }
|
464 |
$my_calendar_body = '';
|
my-calendar-styles.php
CHANGED
@@ -170,7 +170,7 @@ my_calendar_check_db();
|
|
170 |
</p>
|
171 |
</fieldset>
|
172 |
</form>
|
173 |
-
|
174 |
<form method="post" action="<?php echo admin_url("admin.php?page=my-calendar-styles"); ?>">
|
175 |
<div><input type="hidden" name="_wpnonce" value="<?php echo wp_create_nonce('my-calendar-nonce'); ?>" /></div>
|
176 |
<div><input type="hidden" value="true" name="mc_edit_style" />
|
@@ -186,10 +186,10 @@ my_calendar_check_db();
|
|
186 |
</div>";
|
187 |
}
|
188 |
?>
|
189 |
-
<fieldset>
|
190 |
<legend><?php _e('CSS Style Options','my-calendar'); ?></legend>
|
191 |
<p>
|
192 |
-
<label for="mc_show_css"><?php _e('Apply CSS
|
193 |
</p>
|
194 |
<p>
|
195 |
<input type="checkbox" id="reset_styles" name="reset_styles" <?php if (mc_is_custom_style(get_option('mc_css_file'))) { echo "disabled='disabled'"; } ?> /> <label for="reset_styles"><?php _e('Restore My Calendar stylesheet','my-calendar'); ?></label> <input type="checkbox" id="use_styles" name="use_styles" <?php jd_cal_checkCheckbox('mc_use_styles','true'); ?> /> <label for="use_styles"><?php _e('Disable My Calendar Stylesheet','my-calendar'); ?></label>
|
@@ -198,7 +198,7 @@ my_calendar_check_db();
|
|
198 |
<label for="style"><?php _e('Edit the stylesheet for My Calendar','my-calendar'); ?></label><br /><textarea class="style-editor" id="style" name="style" rows="30" cols="80"<?php if ( get_option('mc_use_styles') == 'true' ) { echo "disabled='disabled'"; } ?>><?php echo $my_calendar_style; ?></textarea>
|
199 |
</p>
|
200 |
<p>
|
201 |
-
<input type="submit" name="save" class="button-primary" value="<?php _e('Save Changes','my-calendar'); ?>" />
|
202 |
</p>
|
203 |
</fieldset>
|
204 |
</form>
|
170 |
</p>
|
171 |
</fieldset>
|
172 |
</form>
|
173 |
+
<hr />
|
174 |
<form method="post" action="<?php echo admin_url("admin.php?page=my-calendar-styles"); ?>">
|
175 |
<div><input type="hidden" name="_wpnonce" value="<?php echo wp_create_nonce('my-calendar-nonce'); ?>" /></div>
|
176 |
<div><input type="hidden" value="true" name="mc_edit_style" />
|
186 |
</div>";
|
187 |
}
|
188 |
?>
|
189 |
+
<fieldset style="position:relative;">
|
190 |
<legend><?php _e('CSS Style Options','my-calendar'); ?></legend>
|
191 |
<p>
|
192 |
+
<label for="mc_show_css"><?php _e('Apply CSS on these pages (comma separated IDs)','my-calendar'); ?></label> <input type="text" id="mc_show_css" name="mc_show_css" value="<?php echo $mc_show_css; ?>" />
|
193 |
</p>
|
194 |
<p>
|
195 |
<input type="checkbox" id="reset_styles" name="reset_styles" <?php if (mc_is_custom_style(get_option('mc_css_file'))) { echo "disabled='disabled'"; } ?> /> <label for="reset_styles"><?php _e('Restore My Calendar stylesheet','my-calendar'); ?></label> <input type="checkbox" id="use_styles" name="use_styles" <?php jd_cal_checkCheckbox('mc_use_styles','true'); ?> /> <label for="use_styles"><?php _e('Disable My Calendar Stylesheet','my-calendar'); ?></label>
|
198 |
<label for="style"><?php _e('Edit the stylesheet for My Calendar','my-calendar'); ?></label><br /><textarea class="style-editor" id="style" name="style" rows="30" cols="80"<?php if ( get_option('mc_use_styles') == 'true' ) { echo "disabled='disabled'"; } ?>><?php echo $my_calendar_style; ?></textarea>
|
199 |
</p>
|
200 |
<p>
|
201 |
+
<input type="submit" name="save" class="button-primary button-adjust" value="<?php _e('Save Changes','my-calendar'); ?>" />
|
202 |
</p>
|
203 |
</fieldset>
|
204 |
</form>
|
my-calendar-templates.php
CHANGED
@@ -210,14 +210,14 @@ function event_as_array($event,$type='html') {
|
|
210 |
$details['shortdesc_raw'] = stripslashes($event->event_short);
|
211 |
$details['event_open'] = $event_open;
|
212 |
$details['icon'] = $category_icon;
|
213 |
-
$details['icon_html'] = "<img src='$category_icon' class='mc-category-icon' alt='' />";
|
214 |
$details['color'] = $event->category_color;
|
215 |
$details['event_status'] = ( $event->event_approved == 1 )?__('Published','my-calendar'):__('Reserved','my-calendar');
|
216 |
$templates = get_option('mc_templates');
|
217 |
$details_template = ( !empty($templates['label']) )? stripcslashes($templates['label']):__('Details about','my-calendar').' {title}';
|
218 |
-
$tags = array( "{title}","{location}","{color}","{icon}" );
|
219 |
-
$replacements = array( $event->event_title, $event->event_label, $event->category_color, $event->category_icon );
|
220 |
-
$details_label = str_replace($tags,$replacements,$details_template );
|
221 |
if ( $type == 'html' ) {
|
222 |
$details_link = mc_build_url( array('mc_id'=>"mc_".$dateid."_".$id), array('month','dy','yr','ltype','loc','mcat','format','feed','page_id','p'), get_option( 'mc_uri' ) );
|
223 |
} else {
|
210 |
$details['shortdesc_raw'] = stripslashes($event->event_short);
|
211 |
$details['event_open'] = $event_open;
|
212 |
$details['icon'] = $category_icon;
|
213 |
+
$details['icon_html'] = "<img src='$category_icon' class='mc-category-icon' alt='".__('Category','my-calendar').": ".esc_attr($event->category_name)."' />";
|
214 |
$details['color'] = $event->category_color;
|
215 |
$details['event_status'] = ( $event->event_approved == 1 )?__('Published','my-calendar'):__('Reserved','my-calendar');
|
216 |
$templates = get_option('mc_templates');
|
217 |
$details_template = ( !empty($templates['label']) )? stripcslashes($templates['label']):__('Details about','my-calendar').' {title}';
|
218 |
+
$tags = array( "{title}","{location}","{color}","{icon}","{date}","{time}" );
|
219 |
+
$replacements = array( stripslashes($event->event_title), stripslashes($event->event_label), $event->category_color, $event->category_icon, $details['date'], $details['time'] );
|
220 |
+
$details_label = str_replace($tags,$replacements,$details_template );
|
221 |
if ( $type == 'html' ) {
|
222 |
$details_link = mc_build_url( array('mc_id'=>"mc_".$dateid."_".$id), array('month','dy','yr','ltype','loc','mcat','format','feed','page_id','p'), get_option( 'mc_uri' ) );
|
223 |
} else {
|
my-calendar.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.joedolson.com/articles/my-calendar/
|
|
5 |
Description: Accessible WordPress event calendar plugin. Show events from multiple calendars on pages, in posts, or in widgets.
|
6 |
Author: Joseph C Dolson
|
7 |
Author URI: http://www.joedolson.com
|
8 |
-
Version: 1.11.
|
9 |
*/
|
10 |
/* Copyright 2009-2012 Joe Dolson (email : joe@joedolson.com)
|
11 |
|
@@ -24,7 +24,7 @@ Version: 1.11.2
|
|
24 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
25 |
*/
|
26 |
global $mc_version, $wpdb;
|
27 |
-
$mc_version = '1.11.
|
28 |
|
29 |
// Define the tables used in My Calendar
|
30 |
if ( function_exists('is_multisite') && is_multisite() && get_site_option('mc_multisite_show') == 1 ) {
|
5 |
Description: Accessible WordPress event calendar plugin. Show events from multiple calendars on pages, in posts, or in widgets.
|
6 |
Author: Joseph C Dolson
|
7 |
Author URI: http://www.joedolson.com
|
8 |
+
Version: 1.11.3
|
9 |
*/
|
10 |
/* Copyright 2009-2012 Joe Dolson (email : joe@joedolson.com)
|
11 |
|
24 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
25 |
*/
|
26 |
global $mc_version, $wpdb;
|
27 |
+
$mc_version = '1.11.3';
|
28 |
|
29 |
// Define the tables used in My Calendar
|
30 |
if ( function_exists('is_multisite') && is_multisite() && get_site_option('mc_multisite_show') == 1 ) {
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Contributors: joedolson
|
|
4 |
Donate link: http://www.joedolson.com/donate.php
|
5 |
Tags: calendar, dates, times, events, scheduling, event manager
|
6 |
Requires at least: 2.9.2
|
7 |
-
Tested up to: 3.4
|
8 |
Stable tag: trunk
|
9 |
|
10 |
Accessible WordPress event calendar plugin. Show events from multiple calendars on pages, in posts, or in widgets.
|
@@ -15,25 +15,37 @@ My Calendar provides event management and numerous methods to display your event
|
|
15 |
|
16 |
Basic Features:
|
17 |
|
|
|
18 |
* Standard calendar grid or list views of events
|
19 |
* Show events in monthly, weekly, or daily view.
|
20 |
-
* Mini-calendar view for compact displays (
|
21 |
-
* Widget
|
22 |
-
* Widget
|
23 |
-
*
|
24 |
-
*
|
25 |
-
*
|
26 |
* Disable default CSS and default JavaScript or display only on specific Pages/Posts
|
27 |
* Editable CSS styles and JavaScript behaviors
|
28 |
-
*
|
29 |
-
* Individual occurrences of recurring events can be
|
30 |
-
*
|
31 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
* Email notification to administrator when events are scheduled or reserved
|
33 |
* Location Manager for storing frequently used venues
|
|
|
34 |
* Import method from Kieran O'Shea's Calendar plugin
|
35 |
-
* Integrated Help
|
36 |
-
|
|
|
37 |
|
38 |
This calendar branched from [Kieran O'Shea's Calendar plugin](http://wordpress.org/extend/plugins/calendar/) in April 2010. You can import any previous scheduled events from Kieran's calendar into My Calendar.
|
39 |
|
@@ -53,7 +65,7 @@ Languages available:
|
|
53 |
* Italian ([Sabir Musta](http://mustaphasabir.altervista.org)) - to 1.7.0
|
54 |
* Brazilian Portuguese (Leonardo Kfoury) - to 1.6.0?
|
55 |
|
56 |
-
New or updated translations are always appreciated.
|
57 |
|
58 |
== Installation ==
|
59 |
|
@@ -77,11 +89,20 @@ New or updated translations are always appreciated. The translation source files
|
|
77 |
|
78 |
== Changelog ==
|
79 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
= 1.11.2 =
|
81 |
|
82 |
* Bug fix: Called wp_editor on versions below 3.3
|
83 |
* Bug fix: assorted PHP notices cleaned up.
|
84 |
-
*
|
85 |
|
86 |
= 1.11.1 =
|
87 |
|
@@ -818,5 +839,5 @@ I can! Just not in person. I've written a User's Guide for My Calendar, which yo
|
|
818 |
10. Template editing
|
819 |
|
820 |
== Upgrade Notice ==
|
821 |
-
|
822 |
- Version 1.11.0: Major revision to permissions. Significant template customization options added. Various other feature improvements.
|
4 |
Donate link: http://www.joedolson.com/donate.php
|
5 |
Tags: calendar, dates, times, events, scheduling, event manager
|
6 |
Requires at least: 2.9.2
|
7 |
+
Tested up to: 3.4.1
|
8 |
Stable tag: trunk
|
9 |
|
10 |
Accessible WordPress event calendar plugin. Show events from multiple calendars on pages, in posts, or in widgets.
|
15 |
|
16 |
Basic Features:
|
17 |
|
18 |
+
* [User's Guide available for purchase](http://www.joedolson.com/articles/my-calendar/users-guide/) for assistance in set up and use.
|
19 |
* Standard calendar grid or list views of events
|
20 |
* Show events in monthly, weekly, or daily view.
|
21 |
+
* Mini-calendar view for compact displays (widget or as shortcode)
|
22 |
+
* Widget with today's events
|
23 |
+
* Widget with upcoming or past events
|
24 |
+
* Custom templates for event layout
|
25 |
+
* Limit by category/categories
|
26 |
+
* Limit by location
|
27 |
* Disable default CSS and default JavaScript or display only on specific Pages/Posts
|
28 |
* Editable CSS styles and JavaScript behaviors
|
29 |
+
* Schedule a wide variety of recurring events.
|
30 |
+
* Individual occurrences of recurring events can be edited individually
|
31 |
+
* Access to most aspects of My Calendar can be restricted by role. (Adding events, editing events, editing styles, changing settings, etc.)
|
32 |
+
* Choose which of the following fields you want to enter and display for each event:
|
33 |
+
* title,
|
34 |
+
* description,
|
35 |
+
* event image,
|
36 |
+
* alternate description,
|
37 |
+
* event host,
|
38 |
+
* event category,
|
39 |
+
* URL,
|
40 |
+
* registration status (open, closed or irrelevant),
|
41 |
+
* event location
|
42 |
* Email notification to administrator when events are scheduled or reserved
|
43 |
* Location Manager for storing frequently used venues
|
44 |
+
* Fetch events from a remote MySQL database. (Sharing events in a network of sites.)
|
45 |
* Import method from Kieran O'Shea's Calendar plugin
|
46 |
+
* Integrated Help page to guide in use of shortcodes and template tags
|
47 |
+
|
48 |
+
The [User's Guide](http://www.joedolson.com/articles/my-calendar/users-guide/) provides 70 pages of troubleshooting, customization, and setup information.
|
49 |
|
50 |
This calendar branched from [Kieran O'Shea's Calendar plugin](http://wordpress.org/extend/plugins/calendar/) in April 2010. You can import any previous scheduled events from Kieran's calendar into My Calendar.
|
51 |
|
65 |
* Italian ([Sabir Musta](http://mustaphasabir.altervista.org)) - to 1.7.0
|
66 |
* Brazilian Portuguese (Leonardo Kfoury) - to 1.6.0?
|
67 |
|
68 |
+
New or updated translations are always appreciated. Visit <a href="http://translate.joedolson.com">my translations site</a> to start getting your language into shape!
|
69 |
|
70 |
== Installation ==
|
71 |
|
89 |
|
90 |
== Changelog ==
|
91 |
|
92 |
+
= 1.11.3 =
|
93 |
+
|
94 |
+
* Fatal error in PHP 5.4+ https://bugs.php.net/bug.php?id=54657
|
95 |
+
* Bug fix: {date} and {time} template tags not rendered in details link when run in a template.
|
96 |
+
* Bug fix: upgrade database button placement off-screen
|
97 |
+
* Bug fix: layout on stylesheet editor caused usability problems
|
98 |
+
* Bug fix: added line break in iCal output.
|
99 |
+
* Change: added alt attribute to category icons in appropriate contexts.
|
100 |
+
* [My Calendar 2.0 beta](http://downloads.wordpress.org/plugin/my-calendar.2.0.0.zip) added to subversion repository. Here there be bugs.
|
101 |
+
|
102 |
= 1.11.2 =
|
103 |
|
104 |
* Bug fix: Called wp_editor on versions below 3.3
|
105 |
* Bug fix: assorted PHP notices cleaned up.
|
|
|
106 |
|
107 |
= 1.11.1 =
|
108 |
|
839 |
10. Template editing
|
840 |
|
841 |
== Upgrade Notice ==
|
842 |
+
- Version 1.11.3: Minor bug fixes.
|
843 |
- Version 1.11.0: Major revision to permissions. Significant template customization options added. Various other feature improvements.
|