Version Description
New: Export to Event Calendar WD
Download this release
Release Info
Developer | webdorado |
Plugin | Calendar by WD – Responsive Event Calendar |
Version | 1.4.26 |
Comparing to | |
See all releases |
Code changes from version 1.4.25 to 1.4.26
- calendar.php +148 -3
- calendar_functions.html.php +6 -0
- calendar_functions.php +3 -0
- readme.txt +4 -1
- style_for_cal/style_for_tables_cal.css +15 -0
calendar.php
CHANGED
@@ -3,11 +3,11 @@
|
|
3 |
Plugin Name: Spider Event Calendar
|
4 |
Plugin URI: https://web-dorado.com/products/wordpress-calendar.html
|
5 |
Description: Spider Event Calendar is a highly configurable product which allows you to have multiple organized events. Spider Event Calendar is an extraordinary user friendly extension.
|
6 |
-
Version: 1.4.
|
7 |
Author: https://web-dorado.com/
|
8 |
License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
*/
|
10 |
-
$wd_spider_calendar_version="1.4.
|
11 |
// LANGUAGE localization.
|
12 |
function sp_calendar_language_load() {
|
13 |
load_plugin_textdomain('sp_calendar', FALSE, basename(dirname(__FILE__)) . '/languages');
|
@@ -475,7 +475,7 @@ function sp_calendar_options_panel() {
|
|
475 |
$page_widget_theme = add_submenu_page('SpiderCalendar', 'Calendar Parameters', 'Widget Themes', 'manage_options', 'spider_widget_calendar_themes', 'spider_widget_calendar_params');
|
476 |
$Featured_Plugins = add_submenu_page('SpiderCalendar', 'Featured Plugins', 'Featured Plugins', 'manage_options', 'calendar_Featured_Plugins', 'calendar_Featured_Plugins');
|
477 |
$Featured_themes = add_submenu_page('SpiderCalendar', 'Featured Themes', 'Featured Themes', 'manage_options', 'calendar_Featured_themes', 'calendar_Featured_themes');
|
478 |
-
|
479 |
add_submenu_page('SpiderCalendar', 'Licensing', 'Licensing', 'manage_options', 'Spider_calendar_Licensing', 'Spider_calendar_Licensing');
|
480 |
add_submenu_page('SpiderCalendar', 'Uninstall Spider Event Calendar', 'Uninstall Spider Event Calendar', 'manage_options', 'Uninstall_sp_calendar', 'Uninstall_sp_calendar'); // uninstall Calendar
|
481 |
add_action('admin_print_styles-' . $Featured_Plugins, 'calendar_Featured_Plugins_styles');
|
@@ -1302,6 +1302,151 @@ function calendar_Featured_Plugins() { ?>
|
|
1302 |
</div>
|
1303 |
<?php }
|
1304 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1305 |
// Activate plugin.
|
1306 |
function SpiderCalendar_activate() {
|
1307 |
global $wpdb;
|
3 |
Plugin Name: Spider Event Calendar
|
4 |
Plugin URI: https://web-dorado.com/products/wordpress-calendar.html
|
5 |
Description: Spider Event Calendar is a highly configurable product which allows you to have multiple organized events. Spider Event Calendar is an extraordinary user friendly extension.
|
6 |
+
Version: 1.4.26
|
7 |
Author: https://web-dorado.com/
|
8 |
License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
*/
|
10 |
+
$wd_spider_calendar_version="1.4.26";
|
11 |
// LANGUAGE localization.
|
12 |
function sp_calendar_language_load() {
|
13 |
load_plugin_textdomain('sp_calendar', FALSE, basename(dirname(__FILE__)) . '/languages');
|
475 |
$page_widget_theme = add_submenu_page('SpiderCalendar', 'Calendar Parameters', 'Widget Themes', 'manage_options', 'spider_widget_calendar_themes', 'spider_widget_calendar_params');
|
476 |
$Featured_Plugins = add_submenu_page('SpiderCalendar', 'Featured Plugins', 'Featured Plugins', 'manage_options', 'calendar_Featured_Plugins', 'calendar_Featured_Plugins');
|
477 |
$Featured_themes = add_submenu_page('SpiderCalendar', 'Featured Themes', 'Featured Themes', 'manage_options', 'calendar_Featured_themes', 'calendar_Featured_themes');
|
478 |
+
add_submenu_page('SpiderCalendar', 'Export', 'Export', 'manage_options', 'calendar_export', 'calendar_export');
|
479 |
add_submenu_page('SpiderCalendar', 'Licensing', 'Licensing', 'manage_options', 'Spider_calendar_Licensing', 'Spider_calendar_Licensing');
|
480 |
add_submenu_page('SpiderCalendar', 'Uninstall Spider Event Calendar', 'Uninstall Spider Event Calendar', 'manage_options', 'Uninstall_sp_calendar', 'Uninstall_sp_calendar'); // uninstall Calendar
|
481 |
add_action('admin_print_styles-' . $Featured_Plugins, 'calendar_Featured_Plugins_styles');
|
1302 |
</div>
|
1303 |
<?php }
|
1304 |
|
1305 |
+
add_action('init', 'spider_calendar_export');
|
1306 |
+
function spider_calendar_export() {
|
1307 |
+
if (isset($_POST['export_spider_calendar']) && $_POST['export_spider_calendar'] == 'Export') {
|
1308 |
+
global $wpdb;
|
1309 |
+
$tmp_folder = get_temp_dir();
|
1310 |
+
$select_spider_categories = "SELECT * from " . $wpdb->prefix . "spidercalendar_event_category";
|
1311 |
+
$spider_cats = $wpdb->get_results($select_spider_categories);
|
1312 |
+
$cat_columns = array(
|
1313 |
+
array('id', 'title', 'published', 'color', 'description')
|
1314 |
+
);
|
1315 |
+
if ($spider_cats) {
|
1316 |
+
foreach ($spider_cats as $cat) {
|
1317 |
+
$cat_columns[] = array(
|
1318 |
+
$cat->id,
|
1319 |
+
$cat->title,
|
1320 |
+
$cat->published,
|
1321 |
+
$cat->color,
|
1322 |
+
$cat->description
|
1323 |
+
);
|
1324 |
+
}
|
1325 |
+
}
|
1326 |
+
$cat_handle = fopen($tmp_folder . '/sc_categories.csv', 'w+');
|
1327 |
+
foreach ($cat_columns as $ar) {
|
1328 |
+
if (fputcsv($cat_handle, $ar, ',') === FALSE) {
|
1329 |
+
break;
|
1330 |
+
}
|
1331 |
+
}
|
1332 |
+
@fclose($cat_handle);
|
1333 |
+
$select_spider_calendars = "SELECT * from " . $wpdb->prefix . "spidercalendar_calendar";
|
1334 |
+
$spider_calendars = $wpdb->get_results($select_spider_calendars);
|
1335 |
+
$cal_columns = array(
|
1336 |
+
array('id', 'title', 'published')
|
1337 |
+
);
|
1338 |
+
if ($spider_calendars) {
|
1339 |
+
foreach ($spider_calendars as $cal) {
|
1340 |
+
$cal_columns[] = array(
|
1341 |
+
$cal->id,
|
1342 |
+
$cal->title,
|
1343 |
+
$cal->published
|
1344 |
+
);
|
1345 |
+
}
|
1346 |
+
}
|
1347 |
+
$cal_handle = fopen($tmp_folder . '/sc_calendars.csv', 'w+');
|
1348 |
+
foreach ($cal_columns as $ar) {
|
1349 |
+
if (fputcsv($cal_handle, $ar, ',') === FALSE) {
|
1350 |
+
break;
|
1351 |
+
}
|
1352 |
+
}
|
1353 |
+
@fclose($cal_handle);
|
1354 |
+
$select_spider_events = "SELECT * from " . $wpdb->prefix . "spidercalendar_event";
|
1355 |
+
$spider_events = $wpdb->get_results($select_spider_events);
|
1356 |
+
$events_columns = array(
|
1357 |
+
array('id', 'cal_id', 'start_date', 'end_date', 'title', 'cat_id',
|
1358 |
+
'time', 'text_for_date', 'userID', 'repeat_method', 'repeat', 'week',
|
1359 |
+
'month', 'month_type', 'monthly_list', 'month_week', 'year_month', 'published')
|
1360 |
+
);
|
1361 |
+
if ($spider_events) {
|
1362 |
+
foreach ($spider_events as $ev) {
|
1363 |
+
$events_columns[] = array(
|
1364 |
+
$ev->id,
|
1365 |
+
$ev->calendar,
|
1366 |
+
$ev->date,
|
1367 |
+
$ev->date_end,
|
1368 |
+
$ev->title,
|
1369 |
+
$ev->category,
|
1370 |
+
$ev->time,
|
1371 |
+
$ev->text_for_date,
|
1372 |
+
$ev->userID,
|
1373 |
+
$ev->repeat_method,
|
1374 |
+
$ev->repeat,
|
1375 |
+
$ev->week,
|
1376 |
+
$ev->month,
|
1377 |
+
$ev->month_type,
|
1378 |
+
$ev->monthly_list,
|
1379 |
+
$ev->month_week,
|
1380 |
+
$ev->year_month,
|
1381 |
+
$ev->published
|
1382 |
+
);
|
1383 |
+
}
|
1384 |
+
}
|
1385 |
+
$ev_handle = fopen($tmp_folder . '/sc_events.csv', 'w+');
|
1386 |
+
foreach ($events_columns as $ar) {
|
1387 |
+
if (fputcsv($ev_handle, $ar, ',') === FALSE) {
|
1388 |
+
break;
|
1389 |
+
}
|
1390 |
+
}
|
1391 |
+
@fclose($ev_handle);
|
1392 |
+
$files = array(
|
1393 |
+
'sc_categories.csv',
|
1394 |
+
'sc_calendars.csv',
|
1395 |
+
'sc_events.csv'
|
1396 |
+
);
|
1397 |
+
$zip = new ZipArchive();
|
1398 |
+
$tmp_file = tempnam('.', '');
|
1399 |
+
if ($zip->open($tmp_file, ZIPARCHIVE::CREATE) === TRUE) {
|
1400 |
+
foreach ($files as $file) {
|
1401 |
+
if (file_exists($tmp_folder . $file)) {
|
1402 |
+
$zip->addFile($tmp_folder . $file, $file);
|
1403 |
+
}
|
1404 |
+
}
|
1405 |
+
$zip->close();
|
1406 |
+
header("Content-type: application/zip; charset=utf-8");
|
1407 |
+
header("Content-Disposition: attachment; filename=spider-event-calendar-export.zip");
|
1408 |
+
header("Content-length: " . filesize($tmp_file));
|
1409 |
+
header("Pragma: no-cache");
|
1410 |
+
header("Expires: 0");
|
1411 |
+
readfile($tmp_file);
|
1412 |
+
}
|
1413 |
+
foreach ($files as $file) {
|
1414 |
+
@unlink($tmp_folder . $file);
|
1415 |
+
}
|
1416 |
+
}
|
1417 |
+
}
|
1418 |
+
|
1419 |
+
function calendar_export() {
|
1420 |
+
?>
|
1421 |
+
<form method="post" style="font-size: 14px; font-weight: bold;">
|
1422 |
+
<div id="export_div">
|
1423 |
+
This section will allow exporting Spider Calendar data (events, calendars, categories) for further import to Event Calendar WD.
|
1424 |
+
<a href="https://web-dorado.com/products/wordpress-event-calendar-wd.html" target="_blank" style="color:blue; text-decoration:none;">More...</a>
|
1425 |
+
</div>
|
1426 |
+
<input type='submit' value='Export' id="export_WD" name='export_spider_calendar' />
|
1427 |
+
</form>
|
1428 |
+
<style>
|
1429 |
+
#export_div{
|
1430 |
+
background: #fff;
|
1431 |
+
border: 1px solid #e5e5e5;
|
1432 |
+
-webkit-box-shadow: 0 1px 1px rgba(0,0,0,.04);
|
1433 |
+
box-shadow: 0 1px 1px rgba(0,0,0,.04);
|
1434 |
+
border-spacing: 0;
|
1435 |
+
width: 65%;
|
1436 |
+
clear: both;
|
1437 |
+
margin: 0;
|
1438 |
+
padding: 7px 7px 8px 10px;
|
1439 |
+
margin: 20px 0 10px 0;
|
1440 |
+
}
|
1441 |
+
|
1442 |
+
#export_WD{
|
1443 |
+
font-size: 13px;
|
1444 |
+
padding: 7px 25px;
|
1445 |
+
}
|
1446 |
+
</style>
|
1447 |
+
<?php
|
1448 |
+
}
|
1449 |
+
|
1450 |
// Activate plugin.
|
1451 |
function SpiderCalendar_activate() {
|
1452 |
global $wpdb;
|
calendar_functions.html.php
CHANGED
@@ -1323,6 +1323,9 @@ function html_add_spider_event($calendar_id, $cal_name) {
|
|
1323 |
if (form.date.value.search(/^[0-9]{4}\-(0[1-9]|1[012])\-(0[1-9]|[12][0-9]|3[01])/)) {
|
1324 |
alert('Invalid Date');
|
1325 |
}
|
|
|
|
|
|
|
1326 |
else if (form.selhour_from.value == "" && form.selminute_from.value == "" && form.selhour_to.value == "" && form.selminute_to.value == "") {
|
1327 |
submitform(pressbutton);
|
1328 |
}
|
@@ -1832,6 +1835,9 @@ function html_edit_spider_event($row, $calendar_id, $id, $cal_name) {
|
|
1832 |
if (form.date.value.search(/^[0-9]{4}\-(0[1-9]|1[012])\-(0[1-9]|[12][0-9]|3[01])/)) {
|
1833 |
alert('Invalid Date');
|
1834 |
}
|
|
|
|
|
|
|
1835 |
else if (form.date.value.search(/^[0-9]{4}\-(0[1-9]|1[012])\-(0[1-9]|[12][0-9]|3[01])/)) {
|
1836 |
alert('Invalid Date');
|
1837 |
}
|
1323 |
if (form.date.value.search(/^[0-9]{4}\-(0[1-9]|1[012])\-(0[1-9]|[12][0-9]|3[01])/)) {
|
1324 |
alert('Invalid Date');
|
1325 |
}
|
1326 |
+
else if(form.date_end.value == "" && form.repeat_method.value != "no_repeat"){
|
1327 |
+
alert('Invalid date end');
|
1328 |
+
}
|
1329 |
else if (form.selhour_from.value == "" && form.selminute_from.value == "" && form.selhour_to.value == "" && form.selminute_to.value == "") {
|
1330 |
submitform(pressbutton);
|
1331 |
}
|
1835 |
if (form.date.value.search(/^[0-9]{4}\-(0[1-9]|1[012])\-(0[1-9]|[12][0-9]|3[01])/)) {
|
1836 |
alert('Invalid Date');
|
1837 |
}
|
1838 |
+
else if(form.date_end.value == "" && form.repeat_method.value != "no_repeat"){
|
1839 |
+
alert('Invalid date end');
|
1840 |
+
}
|
1841 |
else if (form.date.value.search(/^[0-9]{4}\-(0[1-9]|1[012])\-(0[1-9]|[12][0-9]|3[01])/)) {
|
1842 |
alert('Invalid Date');
|
1843 |
}
|
calendar_functions.php
CHANGED
@@ -516,6 +516,9 @@ function apply_spider_event($calendar_id, $id) {
|
|
516 |
if ($date_end == '' && $repeat_method != 'no_repeat') {
|
517 |
$date_end = '2070-12-12';
|
518 |
}
|
|
|
|
|
|
|
519 |
$select_from = ((isset($_POST['select_from'])) ? esc_sql(esc_html(stripslashes($_POST['select_from']))) : '');
|
520 |
$select_to = ((isset($_POST['select_to'])) ? esc_sql(esc_html(stripslashes($_POST['select_to']))) : '');
|
521 |
$selhour_from = ((isset($_POST['selhour_from'])) ? esc_sql(esc_html(stripslashes($_POST['selhour_from']))) : '');
|
516 |
if ($date_end == '' && $repeat_method != 'no_repeat') {
|
517 |
$date_end = '2070-12-12';
|
518 |
}
|
519 |
+
else if ($date_end == '' && $repeat_method == 'no_repeat') {
|
520 |
+
$date_end = $date;
|
521 |
+
}
|
522 |
$select_from = ((isset($_POST['select_from'])) ? esc_sql(esc_html(stripslashes($_POST['select_from']))) : '');
|
523 |
$select_to = ((isset($_POST['select_to'])) ? esc_sql(esc_html(stripslashes($_POST['select_to']))) : '');
|
524 |
$selhour_from = ((isset($_POST['selhour_from'])) ? esc_sql(esc_html(stripslashes($_POST['selhour_from']))) : '');
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://web-dorado.com/products/wordpress-calendar.html
|
|
4 |
Tags: calendar, calendars, event, event calendar, event manager, events calendar,calendar widget, event registration, event management,events, Kalender, agenda, calendario, availability calendar,o nline calendar, holiday calendar, scheduling, free calendar, Calender, upcoming events, event widget , event list, calendar localization, Organizer, editorial calendar, Interactive Calendar, news calendar, meeting, appointment, event tracking, event organizer, upcoming events widget, event page, event bookings, recurring, recurring events, conference, date, dates, schedule, times, venue, AJAX, responsive, shortcode, seminar, summit, reservation
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 4.3
|
7 |
-
Stable tag: 1.4.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -142,6 +142,9 @@ Vietnamese (vi)
|
|
142 |
|
143 |
== Changelog ==
|
144 |
|
|
|
|
|
|
|
145 |
= 1.4.25 =
|
146 |
Changed: Compability with WordPress 4.3
|
147 |
|
4 |
Tags: calendar, calendars, event, event calendar, event manager, events calendar,calendar widget, event registration, event management,events, Kalender, agenda, calendario, availability calendar,o nline calendar, holiday calendar, scheduling, free calendar, Calender, upcoming events, event widget , event list, calendar localization, Organizer, editorial calendar, Interactive Calendar, news calendar, meeting, appointment, event tracking, event organizer, upcoming events widget, event page, event bookings, recurring, recurring events, conference, date, dates, schedule, times, venue, AJAX, responsive, shortcode, seminar, summit, reservation
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 4.3
|
7 |
+
Stable tag: 1.4.26
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
142 |
|
143 |
== Changelog ==
|
144 |
|
145 |
+
= 1.4.26 =
|
146 |
+
New: Export to Event Calendar WD
|
147 |
+
|
148 |
= 1.4.25 =
|
149 |
Changed: Compability with WordPress 4.3
|
150 |
|
style_for_cal/style_for_tables_cal.css
CHANGED
@@ -560,4 +560,19 @@ a img.calendar {
|
|
560 |
|
561 |
/* System Notice Messages */
|
562 |
#system-message dd.notice ul { color: #c00; background: #EFE7B8 url(../images/notice-note.png) 4px top no-repeat; border-top: 3px solid #F0DC7E; border-bottom: 3px solid #F0DC7E;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
563 |
}
|
560 |
|
561 |
/* System Notice Messages */
|
562 |
#system-message dd.notice ul { color: #c00; background: #EFE7B8 url(../images/notice-note.png) 4px top no-repeat; border-top: 3px solid #F0DC7E; border-bottom: 3px solid #F0DC7E;}
|
563 |
+
|
564 |
+
.wp-picker-container input[type=text].color_input.wp-color-picker{
|
565 |
+
display: block !important;
|
566 |
+
top: -30px;
|
567 |
+
position: relative;
|
568 |
+
left: 35px;
|
569 |
+
}
|
570 |
+
|
571 |
+
.wp-color-result:after,
|
572 |
+
.button.button-small.wp-picker-clear{
|
573 |
+
display: none !important;
|
574 |
+
}
|
575 |
+
|
576 |
+
.wp-color-result{
|
577 |
+
width: 67px !important;
|
578 |
}
|