Version Description
- Fixed problems with editing and deleting events or categories in multiblog installation
- Fixed escaping/character set issue
- Fixed issue when blog address and wp address did not match (introduced in 1.0.1)
- Added import method to transfer events and categories from Kieran O'Shea's Calendar plugin
Download this release
Release Info
Developer | joedolson |
Plugin | My Calendar |
Version | 1.0.2 |
Comparing to | |
See all releases |
Code changes from version 1.0.0 to 1.0.2
- date-utilities.php +6 -6
- my-calendar-categories.php +16 -16
- my-calendar-es_ES.mo +0 -0
- my-calendar-es_ES.po +864 -0
- my-calendar-event-manager.php +76 -52
- my-calendar-help.php +4 -1
- my-calendar-settings.php +103 -37
- my-calendar-widgets.php +24 -20
- my-calendar.php +145 -129
- my-calendar.pot +189 -154
- readme.txt +22 -6
- uninstall.php +1 -0
date-utilities.php
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
<?php
|
2 |
|
3 |
|
4 |
-
function
|
5 |
$cd = strtotime($givendate);
|
6 |
$newdate = date('Y-m-d', mktime(date('h',$cd),date('i',$cd), date('s',$cd), date('m',$cd)+$mth,date('d',$cd)+$day, date('Y',$cd)+$yr));
|
7 |
return $newdate;
|
8 |
}
|
9 |
-
function
|
10 |
$firstdate = strtotime($early);
|
11 |
$lastdate = strtotime($late);
|
12 |
if ($firstdate <= $lastdate) {
|
@@ -16,7 +16,7 @@ function date_comp($early,$late) {
|
|
16 |
}
|
17 |
}
|
18 |
|
19 |
-
function
|
20 |
$firstdate = strtotime($early);
|
21 |
$lastdate = strtotime($late);
|
22 |
if ($early == $late) {
|
@@ -27,7 +27,7 @@ function date_equal($early,$late) {
|
|
27 |
}
|
28 |
|
29 |
// Function to compare time in event objects
|
30 |
-
function
|
31 |
if ($a->event_time == $b->event_time) {
|
32 |
return 0;
|
33 |
}
|
@@ -35,7 +35,7 @@ function time_cmp($a, $b) {
|
|
35 |
}
|
36 |
|
37 |
// Function to compare datetime in event objects
|
38 |
-
function
|
39 |
$event_dt_a = strtotime($a->event_begin .' '. $a->event_time);
|
40 |
$event_dt_b = strtotime($b->event_begin .' '. $b->event_time);
|
41 |
if ($event_dt_a == $event_dt_b ) {
|
@@ -44,7 +44,7 @@ function datetime_cmp($a, $b) {
|
|
44 |
return ( $event_dt_a < $event_dt_b ) ? -1 : 1;
|
45 |
}
|
46 |
|
47 |
-
function
|
48 |
$event_dt_a = strtotime($a->event_begin .' '. $a->event_time);
|
49 |
$event_dt_b = strtotime($b->event_begin .' '. $b->event_time);
|
50 |
$diff_a = jd_date_diff_precise($event_dt_a);
|
1 |
<?php
|
2 |
|
3 |
|
4 |
+
function my_calendar_add_date($givendate,$day=0,$mth=0,$yr=0) {
|
5 |
$cd = strtotime($givendate);
|
6 |
$newdate = date('Y-m-d', mktime(date('h',$cd),date('i',$cd), date('s',$cd), date('m',$cd)+$mth,date('d',$cd)+$day, date('Y',$cd)+$yr));
|
7 |
return $newdate;
|
8 |
}
|
9 |
+
function my_calendar_date_comp($early,$late) {
|
10 |
$firstdate = strtotime($early);
|
11 |
$lastdate = strtotime($late);
|
12 |
if ($firstdate <= $lastdate) {
|
16 |
}
|
17 |
}
|
18 |
|
19 |
+
function my_calendar_date_equal($early,$late) {
|
20 |
$firstdate = strtotime($early);
|
21 |
$lastdate = strtotime($late);
|
22 |
if ($early == $late) {
|
27 |
}
|
28 |
|
29 |
// Function to compare time in event objects
|
30 |
+
function my_calendar_time_cmp($a, $b) {
|
31 |
if ($a->event_time == $b->event_time) {
|
32 |
return 0;
|
33 |
}
|
35 |
}
|
36 |
|
37 |
// Function to compare datetime in event objects
|
38 |
+
function my_calendar_datetime_cmp($a, $b) {
|
39 |
$event_dt_a = strtotime($a->event_begin .' '. $a->event_time);
|
40 |
$event_dt_b = strtotime($b->event_begin .' '. $b->event_time);
|
41 |
if ($event_dt_a == $event_dt_b ) {
|
44 |
return ( $event_dt_a < $event_dt_b ) ? -1 : 1;
|
45 |
}
|
46 |
|
47 |
+
function my_calendar_timediff_cmp($a, $b) {
|
48 |
$event_dt_a = strtotime($a->event_begin .' '. $a->event_time);
|
49 |
$event_dt_b = strtotime($b->event_begin .' '. $b->event_time);
|
50 |
$diff_a = jd_date_diff_precise($event_dt_a);
|
my-calendar-categories.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
// Function to handle the management of categories
|
3 |
|
4 |
-
function
|
5 |
$directory = dirname(__FILE__).'/icons/';
|
6 |
// create an array to hold directory list
|
7 |
$results = array();
|
@@ -22,37 +22,37 @@ $directory = dirname(__FILE__).'/icons/';
|
|
22 |
}
|
23 |
|
24 |
|
25 |
-
function
|
26 |
global $wpdb;
|
27 |
|
28 |
// My Calendar must be installed and upgraded before this will work
|
29 |
-
|
30 |
|
31 |
?>
|
32 |
<div class="wrap">
|
33 |
<?php
|
34 |
// We do some checking to see what we're doing
|
35 |
if (isset($_POST['mode']) && $_POST['mode'] == 'add') {
|
36 |
-
$sql = "INSERT INTO " . MY_CALENDAR_CATEGORIES_TABLE . " SET category_name='".
|
37 |
$wpdb->get_results($sql);
|
38 |
echo "<div class=\"updated\"><p><strong>".__('Category added successfully','my-calendar')."</strong></p></div>";
|
39 |
} else if (isset($_GET['mode']) && isset($_GET['category_id']) && $_GET['mode'] == 'delete') {
|
40 |
-
$sql = "DELETE FROM " . MY_CALENDAR_CATEGORIES_TABLE . " WHERE category_id=".
|
41 |
$wpdb->get_results($sql);
|
42 |
-
$sql = "UPDATE " . MY_CALENDAR_TABLE . " SET event_category=1 WHERE event_category=".
|
43 |
$wpdb->get_results($sql);
|
44 |
echo "<div class=\"updated\"><p><strong>".__('Category deleted successfully','my-calendar')."</strong></p></div>";
|
45 |
} else if (isset($_GET['mode']) && isset($_GET['category_id']) && $_GET['mode'] == 'edit' && !isset($_POST['mode'])) {
|
46 |
-
$sql = "SELECT * FROM " . MY_CALENDAR_CATEGORIES_TABLE . " WHERE category_id=".
|
47 |
$cur_cat = $wpdb->get_row($sql);
|
48 |
?>
|
49 |
<h2><?php _e('Edit Category','my-calendar'); ?></h2>
|
50 |
-
<?php
|
51 |
<div id="poststuff" class="jd-my-calendar">
|
52 |
<div class="postbox">
|
53 |
<h3><?php _e('Category Editor','my-calendar'); ?></h3>
|
54 |
<div class="inside">
|
55 |
-
<form name="my-calendar" id="my-calendar" method="post" action="<?php
|
56 |
<div>
|
57 |
<input type="hidden" name="mode" value="edit" />
|
58 |
<input type="hidden" name="category_id" value="<?php echo $cur_cat->category_id ?>" />
|
@@ -63,7 +63,7 @@ function manage_categories() {
|
|
63 |
<label for="category_color"><?php _e('Category Color (Hex format)','my-calendar'); ?>:</label> <input type="text" id="category_color" name="category_color" class="input" size="10" maxlength="7" value="<?php echo $cur_cat->category_color ?>" /><br />
|
64 |
<label for="category_icon"><?php _e('Category Icon','my-calendar'); ?>:</label> <select name="category_icon" id="category_icon">
|
65 |
<?php
|
66 |
-
$files =
|
67 |
foreach ($files as $value) {
|
68 |
if ($cur_cat->category_icon == $value) {
|
69 |
$selected = " selected='selected'";
|
@@ -84,7 +84,7 @@ if ($cur_cat->category_icon == $value) {
|
|
84 |
</div>
|
85 |
<?php
|
86 |
} else if (isset($_POST['mode']) && isset($_POST['category_id']) && isset($_POST['category_name']) && isset($_POST['category_color']) && $_POST['mode'] == 'edit') {
|
87 |
-
$sql = "UPDATE " . MY_CALENDAR_CATEGORIES_TABLE . " SET category_name='".
|
88 |
$wpdb->get_results($sql);
|
89 |
echo "<div class=\"updated\"><p><strong>".__('Category edited successfully','my-calendar')."</strong></p></div>";
|
90 |
}
|
@@ -93,12 +93,12 @@ if ($cur_cat->category_icon == $value) {
|
|
93 |
?>
|
94 |
|
95 |
<h2><?php _e('Add Category','my-calendar'); ?></h2>
|
96 |
-
<?php
|
97 |
<div id="poststuff" class="jd-my-calendar">
|
98 |
<div class="postbox">
|
99 |
<h3><?php _e('Add New Category','my-calendar'); ?></h3>
|
100 |
<div class="inside">
|
101 |
-
<form name="my-calendar" id="my-calendar" method="post" action="<?php
|
102 |
<div>
|
103 |
<input type="hidden" name="mode" value="add" />
|
104 |
<input type="hidden" name="category_id" value="" />
|
@@ -109,7 +109,7 @@ if ($cur_cat->category_icon == $value) {
|
|
109 |
<label for="category_color"><?php _e('Category Color (Hex format)','my-calendar'); ?>:</label> <input type="text" id="category_color" name="category_color" class="input" size="10" maxlength="7" value="#" /><br />
|
110 |
<label for="category_icon"><?php _e('Category Icon','my-calendar'); ?>:</label> <select name="category_icon" id="category_icon">
|
111 |
<?php
|
112 |
-
$files =
|
113 |
foreach ($files as $value) {
|
114 |
echo "<option value='$value' style='background: url(".WP_PLUGIN_URL."/my-calendar/icons/$value) no-repeat;'>$value</option>";
|
115 |
}
|
@@ -153,13 +153,13 @@ foreach ($files as $value) {
|
|
153 |
<td><?php echo $category->category_name; ?></td>
|
154 |
<td style="background-color:<?php echo $category->category_color; ?>;"> </td>
|
155 |
<td style="background-color:<?php echo $category->category_color; ?>;"><img src="<?php echo WP_PLUGIN_URL; ?>/my-calendar/icons/<?php echo $category->category_icon; ?>" alt="" /></td>
|
156 |
-
<td><a href="<?php
|
157 |
<?php
|
158 |
if ($category->category_id == 1) {
|
159 |
echo '<td>'.__('N/A','my-calendar').'</td>';
|
160 |
} else {
|
161 |
?>
|
162 |
-
<td><a href="<?php
|
163 |
<?php
|
164 |
}
|
165 |
?>
|
1 |
<?php
|
2 |
// Function to handle the management of categories
|
3 |
|
4 |
+
function my_dirlist() {
|
5 |
$directory = dirname(__FILE__).'/icons/';
|
6 |
// create an array to hold directory list
|
7 |
$results = array();
|
22 |
}
|
23 |
|
24 |
|
25 |
+
function my_calendar_manage_categories() {
|
26 |
global $wpdb;
|
27 |
|
28 |
// My Calendar must be installed and upgraded before this will work
|
29 |
+
check_my_calendar();
|
30 |
|
31 |
?>
|
32 |
<div class="wrap">
|
33 |
<?php
|
34 |
// We do some checking to see what we're doing
|
35 |
if (isset($_POST['mode']) && $_POST['mode'] == 'add') {
|
36 |
+
$sql = "INSERT INTO " . MY_CALENDAR_CATEGORIES_TABLE . " SET category_name='".mysql_real_escape_string($_POST['category_name'])."', category_color='".mysql_real_escape_string($_POST['category_color'])."', category_icon='".mysql_real_escape_string($_POST['category_icon'])."'";
|
37 |
$wpdb->get_results($sql);
|
38 |
echo "<div class=\"updated\"><p><strong>".__('Category added successfully','my-calendar')."</strong></p></div>";
|
39 |
} else if (isset($_GET['mode']) && isset($_GET['category_id']) && $_GET['mode'] == 'delete') {
|
40 |
+
$sql = "DELETE FROM " . MY_CALENDAR_CATEGORIES_TABLE . " WHERE category_id=".mysql_real_escape_string($_GET['category_id']);
|
41 |
$wpdb->get_results($sql);
|
42 |
+
$sql = "UPDATE " . MY_CALENDAR_TABLE . " SET event_category=1 WHERE event_category=".mysql_real_escape_string($_GET['category_id']);
|
43 |
$wpdb->get_results($sql);
|
44 |
echo "<div class=\"updated\"><p><strong>".__('Category deleted successfully','my-calendar')."</strong></p></div>";
|
45 |
} else if (isset($_GET['mode']) && isset($_GET['category_id']) && $_GET['mode'] == 'edit' && !isset($_POST['mode'])) {
|
46 |
+
$sql = "SELECT * FROM " . MY_CALENDAR_CATEGORIES_TABLE . " WHERE category_id=".mysql_real_escape_string($_GET['category_id']);
|
47 |
$cur_cat = $wpdb->get_row($sql);
|
48 |
?>
|
49 |
<h2><?php _e('Edit Category','my-calendar'); ?></h2>
|
50 |
+
<?php jd_show_support_box(); ?>
|
51 |
<div id="poststuff" class="jd-my-calendar">
|
52 |
<div class="postbox">
|
53 |
<h3><?php _e('Category Editor','my-calendar'); ?></h3>
|
54 |
<div class="inside">
|
55 |
+
<form name="my-calendar" id="my-calendar" method="post" action="<?php bloginfo('wpurl'); ?>/wp-admin/admin.php?page=my-calendar-categories">
|
56 |
<div>
|
57 |
<input type="hidden" name="mode" value="edit" />
|
58 |
<input type="hidden" name="category_id" value="<?php echo $cur_cat->category_id ?>" />
|
63 |
<label for="category_color"><?php _e('Category Color (Hex format)','my-calendar'); ?>:</label> <input type="text" id="category_color" name="category_color" class="input" size="10" maxlength="7" value="<?php echo $cur_cat->category_color ?>" /><br />
|
64 |
<label for="category_icon"><?php _e('Category Icon','my-calendar'); ?>:</label> <select name="category_icon" id="category_icon">
|
65 |
<?php
|
66 |
+
$files = my_dirlist();
|
67 |
foreach ($files as $value) {
|
68 |
if ($cur_cat->category_icon == $value) {
|
69 |
$selected = " selected='selected'";
|
84 |
</div>
|
85 |
<?php
|
86 |
} else if (isset($_POST['mode']) && isset($_POST['category_id']) && isset($_POST['category_name']) && isset($_POST['category_color']) && $_POST['mode'] == 'edit') {
|
87 |
+
$sql = "UPDATE " . MY_CALENDAR_CATEGORIES_TABLE . " SET category_name='".mysql_real_escape_string($_POST['category_name'])."', category_color='".mysql_real_escape_string($_POST['category_color'])."', category_icon='".mysql_real_escape_string($_POST['category_icon'])."' WHERE category_id=".mysql_real_escape_string($_POST['category_id']);
|
88 |
$wpdb->get_results($sql);
|
89 |
echo "<div class=\"updated\"><p><strong>".__('Category edited successfully','my-calendar')."</strong></p></div>";
|
90 |
}
|
93 |
?>
|
94 |
|
95 |
<h2><?php _e('Add Category','my-calendar'); ?></h2>
|
96 |
+
<?php jd_show_support_box(); ?>
|
97 |
<div id="poststuff" class="jd-my-calendar">
|
98 |
<div class="postbox">
|
99 |
<h3><?php _e('Add New Category','my-calendar'); ?></h3>
|
100 |
<div class="inside">
|
101 |
+
<form name="my-calendar" id="my-calendar" method="post" action="<?php bloginfo('wpurl'); ?>/wp-admin/admin.php?page=my-calendar-categories">
|
102 |
<div>
|
103 |
<input type="hidden" name="mode" value="add" />
|
104 |
<input type="hidden" name="category_id" value="" />
|
109 |
<label for="category_color"><?php _e('Category Color (Hex format)','my-calendar'); ?>:</label> <input type="text" id="category_color" name="category_color" class="input" size="10" maxlength="7" value="#" /><br />
|
110 |
<label for="category_icon"><?php _e('Category Icon','my-calendar'); ?>:</label> <select name="category_icon" id="category_icon">
|
111 |
<?php
|
112 |
+
$files = my_dirlist();
|
113 |
foreach ($files as $value) {
|
114 |
echo "<option value='$value' style='background: url(".WP_PLUGIN_URL."/my-calendar/icons/$value) no-repeat;'>$value</option>";
|
115 |
}
|
153 |
<td><?php echo $category->category_name; ?></td>
|
154 |
<td style="background-color:<?php echo $category->category_color; ?>;"> </td>
|
155 |
<td style="background-color:<?php echo $category->category_color; ?>;"><img src="<?php echo WP_PLUGIN_URL; ?>/my-calendar/icons/<?php echo $category->category_icon; ?>" alt="" /></td>
|
156 |
+
<td><a href="<?php bloginfo('wpurl'); ?>/wp-admin/admin.php?page=my-calendar-categories&mode=edit&category_id=<?php echo $category->category_id;?>" class='edit'><?php echo __('Edit','my-calendar'); ?></a></td>
|
157 |
<?php
|
158 |
if ($category->category_id == 1) {
|
159 |
echo '<td>'.__('N/A','my-calendar').'</td>';
|
160 |
} else {
|
161 |
?>
|
162 |
+
<td><a href="<?php bloginfo('wpurl'); ?>/wp-admin/admin.php?page=my-calendar-categories&mode=delete&category_id=<?php echo $category->category_id;?>" class="delete" onclick="return confirm('<?php echo __('Are you sure you want to delete this category?','my-calendar'); ?>')"><?php echo __('Delete','my-calendar'); ?></a></td>
|
163 |
<?php
|
164 |
}
|
165 |
?>
|
my-calendar-es_ES.mo
ADDED
Binary file
|
my-calendar-es_ES.po
ADDED
@@ -0,0 +1,864 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Translation of the WordPress plugin My Calendar 1.0.0 by Joseph C Dolson.
|
2 |
+
# Copyright (C) 2010 Joseph C Dolson
|
3 |
+
# This file is distributed under the same license as the My Calendar package.
|
4 |
+
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
5 |
+
#
|
6 |
+
msgid ""
|
7 |
+
msgstr ""
|
8 |
+
"Project-Id-Version: My Calendar 1.0.0\n"
|
9 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/my-calendar\n"
|
10 |
+
"POT-Creation-Date: 2010-04-05 23:03+0000\n"
|
11 |
+
"PO-Revision-Date: 2010-04-07 11:46-0300\n"
|
12 |
+
"Last-Translator: Esteban <esteban@netmdp.com>\n"
|
13 |
+
"Language-Team: www.netmdp.com <esteban@netmdp.com>\n"
|
14 |
+
"MIME-Version: 1.0\n"
|
15 |
+
"Content-Type: text/plain; charset=utf-8\n"
|
16 |
+
"Content-Transfer-Encoding: 8bit\n"
|
17 |
+
"X-Poedit-Language: Spanish\n"
|
18 |
+
"X-Poedit-Country: ARGENTINA\n"
|
19 |
+
|
20 |
+
#: my-calendar-categories.php:38
|
21 |
+
msgid "Category added successfully"
|
22 |
+
msgstr "Categoría agregada exitosamente"
|
23 |
+
|
24 |
+
#: my-calendar-categories.php:44
|
25 |
+
msgid "Category deleted successfully"
|
26 |
+
msgstr "Categoría eliminada exitosamente"
|
27 |
+
|
28 |
+
#: my-calendar-categories.php:49
|
29 |
+
#: my-calendar-categories.php:61
|
30 |
+
msgid "Edit Category"
|
31 |
+
msgstr "Editar Categoría"
|
32 |
+
|
33 |
+
#: my-calendar-categories.php:53
|
34 |
+
msgid "Category Editor"
|
35 |
+
msgstr "Editor de categoría"
|
36 |
+
|
37 |
+
#: my-calendar-categories.php:62
|
38 |
+
#: my-calendar-categories.php:108
|
39 |
+
#: my-calendar-categories.php:139
|
40 |
+
msgid "Category Name"
|
41 |
+
msgstr "Nombre de categoría"
|
42 |
+
|
43 |
+
#: my-calendar-categories.php:63
|
44 |
+
#: my-calendar-categories.php:109
|
45 |
+
msgid "Category Color (Hex format)"
|
46 |
+
msgstr "Color de Categoría (Formato Hex)"
|
47 |
+
|
48 |
+
#: my-calendar-categories.php:64
|
49 |
+
#: my-calendar-categories.php:110
|
50 |
+
#: my-calendar-categories.php:141
|
51 |
+
msgid "Category Icon"
|
52 |
+
msgstr "Icono de Categoría"
|
53 |
+
|
54 |
+
#: my-calendar-categories.php:79
|
55 |
+
msgid "Save Changes"
|
56 |
+
msgstr "Guardar cambios"
|
57 |
+
|
58 |
+
#: my-calendar-categories.php:89
|
59 |
+
msgid "Category edited successfully"
|
60 |
+
msgstr "Categoría editada exitosamente"
|
61 |
+
|
62 |
+
#: my-calendar-categories.php:95
|
63 |
+
#: my-calendar-categories.php:107
|
64 |
+
#: my-calendar-categories.php:120
|
65 |
+
msgid "Add Category"
|
66 |
+
msgstr "Agregar Categoría"
|
67 |
+
|
68 |
+
#: my-calendar-categories.php:99
|
69 |
+
msgid "Add New Category"
|
70 |
+
msgstr "Agregar Nueva Categoría"
|
71 |
+
|
72 |
+
#: my-calendar-categories.php:126
|
73 |
+
#: my-calendar.php:127
|
74 |
+
msgid "Manage Categories"
|
75 |
+
msgstr "Administrar Categorías"
|
76 |
+
|
77 |
+
#: my-calendar-categories.php:138
|
78 |
+
#: my-calendar-event-manager.php:592
|
79 |
+
msgid "ID"
|
80 |
+
msgstr "ID"
|
81 |
+
|
82 |
+
#: my-calendar-categories.php:140
|
83 |
+
msgid "Category Color"
|
84 |
+
msgstr "Color de Categoría"
|
85 |
+
|
86 |
+
#: my-calendar-categories.php:142
|
87 |
+
#: my-calendar-categories.php:156
|
88 |
+
#: my-calendar-event-manager.php:640
|
89 |
+
msgid "Edit"
|
90 |
+
msgstr "Editar"
|
91 |
+
|
92 |
+
#: my-calendar-categories.php:143
|
93 |
+
#: my-calendar-categories.php:162
|
94 |
+
#: my-calendar-event-manager.php:33
|
95 |
+
#: my-calendar-event-manager.php:640
|
96 |
+
msgid "Delete"
|
97 |
+
msgstr "Borrar"
|
98 |
+
|
99 |
+
#: my-calendar-categories.php:159
|
100 |
+
#: my-calendar-event-manager.php:628
|
101 |
+
#: my-calendar.php:796
|
102 |
+
msgid "N/A"
|
103 |
+
msgstr "N/D"
|
104 |
+
|
105 |
+
#: my-calendar-categories.php:162
|
106 |
+
msgid "Are you sure you want to delete this category?"
|
107 |
+
msgstr "¿Está seguro de que desea borrar esta categoría?"
|
108 |
+
|
109 |
+
#: my-calendar-categories.php:173
|
110 |
+
msgid "There are no categories in the database - something has gone wrong!"
|
111 |
+
msgstr "No hay categorías en la base de datos - ¡Algo va mal!"
|
112 |
+
|
113 |
+
#: my-calendar-event-manager.php:28
|
114 |
+
msgid "Delete Event"
|
115 |
+
msgstr "Borrar evento"
|
116 |
+
|
117 |
+
#: my-calendar-event-manager.php:28
|
118 |
+
msgid "Are you sure you want to delete this event?"
|
119 |
+
msgstr "¿Está seguro de que desea borrar este evento?"
|
120 |
+
|
121 |
+
#: my-calendar-event-manager.php:99
|
122 |
+
#: my-calendar-event-manager.php:104
|
123 |
+
#: my-calendar-event-manager.php:109
|
124 |
+
#: my-calendar-event-manager.php:119
|
125 |
+
#: my-calendar-event-manager.php:127
|
126 |
+
#: my-calendar-event-manager.php:135
|
127 |
+
#: my-calendar-event-manager.php:143
|
128 |
+
#: my-calendar-event-manager.php:174
|
129 |
+
#: my-calendar-event-manager.php:265
|
130 |
+
#: my-calendar-event-manager.php:270
|
131 |
+
#: my-calendar-event-manager.php:275
|
132 |
+
#: my-calendar-event-manager.php:285
|
133 |
+
#: my-calendar-event-manager.php:293
|
134 |
+
#: my-calendar-event-manager.php:301
|
135 |
+
#: my-calendar-event-manager.php:309
|
136 |
+
#: my-calendar-event-manager.php:374
|
137 |
+
#: my-calendar-event-manager.php:389
|
138 |
+
msgid "Error"
|
139 |
+
msgstr "Error"
|
140 |
+
|
141 |
+
#: my-calendar-event-manager.php:99
|
142 |
+
#: my-calendar-event-manager.php:265
|
143 |
+
msgid "Your event end date must be either after or the same as your event begin date"
|
144 |
+
msgstr "La fecha de fin del evento debe ser igual o posterior a la fecha de comienzo"
|
145 |
+
|
146 |
+
#: my-calendar-event-manager.php:104
|
147 |
+
#: my-calendar-event-manager.php:270
|
148 |
+
msgid "Your date formatting is correct but one or more of your dates is invalid. Check for number of days in month and leap year related errors."
|
149 |
+
msgstr "El formato de fecha es correto pero una o mas de sus fechas son inválidas. Revise números de días puestos en lugar de los meses y errores relacionados a años bisiestos."
|
150 |
+
|
151 |
+
#: my-calendar-event-manager.php:109
|
152 |
+
#: my-calendar-event-manager.php:275
|
153 |
+
msgid "Both start and end dates must be entered and be in the format YYYY-MM-DD"
|
154 |
+
msgstr "Ambas fechas de inicio y fin deben ser ingresadas y con el formato YYYY-MM-DD"
|
155 |
+
|
156 |
+
#: my-calendar-event-manager.php:119
|
157 |
+
#: my-calendar-event-manager.php:285
|
158 |
+
msgid "The time field must either be blank or be entered in the format hh:mm"
|
159 |
+
msgstr "El campo de hora o bien debe estar en blanco o ingresado con el formato hh:mm"
|
160 |
+
|
161 |
+
#: my-calendar-event-manager.php:127
|
162 |
+
#: my-calendar-event-manager.php:293
|
163 |
+
msgid "The URL entered must either be prefixed with http:// or be completely blank"
|
164 |
+
msgstr "La URL ingresada debe comenzar con el prefijo http:// o estar completamente en blanco"
|
165 |
+
|
166 |
+
#: my-calendar-event-manager.php:135
|
167 |
+
#: my-calendar-event-manager.php:301
|
168 |
+
msgid "The event title must be between 1 and 60 characters in length. Some punctuation characters may not be allowed."
|
169 |
+
msgstr "El título del evento debe tener de 1 a 60 caracteres. Algunos signos de puntuación pueden no ser permitidos."
|
170 |
+
|
171 |
+
#: my-calendar-event-manager.php:143
|
172 |
+
#: my-calendar-event-manager.php:309
|
173 |
+
msgid "The repetition value must be 0 unless a type of recurrance is selected in which case the repetition value must be 0 or higher"
|
174 |
+
msgstr "El valor de repetición debe ser 0 a menos que seleccione un tipo de recurrencia, entonces la repetición debe ser 0 o más."
|
175 |
+
|
176 |
+
#: my-calendar-event-manager.php:174
|
177 |
+
msgid "An event with the details you submitted could not be found in the database. This may indicate a problem with your database or the way in which it is configured."
|
178 |
+
msgstr "El evento con los detalles que envió no se encuentra en la base de datos. Esto indica un problema con la base de datos o en como fue configurado."
|
179 |
+
|
180 |
+
#: my-calendar-event-manager.php:178
|
181 |
+
msgid "Event added. It will now show in your calendar."
|
182 |
+
msgstr "Evento agregado. Ya se mostrará en su calendario."
|
183 |
+
|
184 |
+
#: my-calendar-event-manager.php:242
|
185 |
+
#: my-calendar-event-manager.php:341
|
186 |
+
msgid "Failure"
|
187 |
+
msgstr "Falla"
|
188 |
+
|
189 |
+
#: my-calendar-event-manager.php:242
|
190 |
+
msgid "You can't update an event if you haven't submitted an event id"
|
191 |
+
msgstr "No puedes actualizar un evento si no tienes un id de evento envíado"
|
192 |
+
|
193 |
+
#: my-calendar-event-manager.php:341
|
194 |
+
msgid "The database failed to return data to indicate the event has been updated sucessfully. This may indicate a problem with your database or the way in which it is configured."
|
195 |
+
msgstr "La base de datos falló al devolver los datos para indicar que el evento fue actualizado exitosamente. Esto puede indicar un problema con su base de datos o en como está configurada."
|
196 |
+
|
197 |
+
#: my-calendar-event-manager.php:345
|
198 |
+
msgid "Event updated successfully"
|
199 |
+
msgstr "Evento actualizado exitosamente"
|
200 |
+
|
201 |
+
#: my-calendar-event-manager.php:374
|
202 |
+
msgid "You can't delete an event if you haven't submitted an event id"
|
203 |
+
msgstr "No puedes borrar un evento si no tienes un id de evento envíado"
|
204 |
+
|
205 |
+
#: my-calendar-event-manager.php:385
|
206 |
+
msgid "Event deleted successfully"
|
207 |
+
msgstr "Evento borrado exitosamente"
|
208 |
+
|
209 |
+
#: my-calendar-event-manager.php:389
|
210 |
+
msgid "Despite issuing a request to delete, the event still remains in the database. Please investigate."
|
211 |
+
msgstr "A pesar de la solicitud para eliminar, el evento sigue estando en la base de datos. Por favor, investigue."
|
212 |
+
|
213 |
+
#: my-calendar-event-manager.php:404
|
214 |
+
#: my-calendar-event-manager.php:458
|
215 |
+
msgid "Edit Event"
|
216 |
+
msgstr "Editar evento"
|
217 |
+
|
218 |
+
#: my-calendar-event-manager.php:408
|
219 |
+
msgid "You must provide an event id in order to edit it"
|
220 |
+
msgstr "Debes proveer un id de evento para poder editarlo"
|
221 |
+
|
222 |
+
#: my-calendar-event-manager.php:414
|
223 |
+
msgid "Add Event"
|
224 |
+
msgstr "Nuevo evento"
|
225 |
+
|
226 |
+
#: my-calendar-event-manager.php:419
|
227 |
+
msgid "Manage Events"
|
228 |
+
msgstr "Administrar Eventos"
|
229 |
+
|
230 |
+
#: my-calendar-event-manager.php:436
|
231 |
+
msgid "Sorry! That's an invalid event key."
|
232 |
+
msgstr "Lo siento. Esa es una clave de evento erronea."
|
233 |
+
|
234 |
+
#: my-calendar-event-manager.php:441
|
235 |
+
msgid "Sorry! We couldn't find an event with that ID."
|
236 |
+
msgstr "Lo siento. No podemos encontrar un evento con ese ID."
|
237 |
+
|
238 |
+
#: my-calendar-event-manager.php:458
|
239 |
+
msgid "Add an Event"
|
240 |
+
msgstr "Agregar un Evento"
|
241 |
+
|
242 |
+
#: my-calendar-event-manager.php:466
|
243 |
+
msgid "Enter your Event Information"
|
244 |
+
msgstr "Ingrese la información de su evento"
|
245 |
+
|
246 |
+
#: my-calendar-event-manager.php:468
|
247 |
+
msgid "Event Title"
|
248 |
+
msgstr "Título del Evento"
|
249 |
+
|
250 |
+
#: my-calendar-event-manager.php:471
|
251 |
+
msgid "Event Description (<abbr title=\"hypertext markup language\">HTML</abbr> allowed)"
|
252 |
+
msgstr "Descripción del evento (<abbr title=\"hypertext markup language\">HTML</abbr> permitido)"
|
253 |
+
|
254 |
+
#: my-calendar-event-manager.php:474
|
255 |
+
msgid "Event Category"
|
256 |
+
msgstr "Categoría del Evento "
|
257 |
+
|
258 |
+
#: my-calendar-event-manager.php:493
|
259 |
+
msgid "Event Link (Optional)"
|
260 |
+
msgstr "Link del evento (Opcional)"
|
261 |
+
|
262 |
+
#: my-calendar-event-manager.php:496
|
263 |
+
msgid "Start Date (YYYY-MM-DD)"
|
264 |
+
msgstr "Comienza el (YYYY-MM-DD)"
|
265 |
+
|
266 |
+
#: my-calendar-event-manager.php:499
|
267 |
+
msgid "End Date (YYYY-MM-DD) (Optional)"
|
268 |
+
msgstr "Finaliza (YYYY-MM-DD) (Opcional)"
|
269 |
+
|
270 |
+
#: my-calendar-event-manager.php:502
|
271 |
+
msgid "Time (hh:mm)"
|
272 |
+
msgstr "hora (hh:mm)"
|
273 |
+
|
274 |
+
#: my-calendar-event-manager.php:513
|
275 |
+
msgid "Optional, set blank if your event is an all-day event or does not happen at a specific time."
|
276 |
+
msgstr "Opcional, deje en blanco si su evento es \"todo el día\" o no es a una hora específica."
|
277 |
+
|
278 |
+
#: my-calendar-event-manager.php:513
|
279 |
+
msgid "Current time difference from GMT is "
|
280 |
+
msgstr "La diferencia es GMT "
|
281 |
+
|
282 |
+
#: my-calendar-event-manager.php:513
|
283 |
+
msgid " hour(s)"
|
284 |
+
msgstr " hora(s)"
|
285 |
+
|
286 |
+
#: my-calendar-event-manager.php:517
|
287 |
+
msgid "Recurring Events"
|
288 |
+
msgstr "Eventos Recurrentes"
|
289 |
+
|
290 |
+
#: my-calendar-event-manager.php:536
|
291 |
+
msgid "Repeats for"
|
292 |
+
msgstr "Repite por"
|
293 |
+
|
294 |
+
#: my-calendar-event-manager.php:537
|
295 |
+
msgid "Units"
|
296 |
+
msgstr "Unidades"
|
297 |
+
|
298 |
+
#: my-calendar-event-manager.php:544
|
299 |
+
msgid "Entering 0 means forever, if a unit is selected. If the recurrance unit is left at \"Does not recur,\" the event will not reoccur."
|
300 |
+
msgstr "Ingresar 0 significa para siempre, si una unidad es seleccionada. Si la unidad se deja en \"No se repite,\" el evento no vuelva a aparecer."
|
301 |
+
|
302 |
+
#: my-calendar-event-manager.php:551
|
303 |
+
msgid "All location fields are optional: <em>insufficient information may result in an inaccurate map</em>."
|
304 |
+
msgstr "Todos los campos de ubicación son opcionales: <em>insuficiente información puede resultar en un mapa inexacto</em>."
|
305 |
+
|
306 |
+
#: my-calendar-event-manager.php:554
|
307 |
+
msgid "Name of Location (e.g. <em>Joe's Bar and Grill</em>)"
|
308 |
+
msgstr "Nombre de la Ubicacion (ej. <em>Parrilla Lo de Carlitos</em>)"
|
309 |
+
|
310 |
+
#: my-calendar-event-manager.php:557
|
311 |
+
msgid "Street Address"
|
312 |
+
msgstr "Dirección"
|
313 |
+
|
314 |
+
#: my-calendar-event-manager.php:560
|
315 |
+
msgid "Street Address (2)"
|
316 |
+
msgstr "Dirección(2)"
|
317 |
+
|
318 |
+
#: my-calendar-event-manager.php:563
|
319 |
+
msgid "City"
|
320 |
+
msgstr "Ciudad"
|
321 |
+
|
322 |
+
#: my-calendar-event-manager.php:563
|
323 |
+
msgid "State/Province"
|
324 |
+
msgstr "Estado/provincia"
|
325 |
+
|
326 |
+
#: my-calendar-event-manager.php:563
|
327 |
+
msgid "Postal Code"
|
328 |
+
msgstr "Código postal"
|
329 |
+
|
330 |
+
#: my-calendar-event-manager.php:566
|
331 |
+
msgid "Country"
|
332 |
+
msgstr "País"
|
333 |
+
|
334 |
+
#: my-calendar-event-manager.php:571
|
335 |
+
msgid "Save Event"
|
336 |
+
msgstr "Grabar Evento"
|
337 |
+
|
338 |
+
#: my-calendar-event-manager.php:593
|
339 |
+
#: my-calendar-widgets.php:32
|
340 |
+
#: my-calendar-widgets.php:108
|
341 |
+
msgid "Title"
|
342 |
+
msgstr "Titulo"
|
343 |
+
|
344 |
+
#: my-calendar-event-manager.php:594
|
345 |
+
msgid "Description"
|
346 |
+
msgstr "Descripción"
|
347 |
+
|
348 |
+
#: my-calendar-event-manager.php:595
|
349 |
+
msgid "Start Date"
|
350 |
+
msgstr "Fecha de inicio"
|
351 |
+
|
352 |
+
#: my-calendar-event-manager.php:597
|
353 |
+
msgid "Recurs"
|
354 |
+
msgstr "Repeticiones"
|
355 |
+
|
356 |
+
#: my-calendar-event-manager.php:598
|
357 |
+
msgid "Repeats"
|
358 |
+
msgstr "Repeticiones"
|
359 |
+
|
360 |
+
#: my-calendar-event-manager.php:599
|
361 |
+
#: my-calendar-settings.php:107
|
362 |
+
msgid "Author"
|
363 |
+
msgstr "Autor"
|
364 |
+
|
365 |
+
#: my-calendar-event-manager.php:600
|
366 |
+
msgid "Category"
|
367 |
+
msgstr "Categoría"
|
368 |
+
|
369 |
+
#: my-calendar-event-manager.php:601
|
370 |
+
msgid "Edit / Delete"
|
371 |
+
msgstr "Editar / Borrar"
|
372 |
+
|
373 |
+
#: my-calendar-event-manager.php:618
|
374 |
+
msgid "Never"
|
375 |
+
msgstr "Nunca"
|
376 |
+
|
377 |
+
#: my-calendar-event-manager.php:619
|
378 |
+
msgid "Daily"
|
379 |
+
msgstr "Diariamente"
|
380 |
+
|
381 |
+
#: my-calendar-event-manager.php:620
|
382 |
+
msgid "Weekly"
|
383 |
+
msgstr "Semanalmente"
|
384 |
+
|
385 |
+
#: my-calendar-event-manager.php:621
|
386 |
+
msgid "Monthly"
|
387 |
+
msgstr "Mensualmente"
|
388 |
+
|
389 |
+
#: my-calendar-event-manager.php:622
|
390 |
+
msgid "Yearly"
|
391 |
+
msgstr "Anualmente"
|
392 |
+
|
393 |
+
#: my-calendar-event-manager.php:629
|
394 |
+
msgid "Forever"
|
395 |
+
msgstr "Para siempre"
|
396 |
+
|
397 |
+
#: my-calendar-event-manager.php:630
|
398 |
+
msgid "Times"
|
399 |
+
msgstr "Veces"
|
400 |
+
|
401 |
+
#: my-calendar-event-manager.php:648
|
402 |
+
msgid "There are no events in the database!"
|
403 |
+
msgstr "¡No hay eventos en la base de datos!"
|
404 |
+
|
405 |
+
#: my-calendar-help.php:6
|
406 |
+
msgid "How to use My Calendar"
|
407 |
+
msgstr "Cómo usar My Calendar"
|
408 |
+
|
409 |
+
#: my-calendar-help.php:11
|
410 |
+
msgid "Shortcode Syntax"
|
411 |
+
msgstr "Sintáxis Shortcode"
|
412 |
+
|
413 |
+
#: my-calendar-help.php:16
|
414 |
+
msgid "This basic shortcode will show the calendar on a post or page including all categories and the category key, in a traditional month-by-month format."
|
415 |
+
msgstr "Este shortcode básico mostrará el calendario en una entrada o página incluyendo todas las categorías y la clave de categoría, en el formato tradicional mes-por-mes."
|
416 |
+
|
417 |
+
#: my-calendar-help.php:19
|
418 |
+
msgid "The shortcode supports three attributes, <code>category</code>, <code>format</code> and <code>showkey</code>. There is currently only one alternate option for <code>format</code> — <code>list</code> — which will show the calendar in a list format, skipping dates without any events. The <code>category</code> attribute requires either the name of or ID number one of your event categories (the name is case-sensitive). This will show a calendar only including events in that category. Setting <code>showkey</code> to <code>no</code> will prevent the category key from being displayed — this can be useful with single-category output."
|
419 |
+
msgstr "El shortcode soporta tres atributos, <code>category</code>, <code>format</code> y <code>showkey</code>. Actualmente hay sólo una opción alternativa para <code>format</code> — <code>list</code> — la cual mostrará el calendario en modo de lista, salteando fechas sin eventos. El atributo <code>category</code> requiere el nombre o un número de ID de las categorías (el nombre es sensible a mayusculas). Esto mostrará el calendario incluyendo solo eventos de esa categoría. Configurar <code>showkey</code> a <code>no</code> impedirá que se muestre la clave de categoría — esto puede ser útil con una sola categoría de salida."
|
420 |
+
|
421 |
+
#: my-calendar-help.php:27
|
422 |
+
msgid "Category Icons"
|
423 |
+
msgstr "Iconos de categoría"
|
424 |
+
|
425 |
+
#: my-calendar-help.php:30
|
426 |
+
msgid "My Calendar is designed to manage multiple calendars. The basis for these calendars are categories; you can easily setup a calendar page which includes all categories, or you can dedicate separate pages to calendars in each category. For an example, this might be useful for you in managing the tour calendars for multiple bands; event calendars for a variety of locations, etc."
|
427 |
+
msgstr "My Calendar está diseñado para administrar múltiples calendarios. La base de estos calendarios son categorías; puedes configurar fácilmente una página de calendario que incluya todas las categorías, o puedes dedicar páginas separadas a calendarios para cada categoría. Por ejemplo esto pdría ser útil para administrar calendarios de tours de varias bandas; calendarios de eventos para distintos lugares, etc."
|
428 |
+
|
429 |
+
#: my-calendar-help.php:33
|
430 |
+
msgid "The pre-installed category icons may not be especially useful for your needs or design. I'm assuming that you're going to upload your own icons -- all you need to do is upload them to the plugin's icons folder, and they'll be available for immediate use."
|
431 |
+
msgstr "Los íconos preinstalados para categorías pueden no ser útiles para sus necesidades. Asumiendo que vaya a cargar sus propios iconos -- todo lo que necesita hacer es cargarlos a la carpeta icons del plugin, y estarán disponibles inmediatamente para su uso."
|
432 |
+
|
433 |
+
#: my-calendar-help.php:33
|
434 |
+
msgid "Your icons folder is:"
|
435 |
+
msgstr "Su carpeta de íconos es:"
|
436 |
+
|
437 |
+
#: my-calendar-help.php:41
|
438 |
+
msgid "Widget Templating"
|
439 |
+
msgstr "Plantillas de Widget"
|
440 |
+
|
441 |
+
#: my-calendar-help.php:44
|
442 |
+
msgid "These codes are available in calendar widgets to create your own custom calendar format."
|
443 |
+
msgstr "Estos códigos están disponibles en los widgets de calendario para crear su propio formato."
|
444 |
+
|
445 |
+
#: my-calendar-help.php:48
|
446 |
+
msgid "Displays the name of the category the event is in."
|
447 |
+
msgstr "Muestra el nombre de la categoría del evento."
|
448 |
+
|
449 |
+
#: my-calendar-help.php:51
|
450 |
+
msgid "Displays the title of the event."
|
451 |
+
msgstr "Muestra el título del evento."
|
452 |
+
|
453 |
+
#: my-calendar-help.php:54
|
454 |
+
msgid "Displays the start time for the event."
|
455 |
+
msgstr "Muestra la hora de inicio del evento."
|
456 |
+
|
457 |
+
#: my-calendar-help.php:57
|
458 |
+
msgid "Displays the date on which the event begins."
|
459 |
+
msgstr "Muestra la fecha en que comienza el evento."
|
460 |
+
|
461 |
+
#: my-calendar-help.php:60
|
462 |
+
msgid "Displays the WordPress author who posted the event."
|
463 |
+
msgstr "Muestra el autor que publicó el evento."
|
464 |
+
|
465 |
+
#: my-calendar-help.php:63
|
466 |
+
msgid "Displays the URL provided for the event."
|
467 |
+
msgstr "Muestra la URL provista para el evento."
|
468 |
+
|
469 |
+
#: my-calendar-help.php:66
|
470 |
+
msgid "Displays the description of the event."
|
471 |
+
msgstr "Muestra la descripción del evento."
|
472 |
+
|
473 |
+
#: my-calendar-help.php:69
|
474 |
+
msgid "Displays title of the event as a link if a URL is present, or the title alone if no URL is available."
|
475 |
+
msgstr "Muestra el título del evento como un enlace si hay presente una URL, o sólo el título si no hay URL."
|
476 |
+
|
477 |
+
#: my-calendar-help.php:72
|
478 |
+
msgid "Displays the name of the location of the event."
|
479 |
+
msgstr "Muestra el nombre de la ubicación del evento."
|
480 |
+
|
481 |
+
#: my-calendar-help.php:75
|
482 |
+
msgid "Displays the first line of the site address."
|
483 |
+
msgstr "Muestra la primer línea de la dirección."
|
484 |
+
|
485 |
+
#: my-calendar-help.php:78
|
486 |
+
msgid "Displays the second line of the site address."
|
487 |
+
msgstr "Muestra la segunda línea de la dirección."
|
488 |
+
|
489 |
+
#: my-calendar-help.php:81
|
490 |
+
msgid "Displays the city for the event."
|
491 |
+
msgstr "Muestra la ciudad del evento."
|
492 |
+
|
493 |
+
#: my-calendar-help.php:84
|
494 |
+
msgid "Displays the state for the event."
|
495 |
+
msgstr "Muestra el estado/provincia del evento."
|
496 |
+
|
497 |
+
#: my-calendar-help.php:87
|
498 |
+
msgid "Displays the postcode for the event."
|
499 |
+
msgstr "Muestra el código postal del evento."
|
500 |
+
|
501 |
+
#: my-calendar-help.php:90
|
502 |
+
msgid "Displays the country for the event location."
|
503 |
+
msgstr "Muestra el país de la ubicación del evento."
|
504 |
+
|
505 |
+
#: my-calendar-help.php:93
|
506 |
+
msgid "Displays the event address in <a href=\"http://microformats.org/wiki/hcard\">hcard</a> format."
|
507 |
+
msgstr "Muestra la dirección del evento en formato <a href=\"http://microformats.org/wiki/hcard\">hcard</a>."
|
508 |
+
|
509 |
+
#: my-calendar-help.php:96
|
510 |
+
msgid "Displays a link to a Google Map of the event, if sufficient address information is available. If not, will be empty."
|
511 |
+
msgstr "Muestra un link del evento a Google Map, si hay suficiente información sobre la dirección. Si no, estará vacío."
|
512 |
+
|
513 |
+
#: my-calendar-settings.php:67
|
514 |
+
msgid "Settings saved"
|
515 |
+
msgstr "Opciones guardadas"
|
516 |
+
|
517 |
+
#: my-calendar-settings.php:94
|
518 |
+
msgid "My Calendar Options"
|
519 |
+
msgstr "Opciones My Calendar"
|
520 |
+
|
521 |
+
#: my-calendar-settings.php:98
|
522 |
+
msgid "Calendar Settings"
|
523 |
+
msgstr "Opciones de Calendario"
|
524 |
+
|
525 |
+
#: my-calendar-settings.php:102
|
526 |
+
msgid "Primary Calendar Options"
|
527 |
+
msgstr "Opciones primarias de Calendario"
|
528 |
+
|
529 |
+
#: my-calendar-settings.php:104
|
530 |
+
msgid "Choose the lowest user group that may manage events"
|
531 |
+
msgstr "Ingrese el mínimo grupo de usuarios que pueda administrar eventos."
|
532 |
+
|
533 |
+
#: my-calendar-settings.php:105
|
534 |
+
msgid "Subscriber"
|
535 |
+
msgstr "Suscriptor"
|
536 |
+
|
537 |
+
#: my-calendar-settings.php:106
|
538 |
+
msgid "Contributor"
|
539 |
+
msgstr "Colaborador"
|
540 |
+
|
541 |
+
#: my-calendar-settings.php:108
|
542 |
+
msgid "Editor"
|
543 |
+
msgstr "Editor"
|
544 |
+
|
545 |
+
#: my-calendar-settings.php:109
|
546 |
+
msgid "Administrator"
|
547 |
+
msgstr "Administrador"
|
548 |
+
|
549 |
+
#: my-calendar-settings.php:113
|
550 |
+
msgid "Do you want to display the author name on events?"
|
551 |
+
msgstr "¿Quiere mostrar el nombre del autor en los eventos?"
|
552 |
+
|
553 |
+
#: my-calendar-settings.php:114
|
554 |
+
#: my-calendar-settings.php:120
|
555 |
+
msgid "Yes"
|
556 |
+
msgstr "Si"
|
557 |
+
|
558 |
+
#: my-calendar-settings.php:115
|
559 |
+
#: my-calendar-settings.php:121
|
560 |
+
msgid "No"
|
561 |
+
msgstr "No"
|
562 |
+
|
563 |
+
#: my-calendar-settings.php:119
|
564 |
+
msgid "Display a jumpbox for changing month and year quickly?"
|
565 |
+
msgstr "¿Mostrar un combo para cambiar rápidamente de mes y año?"
|
566 |
+
|
567 |
+
#: my-calendar-settings.php:125
|
568 |
+
msgid "In list mode, show how many months of events at a time:"
|
569 |
+
msgstr "En modo lista, mostrar cuantos meses con eventos a la vez:"
|
570 |
+
|
571 |
+
#: my-calendar-settings.php:128
|
572 |
+
msgid "Date format in list mode"
|
573 |
+
msgstr "Formato de fecha en modo lista"
|
574 |
+
|
575 |
+
#: my-calendar-settings.php:129
|
576 |
+
msgid "Date format uses the same syntax as the <a href=\"http://php.net/date\">PHP <code>date()</code> function</a>. Save option to update sample output."
|
577 |
+
msgstr "Formato de fecha usa la misma sintaxis que la <a href=\"http://php.net/date\">funcion PHP <code>date()</code></a>. Grabe para ver el ejemplo."
|
578 |
+
|
579 |
+
#: my-calendar-settings.php:132
|
580 |
+
msgid "Show Link to Google Map (when sufficient address information is available.)"
|
581 |
+
msgstr "Mostrar link a Google Map (Cuando haya suficiente informacion de dirección.)"
|
582 |
+
|
583 |
+
#: my-calendar-settings.php:133
|
584 |
+
msgid "Show Event Address in Details"
|
585 |
+
msgstr "Mostrar la dirección del evento en Detalle"
|
586 |
+
|
587 |
+
#: my-calendar-settings.php:137
|
588 |
+
msgid "Calendar Styles"
|
589 |
+
msgstr "Estilos del Calendario"
|
590 |
+
|
591 |
+
#: my-calendar-settings.php:139
|
592 |
+
msgid "Reset the My Calendar style to default"
|
593 |
+
msgstr "\"Reset\" Volver el Calendario al estilo por defecto"
|
594 |
+
|
595 |
+
#: my-calendar-settings.php:140
|
596 |
+
msgid "Disable My Calendar Stylesheet"
|
597 |
+
msgstr "Desactivar el estilo para My Calendar"
|
598 |
+
|
599 |
+
#: my-calendar-settings.php:143
|
600 |
+
msgid "Edit the stylesheet for My Calendar"
|
601 |
+
msgstr "Editar el estilo para My Calendar"
|
602 |
+
|
603 |
+
#: my-calendar-settings.php:147
|
604 |
+
msgid "Calendar Behaviors"
|
605 |
+
msgstr "Comportamientos del Calendario"
|
606 |
+
|
607 |
+
#: my-calendar-settings.php:149
|
608 |
+
msgid "Disable List Javascript Effects"
|
609 |
+
msgstr "Desactivar efectos Javascript en Lista"
|
610 |
+
|
611 |
+
#: my-calendar-settings.php:150
|
612 |
+
msgid "Disable Calendar Javascript Effects"
|
613 |
+
msgstr "Desactivar efectos Javascript en Calendario"
|
614 |
+
|
615 |
+
#: my-calendar-settings.php:153
|
616 |
+
msgid "Save"
|
617 |
+
msgstr "Guardar"
|
618 |
+
|
619 |
+
#: my-calendar-widgets.php:11
|
620 |
+
#: my-calendar-widgets.php:42
|
621 |
+
#: my-calendar-widgets.php:43
|
622 |
+
msgid "Today's Events"
|
623 |
+
msgstr "Eventos de hoy"
|
624 |
+
|
625 |
+
#: my-calendar-widgets.php:36
|
626 |
+
#: my-calendar-widgets.php:112
|
627 |
+
msgid "Template"
|
628 |
+
msgstr "Plantilla"
|
629 |
+
|
630 |
+
#: my-calendar-widgets.php:56
|
631 |
+
#: my-calendar-widgets.php:135
|
632 |
+
#: my-calendar-widgets.php:136
|
633 |
+
msgid "Upcoming Events"
|
634 |
+
msgstr "Próximos eventos"
|
635 |
+
|
636 |
+
#: my-calendar-widgets.php:116
|
637 |
+
msgid "Widget Options"
|
638 |
+
msgstr "Opciones de Widget"
|
639 |
+
|
640 |
+
#: my-calendar-widgets.php:118
|
641 |
+
msgid "Display upcoming events by:"
|
642 |
+
msgstr "Mostar los próximos eventos por:"
|
643 |
+
|
644 |
+
#: my-calendar-widgets.php:119
|
645 |
+
msgid "Events (e.g. 2 past, 3 future)"
|
646 |
+
msgstr "Eventos (ej. 2 pasados, 3 futuros)"
|
647 |
+
|
648 |
+
#: my-calendar-widgets.php:120
|
649 |
+
msgid "Dates (e.g. 4 days past, 5 forward)"
|
650 |
+
msgstr "Fecha (ej. 2 días atras, 3 días siguientes)"
|
651 |
+
|
652 |
+
#: my-calendar-widgets.php:124
|
653 |
+
msgid "events into the future;"
|
654 |
+
msgstr "eventos en el futuro;"
|
655 |
+
|
656 |
+
#: my-calendar-widgets.php:125
|
657 |
+
msgid "events from the past"
|
658 |
+
msgstr "eventos del pasado"
|
659 |
+
|
660 |
+
#: my-calendar-widgets.php:128
|
661 |
+
msgid "days into the future;"
|
662 |
+
msgstr "días en el futuro;"
|
663 |
+
|
664 |
+
#: my-calendar-widgets.php:129
|
665 |
+
msgid "days from the past"
|
666 |
+
msgstr "días pasados"
|
667 |
+
|
668 |
+
#: my-calendar.php:46
|
669 |
+
#: my-calendar.php:128
|
670 |
+
msgid "Settings"
|
671 |
+
msgstr "Opciones"
|
672 |
+
|
673 |
+
#: my-calendar.php:65
|
674 |
+
msgid "Get Support"
|
675 |
+
msgstr "Obtener Soporte"
|
676 |
+
|
677 |
+
#: my-calendar.php:66
|
678 |
+
msgid "Make a Donation"
|
679 |
+
msgstr "Hacer una donación"
|
680 |
+
|
681 |
+
#. #-#-#-#-# plugin.pot (My Calendar 1.0.0) #-#-#-#-#
|
682 |
+
#. Plugin Name of the plugin/theme
|
683 |
+
#: my-calendar.php:120
|
684 |
+
msgid "My Calendar"
|
685 |
+
msgstr "My Calendar"
|
686 |
+
|
687 |
+
#: my-calendar.php:123
|
688 |
+
msgid "Add/Edit Events"
|
689 |
+
msgstr "Agregar/editar un Evento"
|
690 |
+
|
691 |
+
#: my-calendar.php:129
|
692 |
+
msgid "My Calendar Help"
|
693 |
+
msgstr "My Calendar Help"
|
694 |
+
|
695 |
+
#: my-calendar.php:129
|
696 |
+
msgid "Help"
|
697 |
+
msgstr "Ayuda"
|
698 |
+
|
699 |
+
#: my-calendar.php:662
|
700 |
+
#: my-calendar.php:666
|
701 |
+
#: my-calendar.php:676
|
702 |
+
#: my-calendar.php:678
|
703 |
+
msgid "Next Events"
|
704 |
+
msgstr "Próximos eventos"
|
705 |
+
|
706 |
+
#: my-calendar.php:691
|
707 |
+
#: my-calendar.php:695
|
708 |
+
#: my-calendar.php:705
|
709 |
+
#: my-calendar.php:707
|
710 |
+
msgid "Previous Events"
|
711 |
+
msgstr "Eventos Anteriores"
|
712 |
+
|
713 |
+
#: my-calendar.php:790
|
714 |
+
msgid "Event Details"
|
715 |
+
msgstr "Detalles del Evento"
|
716 |
+
|
717 |
+
#: my-calendar.php:796
|
718 |
+
msgid "Not Applicable"
|
719 |
+
msgstr "No aplicable"
|
720 |
+
|
721 |
+
#: my-calendar.php:804
|
722 |
+
msgid "Posted by"
|
723 |
+
msgstr "Escrito por"
|
724 |
+
|
725 |
+
#: my-calendar.php:1284
|
726 |
+
msgid "Month"
|
727 |
+
msgstr "Mes"
|
728 |
+
|
729 |
+
#: my-calendar.php:1285
|
730 |
+
#: my-calendar.php:1346
|
731 |
+
msgid "January"
|
732 |
+
msgstr "Enero"
|
733 |
+
|
734 |
+
#: my-calendar.php:1286
|
735 |
+
#: my-calendar.php:1346
|
736 |
+
msgid "February"
|
737 |
+
msgstr "Febrero"
|
738 |
+
|
739 |
+
#: my-calendar.php:1287
|
740 |
+
#: my-calendar.php:1346
|
741 |
+
msgid "March"
|
742 |
+
msgstr "Marzo"
|
743 |
+
|
744 |
+
#: my-calendar.php:1288
|
745 |
+
#: my-calendar.php:1346
|
746 |
+
msgid "April"
|
747 |
+
msgstr "Abril"
|
748 |
+
|
749 |
+
#: my-calendar.php:1289
|
750 |
+
#: my-calendar.php:1346
|
751 |
+
msgid "May"
|
752 |
+
msgstr "Mayo"
|
753 |
+
|
754 |
+
#: my-calendar.php:1290
|
755 |
+
#: my-calendar.php:1346
|
756 |
+
msgid "June"
|
757 |
+
msgstr "Junio"
|
758 |
+
|
759 |
+
#: my-calendar.php:1291
|
760 |
+
#: my-calendar.php:1346
|
761 |
+
msgid "July"
|
762 |
+
msgstr "Julio"
|
763 |
+
|
764 |
+
#: my-calendar.php:1292
|
765 |
+
#: my-calendar.php:1346
|
766 |
+
msgid "August"
|
767 |
+
msgstr "Agosto"
|
768 |
+
|
769 |
+
#: my-calendar.php:1293
|
770 |
+
#: my-calendar.php:1346
|
771 |
+
msgid "September"
|
772 |
+
msgstr "Septiembre"
|
773 |
+
|
774 |
+
#: my-calendar.php:1294
|
775 |
+
#: my-calendar.php:1346
|
776 |
+
msgid "October"
|
777 |
+
msgstr "Octubre"
|
778 |
+
|
779 |
+
#: my-calendar.php:1295
|
780 |
+
#: my-calendar.php:1346
|
781 |
+
msgid "November"
|
782 |
+
msgstr "Noviembre"
|
783 |
+
|
784 |
+
#: my-calendar.php:1296
|
785 |
+
#: my-calendar.php:1346
|
786 |
+
msgid "December"
|
787 |
+
msgstr "Diciembre"
|
788 |
+
|
789 |
+
#: my-calendar.php:1298
|
790 |
+
msgid "Year"
|
791 |
+
msgstr "Año"
|
792 |
+
|
793 |
+
#: my-calendar.php:1321
|
794 |
+
msgid "Go"
|
795 |
+
msgstr "Ir"
|
796 |
+
|
797 |
+
#: my-calendar.php:1339
|
798 |
+
#: my-calendar.php:1342
|
799 |
+
msgid "<abbr title=\"Sunday\">Sun</abbr>"
|
800 |
+
msgstr "<abbr title=\"Domingo\">Dom</abbr>"
|
801 |
+
|
802 |
+
#: my-calendar.php:1339
|
803 |
+
#: my-calendar.php:1342
|
804 |
+
msgid "<abbr title=\"Monday\">Mon</abbr>"
|
805 |
+
msgstr "<abbr title=\"Lunes\">Lun</abbr>"
|
806 |
+
|
807 |
+
#: my-calendar.php:1339
|
808 |
+
#: my-calendar.php:1342
|
809 |
+
msgid "<abbr title=\"Tuesday\">Tues</abbr>"
|
810 |
+
msgstr "<abbr title=\"Martes\">Mar</abbr>"
|
811 |
+
|
812 |
+
#: my-calendar.php:1339
|
813 |
+
#: my-calendar.php:1342
|
814 |
+
msgid "<abbr title=\"Wednesday\">Wed</abbr>"
|
815 |
+
msgstr "<abbr title=\"Miercoles\">Mie</abbr>"
|
816 |
+
|
817 |
+
#: my-calendar.php:1339
|
818 |
+
#: my-calendar.php:1342
|
819 |
+
msgid "<abbr title=\"Thursday\">Thur</abbr>"
|
820 |
+
msgstr "<abbr title=\"Jueves\">Jue</abbr>"
|
821 |
+
|
822 |
+
#: my-calendar.php:1339
|
823 |
+
#: my-calendar.php:1342
|
824 |
+
msgid "<abbr title=\"Friday\">Fri</abbr>"
|
825 |
+
msgstr "<abbr title=\"Viernes\">Vie</abbr>"
|
826 |
+
|
827 |
+
#: my-calendar.php:1339
|
828 |
+
#: my-calendar.php:1342
|
829 |
+
msgid "<abbr title=\"Saturday\">Sat</abbr>"
|
830 |
+
msgstr "<abbr title=\"Sabado\">Sab</abbr>"
|
831 |
+
|
832 |
+
#: my-calendar.php:1427
|
833 |
+
#: my-calendar.php:1430
|
834 |
+
msgid "Calendar"
|
835 |
+
msgstr "Calendario"
|
836 |
+
|
837 |
+
#: my-calendar.php:1434
|
838 |
+
msgid "Events in"
|
839 |
+
msgstr "Eventos en"
|
840 |
+
|
841 |
+
#: my-calendar.php:1543
|
842 |
+
msgid "There are no events scheduled during this period."
|
843 |
+
msgstr "No hay eventos agendados en este período."
|
844 |
+
|
845 |
+
#: my-calendar.php:1553
|
846 |
+
msgid "Category Key"
|
847 |
+
msgstr "Clave de Categoría"
|
848 |
+
|
849 |
+
#. Plugin URI of the plugin/theme
|
850 |
+
msgid "http://www.joedolson.com/articles/my-calendar/"
|
851 |
+
msgstr "http://www.joedolson.com/articles/my-calendar/"
|
852 |
+
|
853 |
+
#. Description of the plugin/theme
|
854 |
+
msgid "Accessible WordPress event calendar plugin. Show events from multiple calendars on pages, in posts, or in widgets."
|
855 |
+
msgstr "Accesible plugin de Wordpress para calendario de eventos. Muestra eventos de varios calendarios en páginas, en entradas, o en widgets."
|
856 |
+
|
857 |
+
#. Author of the plugin/theme
|
858 |
+
msgid "Joseph C Dolson"
|
859 |
+
msgstr "Joseph C Dolson - Spanish Translator www.netmdp.com"
|
860 |
+
|
861 |
+
#. Author URI of the plugin/theme
|
862 |
+
msgid "http://www.joedolson.com"
|
863 |
+
msgstr "http://www.joedolson.com"
|
864 |
+
|
my-calendar-event-manager.php
CHANGED
@@ -1,10 +1,34 @@
|
|
1 |
<?php
|
2 |
// The actual function called to render the manage events page and
|
3 |
// to deal with posts
|
4 |
-
function
|
5 |
global $current_user, $wpdb, $users_entries;
|
6 |
?>
|
7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
<?php
|
9 |
// First some quick cleaning up
|
10 |
$edit = $create = $save = $delete = false;
|
@@ -18,7 +42,7 @@ if ($_GET['action'] == 'edit') {
|
|
18 |
}
|
19 |
|
20 |
// Lets see if this is first run and create us a table if it is!
|
21 |
-
|
22 |
|
23 |
if ($_GET['action'] == 'delete') {
|
24 |
$sql = "SELECT event_title FROM " . MY_CALENDAR_TABLE . " WHERE event_id=" . (int) $_GET['event_id'];
|
@@ -26,7 +50,7 @@ if ($_GET['action'] == 'delete') {
|
|
26 |
?>
|
27 |
<div class="error">
|
28 |
<p><strong><?php _e('Delete Event','my-calendar'); ?>:</strong> <?php _e('Are you sure you want to delete this event?','my-calendar'); ?></p>
|
29 |
-
<form action="<?php
|
30 |
<div>
|
31 |
<input type="hidden" value="delete" name="action" />
|
32 |
<input type="hidden" value="<?php echo (int) $_GET['event_id']; ?>" name="event_id" />
|
@@ -145,28 +169,28 @@ if ( $action == 'add' ) {
|
|
145 |
}
|
146 |
if ($start_date_ok == 1 && $end_date_ok == 1 && $time_ok == 1 && $url_ok == 1 && $title_ok == 1 && $recurring_ok == 1) {
|
147 |
$sql = "INSERT INTO " . MY_CALENDAR_TABLE . " SET
|
148 |
-
event_title='" .
|
149 |
-
event_desc='" .
|
150 |
-
event_begin='" .
|
151 |
-
event_end='" .
|
152 |
-
event_time='" .
|
153 |
-
event_recur='" .
|
154 |
-
event_repeats='" .
|
155 |
event_author=".$current_user->ID.",
|
156 |
-
event_category=".
|
157 |
-
event_link='".
|
158 |
-
event_label='".
|
159 |
-
event_street='".
|
160 |
-
event_street2='".
|
161 |
-
event_city='".
|
162 |
-
event_state='".
|
163 |
-
event_postcode='".
|
164 |
-
event_country='".
|
165 |
|
166 |
$wpdb->get_results($sql);
|
167 |
|
168 |
-
$sql = "SELECT event_id FROM " . MY_CALENDAR_TABLE . " WHERE event_title='" .
|
169 |
-
. " AND event_desc='" .
|
170 |
$result = $wpdb->get_results($sql);
|
171 |
|
172 |
if ( empty($result) || empty($result[0]->event_id) ) {
|
@@ -311,29 +335,29 @@ if ( $action == 'add' ) {
|
|
311 |
}
|
312 |
if ($start_date_ok == 1 && $end_date_ok == 1 && $time_ok == 1 && $url_ok == 1 && $title_ok && $recurring_ok == 1) {
|
313 |
$sql = "UPDATE " . MY_CALENDAR_TABLE . " SET
|
314 |
-
event_title='" .
|
315 |
-
event_desc='" .
|
316 |
-
event_begin='" .
|
317 |
-
event_end='" .
|
318 |
-
event_time='" .
|
319 |
-
event_recur='" .
|
320 |
-
event_repeats='" .
|
321 |
event_author=".$current_user->ID . ",
|
322 |
-
event_category=".
|
323 |
-
event_link='".
|
324 |
-
event_label='".
|
325 |
-
event_street='".
|
326 |
-
event_street2='".
|
327 |
-
event_city='".
|
328 |
-
event_state='".
|
329 |
-
event_postcode='".
|
330 |
-
event_country='".
|
331 |
-
WHERE event_id='" .
|
332 |
|
333 |
$wpdb->get_results($sql);
|
334 |
|
335 |
-
$sql = "SELECT event_id FROM " . MY_CALENDAR_TABLE . " WHERE event_title='" .
|
336 |
-
. " AND event_desc='" .
|
337 |
$result = $wpdb->get_results($sql);
|
338 |
|
339 |
if ( empty($result) || empty($result[0]->event_id) ) {
|
@@ -374,10 +398,10 @@ if ( $action == 'add' ) {
|
|
374 |
<div class="error"><p><strong><?php _e('Error','my-calendar'); ?>:</strong> <?php _e("You can't delete an event if you haven't submitted an event id",'my-calendar'); ?></p></div>
|
375 |
<?php
|
376 |
} else {
|
377 |
-
$sql = "DELETE FROM " . MY_CALENDAR_TABLE . " WHERE event_id='" .
|
378 |
$wpdb->get_results($sql);
|
379 |
|
380 |
-
$sql = "SELECT event_id FROM " . MY_CALENDAR_TABLE . " WHERE event_id='" .
|
381 |
$result = $wpdb->get_results($sql);
|
382 |
|
383 |
if ( empty($result) || empty($result[0]->event_id) ) {
|
@@ -402,23 +426,23 @@ if ( $action == 'add' ) {
|
|
402 |
if ( $action == 'edit' || ($action == 'edit_save' && $error_with_saving == 1)) {
|
403 |
?>
|
404 |
<h2><?php _e('Edit Event','my-calendar'); ?></h2>
|
405 |
-
<?php
|
406 |
<?php
|
407 |
if ( empty($event_id) ) {
|
408 |
echo "<div class=\"error\"><p>".__("You must provide an event id in order to edit it",'my-calendar')."</p></div>";
|
409 |
} else {
|
410 |
-
|
411 |
}
|
412 |
} else {
|
413 |
?>
|
414 |
<h2><?php _e('Add Event','my-calendar'); ?></h2>
|
415 |
-
<?php
|
416 |
|
417 |
-
<?php
|
418 |
|
419 |
<h2><?php _e('Manage Events','my-calendar'); ?></h2>
|
420 |
|
421 |
-
<?php
|
422 |
}
|
423 |
?>
|
424 |
</div>
|
@@ -427,7 +451,7 @@ if ( $action == 'add' ) {
|
|
427 |
}
|
428 |
|
429 |
// The event edit form for the manage events admin page
|
430 |
-
function
|
431 |
global $wpdb,$users_entries;
|
432 |
$data = false;
|
433 |
|
@@ -436,7 +460,7 @@ function wp_events_edit_form($mode='add', $event_id=false) {
|
|
436 |
echo "<div class=\"error\"><p>".__('Sorry! That\'s an invalid event key.','my-calendar')."</p></div>";
|
437 |
return;
|
438 |
} else {
|
439 |
-
$data = $wpdb->get_results("SELECT * FROM " . MY_CALENDAR_TABLE . " WHERE event_id='" .
|
440 |
if ( empty($data) ) {
|
441 |
echo "<div class=\"error\"><p>".__("Sorry! We couldn't find an event with that ID.",'my-calendar')."</p></div>";
|
442 |
return;
|
@@ -457,7 +481,7 @@ function wp_events_edit_form($mode='add', $event_id=false) {
|
|
457 |
<div class="postbox">
|
458 |
<h3><?php if ($mode == "add") { _e('Add an Event','my-calendar'); } else { _e('Edit Event'); } ?></h3>
|
459 |
<div class="inside">
|
460 |
-
<form name="my-calendar" id="my-calendar" method="post" action="<?php
|
461 |
<div>
|
462 |
<input type="hidden" name="action" value="<?php echo $mode; ?>" />
|
463 |
<input type="hidden" name="event_id" value="<?php echo $event_id; ?>" />
|
@@ -579,7 +603,7 @@ function wp_events_edit_form($mode='add', $event_id=false) {
|
|
579 |
<?php
|
580 |
}
|
581 |
// Used on the manage events admin page to display a list of events
|
582 |
-
function
|
583 |
global $wpdb;
|
584 |
|
585 |
$events = $wpdb->get_results("SELECT * FROM " . MY_CALENDAR_TABLE . " ORDER BY event_begin DESC");
|
@@ -637,7 +661,7 @@ function wp_events_display_list() {
|
|
637 |
?>
|
638 |
<td style="background-color:<?php echo $this_cat->category_color;?>;"><?php echo $this_cat->category_name; ?></td>
|
639 |
<?php unset($this_cat); ?>
|
640 |
-
<td><a href="<?php
|
641 |
<?php
|
642 |
}
|
643 |
?>
|
1 |
<?php
|
2 |
// The actual function called to render the manage events page and
|
3 |
// to deal with posts
|
4 |
+
function edit_my_calendar() {
|
5 |
global $current_user, $wpdb, $users_entries;
|
6 |
?>
|
7 |
|
8 |
+
<?php
|
9 |
+
update_option('ko_calendar_imported','false');
|
10 |
+
if ( get_option('ko_calendar_imported') != 'true' ) {
|
11 |
+
if (function_exists('check_calendar')) {
|
12 |
+
echo "<div id='message' class='updated'>";
|
13 |
+
echo "<p>";
|
14 |
+
_e('My Calendar has identified that you have the Calendar plugin by Kieran O\'Shea installed. You can import those events and categories into the My Calendar database. Would you like to import these events?','my-calendar');
|
15 |
+
echo "</p>";
|
16 |
+
?>
|
17 |
+
<form method="post" action="<?php bloginfo('url'); ?>/wp-admin/admin.php?page=my-calendar-config">
|
18 |
+
<div>
|
19 |
+
<input type="hidden" name="import" value="true" />
|
20 |
+
<input type="submit" value="Import from Calendar" name="import-calendar" class="button-primary" />
|
21 |
+
</div>
|
22 |
+
</form>
|
23 |
+
<?php
|
24 |
+
echo "<p>";
|
25 |
+
_e('Calendar Import has received limited testing. Although it is possible that it could fail to import your events correctly, it should not have any impact on your existing Calendar database. If you encounter any problems, <a href="http://www.joedolson.com/contact.php">please contact me</a>!','my-calendar');
|
26 |
+
echo "</p>";
|
27 |
+
echo "</div>";
|
28 |
+
}
|
29 |
+
}
|
30 |
+
?>
|
31 |
+
|
32 |
<?php
|
33 |
// First some quick cleaning up
|
34 |
$edit = $create = $save = $delete = false;
|
42 |
}
|
43 |
|
44 |
// Lets see if this is first run and create us a table if it is!
|
45 |
+
check_my_calendar();
|
46 |
|
47 |
if ($_GET['action'] == 'delete') {
|
48 |
$sql = "SELECT event_title FROM " . MY_CALENDAR_TABLE . " WHERE event_id=" . (int) $_GET['event_id'];
|
50 |
?>
|
51 |
<div class="error">
|
52 |
<p><strong><?php _e('Delete Event','my-calendar'); ?>:</strong> <?php _e('Are you sure you want to delete this event?','my-calendar'); ?></p>
|
53 |
+
<form action="<?php bloginfo('wpurl'); ?>/wp-admin/admin.php?page=my-calendar" method="post">
|
54 |
<div>
|
55 |
<input type="hidden" value="delete" name="action" />
|
56 |
<input type="hidden" value="<?php echo (int) $_GET['event_id']; ?>" name="event_id" />
|
169 |
}
|
170 |
if ($start_date_ok == 1 && $end_date_ok == 1 && $time_ok == 1 && $url_ok == 1 && $title_ok == 1 && $recurring_ok == 1) {
|
171 |
$sql = "INSERT INTO " . MY_CALENDAR_TABLE . " SET
|
172 |
+
event_title='" . mysql_real_escape_string($title) . "',
|
173 |
+
event_desc='" . mysql_real_escape_string($desc) . "',
|
174 |
+
event_begin='" . mysql_real_escape_string($begin) . "',
|
175 |
+
event_end='" . mysql_real_escape_string($end) . "',
|
176 |
+
event_time='" . mysql_real_escape_string($time) . "',
|
177 |
+
event_recur='" . mysql_real_escape_string($recur) . "',
|
178 |
+
event_repeats='" . mysql_real_escape_string($repeats) . "',
|
179 |
event_author=".$current_user->ID.",
|
180 |
+
event_category=".mysql_real_escape_string($category).",
|
181 |
+
event_link='".mysql_real_escape_string($linky)."',
|
182 |
+
event_label='".mysql_real_escape_string($event_label)."',
|
183 |
+
event_street='".mysql_real_escape_string($event_street)."',
|
184 |
+
event_street2='".mysql_real_escape_string($event_street2)."',
|
185 |
+
event_city='".mysql_real_escape_string($event_city)."',
|
186 |
+
event_state='".mysql_real_escape_string($event_state)."',
|
187 |
+
event_postcode='".mysql_real_escape_string($event_postcode)."',
|
188 |
+
event_country='".mysql_real_escape_string($event_country)."'";
|
189 |
|
190 |
$wpdb->get_results($sql);
|
191 |
|
192 |
+
$sql = "SELECT event_id FROM " . MY_CALENDAR_TABLE . " WHERE event_title='" . mysql_real_escape_string($title) . "'"
|
193 |
+
. " AND event_desc='" . mysql_real_escape_string($desc) . "' AND event_begin='" . mysql_real_escape_string($begin) . "' AND event_end='" . mysql_real_escape_string($end) . "' AND event_recur='" . mysql_real_escape_string($recur) . "' AND event_repeats='" . mysql_real_escape_string($repeats) . "' LIMIT 1";
|
194 |
$result = $wpdb->get_results($sql);
|
195 |
|
196 |
if ( empty($result) || empty($result[0]->event_id) ) {
|
335 |
}
|
336 |
if ($start_date_ok == 1 && $end_date_ok == 1 && $time_ok == 1 && $url_ok == 1 && $title_ok && $recurring_ok == 1) {
|
337 |
$sql = "UPDATE " . MY_CALENDAR_TABLE . " SET
|
338 |
+
event_title='" . mysql_real_escape_string($title) . "',
|
339 |
+
event_desc='" . mysql_real_escape_string($desc) . "',
|
340 |
+
event_begin='" . mysql_real_escape_string($begin) . "',
|
341 |
+
event_end='" . mysql_real_escape_string($end) . "',
|
342 |
+
event_time='" . mysql_real_escape_string($time) . "',
|
343 |
+
event_recur='" . mysql_real_escape_string($recur) . "',
|
344 |
+
event_repeats='" . mysql_real_escape_string($repeats) . "',
|
345 |
event_author=".$current_user->ID . ",
|
346 |
+
event_category=".mysql_real_escape_string($category).",
|
347 |
+
event_link='".mysql_real_escape_string($linky)."',
|
348 |
+
event_label='".mysql_real_escape_string($event_label)."',
|
349 |
+
event_street='".mysql_real_escape_string($event_street)."',
|
350 |
+
event_street2='".mysql_real_escape_string($event_street2)."',
|
351 |
+
event_city='".mysql_real_escape_string($event_city)."',
|
352 |
+
event_state='".mysql_real_escape_string($event_state)."',
|
353 |
+
event_postcode='".mysql_real_escape_string($event_postcode)."',
|
354 |
+
event_country='".mysql_real_escape_string($event_country)."'
|
355 |
+
WHERE event_id='" . mysql_real_escape_string($event_id) . "'";
|
356 |
|
357 |
$wpdb->get_results($sql);
|
358 |
|
359 |
+
$sql = "SELECT event_id FROM " . MY_CALENDAR_TABLE . " WHERE event_title='" . mysql_real_escape_string($title) . "'"
|
360 |
+
. " AND event_desc='" . mysql_real_escape_string($desc) . "' AND event_begin='" . mysql_real_escape_string($begin) . "' AND event_end='" . mysql_real_escape_string($end) . "' AND event_recur='" . mysql_real_escape_string($recur) . "' AND event_repeats='" . mysql_real_escape_string($repeats) . "' LIMIT 1";
|
361 |
$result = $wpdb->get_results($sql);
|
362 |
|
363 |
if ( empty($result) || empty($result[0]->event_id) ) {
|
398 |
<div class="error"><p><strong><?php _e('Error','my-calendar'); ?>:</strong> <?php _e("You can't delete an event if you haven't submitted an event id",'my-calendar'); ?></p></div>
|
399 |
<?php
|
400 |
} else {
|
401 |
+
$sql = "DELETE FROM " . MY_CALENDAR_TABLE . " WHERE event_id='" . mysql_real_escape_string($event_id) . "'";
|
402 |
$wpdb->get_results($sql);
|
403 |
|
404 |
+
$sql = "SELECT event_id FROM " . MY_CALENDAR_TABLE . " WHERE event_id='" . mysql_real_escape_string($event_id) . "'";
|
405 |
$result = $wpdb->get_results($sql);
|
406 |
|
407 |
if ( empty($result) || empty($result[0]->event_id) ) {
|
426 |
if ( $action == 'edit' || ($action == 'edit_save' && $error_with_saving == 1)) {
|
427 |
?>
|
428 |
<h2><?php _e('Edit Event','my-calendar'); ?></h2>
|
429 |
+
<?php jd_show_support_box(); ?>
|
430 |
<?php
|
431 |
if ( empty($event_id) ) {
|
432 |
echo "<div class=\"error\"><p>".__("You must provide an event id in order to edit it",'my-calendar')."</p></div>";
|
433 |
} else {
|
434 |
+
jd_events_edit_form('edit_save', $event_id);
|
435 |
}
|
436 |
} else {
|
437 |
?>
|
438 |
<h2><?php _e('Add Event','my-calendar'); ?></h2>
|
439 |
+
<?php jd_show_support_box(); ?>
|
440 |
|
441 |
+
<?php jd_events_edit_form(); ?>
|
442 |
|
443 |
<h2><?php _e('Manage Events','my-calendar'); ?></h2>
|
444 |
|
445 |
+
<?php jd_events_display_list();
|
446 |
}
|
447 |
?>
|
448 |
</div>
|
451 |
}
|
452 |
|
453 |
// The event edit form for the manage events admin page
|
454 |
+
function jd_events_edit_form($mode='add', $event_id=false) {
|
455 |
global $wpdb,$users_entries;
|
456 |
$data = false;
|
457 |
|
460 |
echo "<div class=\"error\"><p>".__('Sorry! That\'s an invalid event key.','my-calendar')."</p></div>";
|
461 |
return;
|
462 |
} else {
|
463 |
+
$data = $wpdb->get_results("SELECT * FROM " . MY_CALENDAR_TABLE . " WHERE event_id='" . mysql_real_escape_string($event_id) . "' LIMIT 1");
|
464 |
if ( empty($data) ) {
|
465 |
echo "<div class=\"error\"><p>".__("Sorry! We couldn't find an event with that ID.",'my-calendar')."</p></div>";
|
466 |
return;
|
481 |
<div class="postbox">
|
482 |
<h3><?php if ($mode == "add") { _e('Add an Event','my-calendar'); } else { _e('Edit Event'); } ?></h3>
|
483 |
<div class="inside">
|
484 |
+
<form name="my-calendar" id="my-calendar" method="post" action="<?php bloginfo('wpurl'); ?>/wp-admin/admin.php?page=my-calendar">
|
485 |
<div>
|
486 |
<input type="hidden" name="action" value="<?php echo $mode; ?>" />
|
487 |
<input type="hidden" name="event_id" value="<?php echo $event_id; ?>" />
|
603 |
<?php
|
604 |
}
|
605 |
// Used on the manage events admin page to display a list of events
|
606 |
+
function jd_events_display_list() {
|
607 |
global $wpdb;
|
608 |
|
609 |
$events = $wpdb->get_results("SELECT * FROM " . MY_CALENDAR_TABLE . " ORDER BY event_begin DESC");
|
661 |
?>
|
662 |
<td style="background-color:<?php echo $this_cat->category_color;?>;"><?php echo $this_cat->category_name; ?></td>
|
663 |
<?php unset($this_cat); ?>
|
664 |
+
<td><a href="<?php bloginfo('wpurl'); ?>/wp-admin/admin.php?page=my-calendar&action=edit&event_id=<?php echo $event->event_id;?>" class='edit'><?php echo __('Edit','my-calendar'); ?></a> · <a href="<?php bloginfo('wpurl'); ?>/wp-admin/admin.php?page=my-calendar&action=delete&event_id=<?php echo $event->event_id;?>" class="delete"><?php echo __('Delete','my-calendar'); ?></a></td> </tr>
|
665 |
<?php
|
666 |
}
|
667 |
?>
|
my-calendar-help.php
CHANGED
@@ -4,7 +4,7 @@ function my_calendar_help() {
|
|
4 |
?>
|
5 |
<div class="wrap">
|
6 |
<h2><?php _e('How to use My Calendar','my-calendar'); ?></h2>
|
7 |
-
<?php
|
8 |
|
9 |
<div id="poststuff" class="jd-my-calendar">
|
10 |
<div class="postbox">
|
@@ -56,6 +56,9 @@ function my_calendar_help() {
|
|
56 |
<dt><code>{date}</code></dt>
|
57 |
<dd><?php _e('Displays the date on which the event begins.','my-calendar'); ?></dd>
|
58 |
|
|
|
|
|
|
|
59 |
<dt><code>{author}</code></dt>
|
60 |
<dd><?php _e('Displays the WordPress author who posted the event.','my-calendar'); ?></dd>
|
61 |
|
4 |
?>
|
5 |
<div class="wrap">
|
6 |
<h2><?php _e('How to use My Calendar','my-calendar'); ?></h2>
|
7 |
+
<?php jd_show_support_box(); ?>
|
8 |
|
9 |
<div id="poststuff" class="jd-my-calendar">
|
10 |
<div class="postbox">
|
56 |
<dt><code>{date}</code></dt>
|
57 |
<dd><?php _e('Displays the date on which the event begins.','my-calendar'); ?></dd>
|
58 |
|
59 |
+
<dt><code>{enddate}</code></dt>
|
60 |
+
<dd><?php _e('Displays the date on which the event ends.','my-calendar'); ?></dd>
|
61 |
+
|
62 |
<dt><code>{author}</code></dt>
|
63 |
<dd><?php _e('Displays the WordPress author who posted the event.','my-calendar'); ?></dd>
|
64 |
|
my-calendar-settings.php
CHANGED
@@ -1,16 +1,85 @@
|
|
1 |
<?php
|
2 |
// Display the admin configuration page
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
function edit_my_calendar_config() {
|
4 |
global $wpdb, $initial_style;
|
5 |
|
6 |
// We can't use this page unless My Calendar is installed/upgraded
|
7 |
-
|
8 |
|
9 |
if (isset($_POST['permissions']) && isset($_POST['style'])) {
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
|
|
14 |
else if ($_POST['permissions'] == 'admin') { $new_perms = 'manage_options'; }
|
15 |
else { $new_perms = 'manage_options'; }
|
16 |
|
@@ -18,35 +87,11 @@ function edit_my_calendar_config() {
|
|
18 |
$my_calendar_show_months = (int) $_POST['my_calendar_show_months'];
|
19 |
$my_calendar_date_format = $_POST['my_calendar_date_format'];
|
20 |
|
21 |
-
|
22 |
-
$
|
23 |
-
|
24 |
-
$
|
25 |
-
|
26 |
-
|
27 |
-
if (mysql_escape_string($_POST['display_jump']) == 'on') {
|
28 |
-
$disp_jump = 'true';
|
29 |
-
} else {
|
30 |
-
$disp_jump = 'false';
|
31 |
-
}
|
32 |
-
|
33 |
-
if (mysql_escape_string($_POST['use_styles']) == 'on') {
|
34 |
-
$use_styles = 'true';
|
35 |
-
} else {
|
36 |
-
$use_styles = 'false';
|
37 |
-
}
|
38 |
-
|
39 |
-
if (mysql_escape_string($_POST['my_calendar_show_map']) == 'on') {
|
40 |
-
$my_calendar_show_map = 'true';
|
41 |
-
} else {
|
42 |
-
$my_calendar_show_map = 'false';
|
43 |
-
}
|
44 |
-
|
45 |
-
if (mysql_escape_string($_POST['my_calendar_show_address']) == 'on') {
|
46 |
-
$my_calendar_show_address = 'true';
|
47 |
-
} else {
|
48 |
-
$my_calendar_show_address = 'false';
|
49 |
-
}
|
50 |
|
51 |
update_option('can_manage_events',$new_perms);
|
52 |
update_option('my_calendar_style',$my_calendar_style);
|
@@ -61,7 +106,7 @@ function edit_my_calendar_config() {
|
|
61 |
update_option('list_javascript', (int) $_POST['list_javascript']);
|
62 |
// Check to see if we are replacing the original style
|
63 |
|
64 |
-
if (
|
65 |
update_option('my_calendar_style',$initial_style);
|
66 |
}
|
67 |
echo "<div class=\"updated\"><p><strong>".__('Settings saved','my-calendar').".</strong></p></div>";
|
@@ -92,12 +137,12 @@ function edit_my_calendar_config() {
|
|
92 |
<div class="wrap">
|
93 |
|
94 |
<h2><?php _e('My Calendar Options','my-calendar'); ?></h2>
|
95 |
-
<?php
|
96 |
<div id="poststuff" class="jd-my-calendar">
|
97 |
<div class="postbox">
|
98 |
<h3><?php _e('Calendar Settings','my-calendar'); ?></h3>
|
99 |
<div class="inside">
|
100 |
-
<form name="my-calendar" id="my-calendar" method="post" action="<?php
|
101 |
<fieldset>
|
102 |
<legend><?php _e('Primary Calendar Options','my-calendar'); ?></legend>
|
103 |
<p>
|
@@ -153,7 +198,27 @@ function edit_my_calendar_config() {
|
|
153 |
<input type="submit" name="save" class="button-primary" value="<?php _e('Save','my-calendar'); ?> »" />
|
154 |
</p>
|
155 |
</form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
</div>
|
|
|
157 |
</div>
|
158 |
</div>
|
159 |
</div>
|
@@ -161,4 +226,5 @@ function edit_my_calendar_config() {
|
|
161 |
|
162 |
|
163 |
}
|
|
|
164 |
?>
|
1 |
<?php
|
2 |
// Display the admin configuration page
|
3 |
+
|
4 |
+
if ($_POST['import'] == 'true') {
|
5 |
+
my_calendar_import();
|
6 |
+
}
|
7 |
+
|
8 |
+
function my_calendar_import() {
|
9 |
+
if ( get_option('ko_calendar_imported') != 'true' ) {
|
10 |
+
global $wpdb;
|
11 |
+
define('KO_CALENDAR_TABLE', $wpdb->prefix . 'calendar');
|
12 |
+
define('KO_CALENDAR_CATS', $wpdb->prefix . 'calendar_categories');
|
13 |
+
$events = $wpdb->get_results("SELECT * FROM " . KO_CALENDAR_TABLE, 'ARRAY_A');
|
14 |
+
$sql = "";
|
15 |
+
foreach ($events as $key) {
|
16 |
+
$title = mysql_real_escape_string($key['event_title']);
|
17 |
+
$desc = mysql_real_escape_string($key['event_desc']);
|
18 |
+
$begin = mysql_real_escape_string($key['event_begin']);
|
19 |
+
$end = mysql_real_escape_string($key['event_end']);
|
20 |
+
$time = mysql_real_escape_string($key['event_time']);
|
21 |
+
$recur = mysql_real_escape_string($key['event_recur']);
|
22 |
+
$repeats = mysql_real_escape_string($key['event_repeats']);
|
23 |
+
$author = mysql_real_escape_string($key['event_author']);
|
24 |
+
$category = mysql_real_escape_string($key['event_category']);
|
25 |
+
$linky = mysql_real_escape_string($key['event_link']);
|
26 |
+
|
27 |
+
$sql .= "INSERT INTO " . MY_CALENDAR_TABLE . " SET
|
28 |
+
event_title='" . ($title) . "',
|
29 |
+
event_desc='" . ($desc) . "',
|
30 |
+
event_begin='" . ($begin) . "',
|
31 |
+
event_end='" . ($end) . "',
|
32 |
+
event_time='" . ($time) . "',
|
33 |
+
event_recur='" . ($recur) . "',
|
34 |
+
event_repeats='" . ($repeats) . "',
|
35 |
+
event_author=".($author).",
|
36 |
+
event_category=".($category).",
|
37 |
+
event_link='".($linky)."';";
|
38 |
+
}
|
39 |
+
$cats = $wpdb->get_results("SELECT * FROM " . KO_CALENDAR_CATS, 'ARRAY_A');
|
40 |
+
$catsql = "";
|
41 |
+
foreach ($cats as $key) {
|
42 |
+
$name = mysql_real_escape_string($key['category_name']);
|
43 |
+
$color = mysql_real_escape_string($key['category_colour']);
|
44 |
+
$id = mysql_real_escape_string($key['category_id']);
|
45 |
+
|
46 |
+
if ($id != '1') {
|
47 |
+
$catsql .= "INSERT INTO " . MY_CALENDAR_CATEGORIES_TABLE . " SET
|
48 |
+
category_id='".$id."',
|
49 |
+
category_name='".$name."',
|
50 |
+
category_color='".$color."';";
|
51 |
+
}
|
52 |
+
}
|
53 |
+
$cats_results = $wpdb->query($catsql);
|
54 |
+
$events_results = $wpdb->query($sql);
|
55 |
+
if ($cats_results !== false) {
|
56 |
+
$message = __('Categories imported successfully.','my-calendar');
|
57 |
+
} else {
|
58 |
+
$message = __('Categories not imported.','my-calendar');
|
59 |
+
}
|
60 |
+
if ($events_results !== false) {
|
61 |
+
$e_message = __('Events imported successfully.','my-calendar');
|
62 |
+
} else {
|
63 |
+
$e_message = __('Events not imported.','my-calendar');
|
64 |
+
}
|
65 |
+
$return_value = "<div id='message' class='updated fade'><p><strong>$message</strong><br /><strong>$e_message</strong></p></div>";
|
66 |
+
echo $return_value;
|
67 |
+
add_option( 'ko_calendar_imported','true' );
|
68 |
+
}
|
69 |
+
}
|
70 |
+
|
71 |
function edit_my_calendar_config() {
|
72 |
global $wpdb, $initial_style;
|
73 |
|
74 |
// We can't use this page unless My Calendar is installed/upgraded
|
75 |
+
check_my_calendar();
|
76 |
|
77 |
if (isset($_POST['permissions']) && isset($_POST['style'])) {
|
78 |
+
|
79 |
+
if ($_POST['permissions'] == 'subscriber') { $new_perms = 'read'; }
|
80 |
+
else if ($_POST['permissions'] == 'contributor') { $new_perms = 'edit_posts'; }
|
81 |
+
else if ($_POST['permissions'] == 'author') { $new_perms = 'publish_posts'; }
|
82 |
+
else if ($_POST['permissions'] == 'editor') { $new_perms = 'moderate_comments'; }
|
83 |
else if ($_POST['permissions'] == 'admin') { $new_perms = 'manage_options'; }
|
84 |
else { $new_perms = 'manage_options'; }
|
85 |
|
87 |
$my_calendar_show_months = (int) $_POST['my_calendar_show_months'];
|
88 |
$my_calendar_date_format = $_POST['my_calendar_date_format'];
|
89 |
|
90 |
+
$disp_author = ($_POST['display_author']=='on')?'true':'false';
|
91 |
+
$disp_jump = ($_POST['display_jump']=='on')?'true':'false';
|
92 |
+
$use_styles = ($_POST['use_styles']=='on')?'true':'false';
|
93 |
+
$my_calendar_show_map = ($_POST['my_calendar_show_map']=='on')?'true':'false';
|
94 |
+
$my_calendar_show_address = ($_POST['my_calendar_show_address']=='on')?'true':'false';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
|
96 |
update_option('can_manage_events',$new_perms);
|
97 |
update_option('my_calendar_style',$my_calendar_style);
|
106 |
update_option('list_javascript', (int) $_POST['list_javascript']);
|
107 |
// Check to see if we are replacing the original style
|
108 |
|
109 |
+
if ( $_POST['reset_styles'] == 'on') {
|
110 |
update_option('my_calendar_style',$initial_style);
|
111 |
}
|
112 |
echo "<div class=\"updated\"><p><strong>".__('Settings saved','my-calendar').".</strong></p></div>";
|
137 |
<div class="wrap">
|
138 |
|
139 |
<h2><?php _e('My Calendar Options','my-calendar'); ?></h2>
|
140 |
+
<?php jd_show_support_box(); ?>
|
141 |
<div id="poststuff" class="jd-my-calendar">
|
142 |
<div class="postbox">
|
143 |
<h3><?php _e('Calendar Settings','my-calendar'); ?></h3>
|
144 |
<div class="inside">
|
145 |
+
<form name="my-calendar" id="my-calendar" method="post" action="<?php bloginfo('url'); ?>/wp-admin/admin.php?page=my-calendar-config">
|
146 |
<fieldset>
|
147 |
<legend><?php _e('Primary Calendar Options','my-calendar'); ?></legend>
|
148 |
<p>
|
198 |
<input type="submit" name="save" class="button-primary" value="<?php _e('Save','my-calendar'); ?> »" />
|
199 |
</p>
|
200 |
</form>
|
201 |
+
<?php
|
202 |
+
if ( get_option('ko_calendar_imported') != 'true' ) {
|
203 |
+
if (function_exists('check_calendar')) {
|
204 |
+
echo "<div class='import'>";
|
205 |
+
echo "<p>";
|
206 |
+
_e('My Calendar has identified that you have the Calendar plugin by Kieran O\'Shea installed. You can import those events and categories into the My Calendar database. Would you like to import these events?','my-calendar');
|
207 |
+
echo "</p>";
|
208 |
+
?>
|
209 |
+
<form method="post" action="<?php bloginfo('url'); ?>/wp-admin/admin.php?page=my-calendar-config">
|
210 |
+
<div>
|
211 |
+
<input type="hidden" name="import" value="true" />
|
212 |
+
<input type="submit" value="Import from Calendar" name="import-calendar" class="button-primary" />
|
213 |
+
</div>
|
214 |
+
</form>
|
215 |
+
<?php
|
216 |
+
echo "</div>";
|
217 |
+
}
|
218 |
+
}
|
219 |
+
?>
|
220 |
</div>
|
221 |
+
|
222 |
</div>
|
223 |
</div>
|
224 |
</div>
|
226 |
|
227 |
|
228 |
}
|
229 |
+
|
230 |
?>
|
my-calendar-widgets.php
CHANGED
@@ -9,7 +9,7 @@ function init_my_calendar_today() {
|
|
9 |
extract($args);
|
10 |
$the_title = get_option('my_calendar_today_title');
|
11 |
$widget_title = empty($the_title) ? __('Today\'s Events','my-calendar') : $the_title;
|
12 |
-
$the_events =
|
13 |
if ($the_events != '') {
|
14 |
echo $before_widget;
|
15 |
echo $before_title . $widget_title . $after_title;
|
@@ -54,7 +54,7 @@ function init_my_calendar_upcoming() {
|
|
54 |
extract($args);
|
55 |
$the_title = get_option('my_calendar_upcoming_title');
|
56 |
$widget_title = empty($the_title) ? __('Upcoming Events','my-calendar') : $the_title;
|
57 |
-
$the_events =
|
58 |
if ($the_events != '') {
|
59 |
echo $before_widget;
|
60 |
echo $before_title . $widget_title . $after_title;
|
@@ -138,11 +138,11 @@ function init_my_calendar_upcoming() {
|
|
138 |
|
139 |
|
140 |
// Widget upcoming events
|
141 |
-
function
|
142 |
global $wpdb;
|
143 |
|
144 |
// This function cannot be called unless calendar is up to date
|
145 |
-
|
146 |
$template = get_option('my_calendar_upcoming_template');
|
147 |
$display_upcoming_type = get_option('display_upcoming_type');
|
148 |
|
@@ -160,18 +160,18 @@ function upcoming_events() {
|
|
160 |
if ($display_upcoming_type == "date") {
|
161 |
while ($day_count < $future_days+1) {
|
162 |
list($y,$m,$d) = split("-",date("Y-m-d",mktime($day_count*24,0,0,date("m"),date("d"),date("Y"))));
|
163 |
-
$events =
|
164 |
|
165 |
-
usort($events, "
|
166 |
foreach($events as $event) {
|
167 |
$event_details = event_as_array($event);
|
168 |
-
$output .= "<li>".
|
169 |
}
|
170 |
$day_count = $day_count+1;
|
171 |
}
|
172 |
} else {
|
173 |
-
$events =
|
174 |
-
usort($events, "
|
175 |
for ($i=0;$i<=($past_events+$future_events);$i++) {
|
176 |
if ($events[$i]) {
|
177 |
$near_events[] = $events[$i]; // split off a number of events equal to the past + future settings
|
@@ -179,21 +179,21 @@ function upcoming_events() {
|
|
179 |
}
|
180 |
|
181 |
$events = $near_events;
|
182 |
-
usort($events, "
|
183 |
|
184 |
foreach($events as $event) {
|
185 |
$event_details = event_as_array($event);
|
186 |
$today = date('Y').'-'.date('m').'-'.date('d');
|
187 |
$date = date('Y-m-d',strtotime($event_details['date']));
|
188 |
-
if (
|
189 |
$class = "past-event";
|
190 |
} else {
|
191 |
$class = "future-event";
|
192 |
}
|
193 |
-
if (
|
194 |
$class = "today";
|
195 |
}
|
196 |
-
$output .= "<li class=\"$class\">".
|
197 |
}
|
198 |
$day_count = $day_count+1;
|
199 |
}
|
@@ -205,19 +205,19 @@ function upcoming_events() {
|
|
205 |
}
|
206 |
|
207 |
// Widget todays events
|
208 |
-
function
|
209 |
global $wpdb;
|
210 |
|
211 |
// This function cannot be called unless calendar is up to date
|
212 |
-
|
213 |
|
214 |
$template = get_option('my_calendar_today_template');
|
215 |
|
216 |
-
$events =
|
217 |
if (count($events) != 0) {
|
218 |
$output = "<ul>";
|
219 |
}
|
220 |
-
usort($events, "
|
221 |
foreach($events as $event) {
|
222 |
$event_details = event_as_array($event);
|
223 |
|
@@ -228,7 +228,7 @@ function todays_events() {
|
|
228 |
}
|
229 |
// correct displayed time to today
|
230 |
$event_details['date'] = $date;
|
231 |
-
$output .= "<li>".
|
232 |
}
|
233 |
if (count($events) != 0) {
|
234 |
$output .= "</ul>";
|
@@ -236,7 +236,7 @@ function todays_events() {
|
|
236 |
}
|
237 |
}
|
238 |
|
239 |
-
function
|
240 |
//1st argument: array of details
|
241 |
//2nd argument: template to print details into
|
242 |
foreach ($array as $key=>$value) {
|
@@ -250,7 +250,7 @@ function draw_widget_event($array,$template) {
|
|
250 |
function event_as_array($event) {
|
251 |
global $wpdb;
|
252 |
// My Calendar must be updated to run this function
|
253 |
-
|
254 |
|
255 |
$sql = "SELECT category_name FROM " . MY_CALENDAR_CATEGORIES_TABLE . " WHERE category_id=".$event->event_category;
|
256 |
$category_name = $wpdb->get_row($sql);
|
@@ -296,10 +296,13 @@ if (strlen($map_string) > 10) {
|
|
296 |
|
297 |
if (get_option('my_calendar_date_format') != '') {
|
298 |
$date = date(get_option('my_calendar_date_format'),strtotime($event->event_begin));
|
|
|
299 |
} else {
|
300 |
$date = date(get_option('date_format'),strtotime($event->event_begin));
|
|
|
301 |
}
|
302 |
|
|
|
303 |
$details = array();
|
304 |
$details['category'] = $category_name->category_name;
|
305 |
$details['title'] = $event->event_title;
|
@@ -313,6 +316,7 @@ $date = date(get_option('date_format'),strtotime($event->event_begin));
|
|
313 |
$details['link_title'] = $event->event_title;
|
314 |
}
|
315 |
$details['date'] = $date;
|
|
|
316 |
$details['location'] = $event->event_label;
|
317 |
$details['street'] = $event->event_street;
|
318 |
$details['street2'] = $event->event_street2;
|
9 |
extract($args);
|
10 |
$the_title = get_option('my_calendar_today_title');
|
11 |
$widget_title = empty($the_title) ? __('Today\'s Events','my-calendar') : $the_title;
|
12 |
+
$the_events = my_calendar_todays_events();
|
13 |
if ($the_events != '') {
|
14 |
echo $before_widget;
|
15 |
echo $before_title . $widget_title . $after_title;
|
54 |
extract($args);
|
55 |
$the_title = get_option('my_calendar_upcoming_title');
|
56 |
$widget_title = empty($the_title) ? __('Upcoming Events','my-calendar') : $the_title;
|
57 |
+
$the_events = my_calendar_upcoming_events();
|
58 |
if ($the_events != '') {
|
59 |
echo $before_widget;
|
60 |
echo $before_title . $widget_title . $after_title;
|
138 |
|
139 |
|
140 |
// Widget upcoming events
|
141 |
+
function my_calendar_upcoming_events() {
|
142 |
global $wpdb;
|
143 |
|
144 |
// This function cannot be called unless calendar is up to date
|
145 |
+
check_my_calendar();
|
146 |
$template = get_option('my_calendar_upcoming_template');
|
147 |
$display_upcoming_type = get_option('display_upcoming_type');
|
148 |
|
160 |
if ($display_upcoming_type == "date") {
|
161 |
while ($day_count < $future_days+1) {
|
162 |
list($y,$m,$d) = split("-",date("Y-m-d",mktime($day_count*24,0,0,date("m"),date("d"),date("Y"))));
|
163 |
+
$events = my_calendar_grab_events( $y,$m,$d );
|
164 |
|
165 |
+
usort($events, "my_calendar_time_cmp");
|
166 |
foreach($events as $event) {
|
167 |
$event_details = event_as_array($event);
|
168 |
+
$output .= "<li>".jd_draw_widget_event($event_details,$template)."</li>";
|
169 |
}
|
170 |
$day_count = $day_count+1;
|
171 |
}
|
172 |
} else {
|
173 |
+
$events = mc_get_all_events( ); // grab all events WITHIN reasonable proximity
|
174 |
+
usort($events, "my_calendar_timediff_cmp");// sort all events by proximity to current date
|
175 |
for ($i=0;$i<=($past_events+$future_events);$i++) {
|
176 |
if ($events[$i]) {
|
177 |
$near_events[] = $events[$i]; // split off a number of events equal to the past + future settings
|
179 |
}
|
180 |
|
181 |
$events = $near_events;
|
182 |
+
usort($events, "my_calendar_datetime_cmp"); // sort split events by date
|
183 |
|
184 |
foreach($events as $event) {
|
185 |
$event_details = event_as_array($event);
|
186 |
$today = date('Y').'-'.date('m').'-'.date('d');
|
187 |
$date = date('Y-m-d',strtotime($event_details['date']));
|
188 |
+
if (my_calendar_date_comp($date,$today)===true) {
|
189 |
$class = "past-event";
|
190 |
} else {
|
191 |
$class = "future-event";
|
192 |
}
|
193 |
+
if (my_calendar_date_equal($date,$today)) {
|
194 |
$class = "today";
|
195 |
}
|
196 |
+
$output .= "<li class=\"$class\">".jd_draw_widget_event($event_details,$template)."</li>\n";
|
197 |
}
|
198 |
$day_count = $day_count+1;
|
199 |
}
|
205 |
}
|
206 |
|
207 |
// Widget todays events
|
208 |
+
function my_calendar_todays_events() {
|
209 |
global $wpdb;
|
210 |
|
211 |
// This function cannot be called unless calendar is up to date
|
212 |
+
check_my_calendar();
|
213 |
|
214 |
$template = get_option('my_calendar_today_template');
|
215 |
|
216 |
+
$events = my_calendar_grab_events(date("Y"),date("m"),date("d"));
|
217 |
if (count($events) != 0) {
|
218 |
$output = "<ul>";
|
219 |
}
|
220 |
+
usort($events, "my_calendar_time_cmp");
|
221 |
foreach($events as $event) {
|
222 |
$event_details = event_as_array($event);
|
223 |
|
228 |
}
|
229 |
// correct displayed time to today
|
230 |
$event_details['date'] = $date;
|
231 |
+
$output .= "<li>".jd_draw_widget_event($event_details,$template)."</li>";
|
232 |
}
|
233 |
if (count($events) != 0) {
|
234 |
$output .= "</ul>";
|
236 |
}
|
237 |
}
|
238 |
|
239 |
+
function jd_draw_widget_event($array,$template) {
|
240 |
//1st argument: array of details
|
241 |
//2nd argument: template to print details into
|
242 |
foreach ($array as $key=>$value) {
|
250 |
function event_as_array($event) {
|
251 |
global $wpdb;
|
252 |
// My Calendar must be updated to run this function
|
253 |
+
check_my_calendar();
|
254 |
|
255 |
$sql = "SELECT category_name FROM " . MY_CALENDAR_CATEGORIES_TABLE . " WHERE category_id=".$event->event_category;
|
256 |
$category_name = $wpdb->get_row($sql);
|
296 |
|
297 |
if (get_option('my_calendar_date_format') != '') {
|
298 |
$date = date(get_option('my_calendar_date_format'),strtotime($event->event_begin));
|
299 |
+
$date_end = date(get_option('my_calendar_date_format'),strtotime($event->event_end));
|
300 |
} else {
|
301 |
$date = date(get_option('date_format'),strtotime($event->event_begin));
|
302 |
+
$date_end = date(get_option('date_format'),strtotime($event->event_end));
|
303 |
}
|
304 |
|
305 |
+
|
306 |
$details = array();
|
307 |
$details['category'] = $category_name->category_name;
|
308 |
$details['title'] = $event->event_title;
|
316 |
$details['link_title'] = $event->event_title;
|
317 |
}
|
318 |
$details['date'] = $date;
|
319 |
+
$details['enddate'] = $date_end;
|
320 |
$details['location'] = $event->event_label;
|
321 |
$details['street'] = $event->event_street;
|
322 |
$details['street2'] = $event->event_street2;
|
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.0.
|
9 |
*/
|
10 |
/* Copyright 2009 Joe Dolson (email : joe@joedolson.com)
|
11 |
|
@@ -27,16 +27,16 @@ Version: 1.0.0
|
|
27 |
// Enable internationalisation
|
28 |
$plugin_dir = basename(dirname(__FILE__));
|
29 |
load_plugin_textdomain( 'my-calendar','wp-content/plugins/'.$plugin_dir, $plugin_dir);
|
30 |
-
|
31 |
// Define the tables used in My Calendar
|
32 |
-
define('MY_CALENDAR_TABLE', $
|
33 |
-
define('MY_CALENDAR_CATEGORIES_TABLE', $
|
34 |
// Create a master category for My Calendar and its sub-pages
|
35 |
add_action('admin_menu', 'my_calendar_menu');
|
36 |
// Add the function that puts style information in the header
|
37 |
add_action('wp_head', 'my_calendar_wp_head');
|
38 |
// Add the function that deals with deleted users
|
39 |
-
add_action('delete_user', '
|
40 |
// Add the widgets if we are using version 2.8
|
41 |
add_action('widgets_init', 'init_my_calendar_today');
|
42 |
add_action('widgets_init', 'init_my_calendar_upcoming');
|
@@ -58,7 +58,7 @@ include(dirname(__FILE__).'/date-utilities.php' );
|
|
58 |
|
59 |
// Before we get on with the functions, we need to define the initial style used for My Calendar
|
60 |
|
61 |
-
function
|
62 |
?>
|
63 |
<div class="resources">
|
64 |
<ul>
|
@@ -79,10 +79,10 @@ function show_support_box() {
|
|
79 |
}
|
80 |
|
81 |
// Function to deal with events posted by a user when that user is deleted
|
82 |
-
function
|
83 |
global $wpdb;
|
84 |
// This wouldn't work unless the database was up to date. Lets check.
|
85 |
-
|
86 |
// Do the query
|
87 |
$wpdb->get_results( "UPDATE ".MY_CALENDAR_TABLE." SET event_author=".$wpdb->get_var("SELECT MIN(ID) FROM ".$wpdb->prefix."users",0,0)." WHERE event_author=".$id );
|
88 |
}
|
@@ -91,7 +91,7 @@ function deal_with_deleted_user($id) {
|
|
91 |
function my_calendar_wp_head() {
|
92 |
global $wpdb;
|
93 |
// If the calendar isn't installed or upgraded this won't work
|
94 |
-
|
95 |
$styles = stripcslashes(get_option('my_calendar_style'));
|
96 |
if ( get_option('my_calendar_use_styles') != 'true' ) {
|
97 |
echo "
|
@@ -108,7 +108,7 @@ $styles
|
|
108 |
function my_calendar_menu() {
|
109 |
global $wpdb;
|
110 |
// We make use of the My Calendar tables so we must have installed My Calendar
|
111 |
-
|
112 |
// Set admin as the only one who can use My Calendar for security
|
113 |
$allowed_group = 'manage_options';
|
114 |
// Use the database to *potentially* override the above if allowed
|
@@ -117,14 +117,14 @@ function my_calendar_menu() {
|
|
117 |
|
118 |
// Add the admin panel pages for My Calendar. Use permissions pulled from above
|
119 |
if (function_exists('add_menu_page')) {
|
120 |
-
add_menu_page(__('My Calendar','my-calendar'), __('My Calendar','my-calendar'), $allowed_group, 'my-calendar', '
|
121 |
}
|
122 |
if (function_exists('add_submenu_page')) {
|
123 |
-
add_submenu_page('my-calendar', __('Add/Edit Events','my-calendar'), __('Add/Edit Events','my-calendar'), $allowed_group, 'my-calendar', '
|
124 |
add_action( "admin_head", 'my_calendar_write_js' );
|
125 |
add_action( "admin_head", 'my_calendar_add_styles' );
|
126 |
// Note only admin can change calendar options
|
127 |
-
add_submenu_page('my-calendar', __('Manage Categories','my-calendar'), __('Manage Categories','my-calendar'), 'manage_options', 'my-calendar-categories', '
|
128 |
add_submenu_page('my-calendar', __('Settings','my-calendar'), __('Settings','my-calendar'), 'manage_options', 'my-calendar-config', 'edit_my_calendar_config');
|
129 |
add_submenu_page('my-calendar', __('My Calendar Help','my-calendar'), __('Help','my-calendar'), 'manage_options', 'my-calendar-help', 'my_calendar_help');
|
130 |
}
|
@@ -265,6 +265,15 @@ text-decoration: none;
|
|
265 |
border: 1px solid #999;
|
266 |
background: #b11;
|
267 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
268 |
.n4 {width: 16px;}
|
269 |
.n5 {width: 32px;}
|
270 |
.n6 {width: 64px;}
|
@@ -287,7 +296,7 @@ function my_calendar_insert($atts) {
|
|
287 |
add_shortcode('my_calendar','my_calendar_insert');
|
288 |
|
289 |
// Function to check what version of My Calendar is installed and install if needed
|
290 |
-
function
|
291 |
// Checks to make sure My Calendar is installed, if not it adds the default
|
292 |
// database tables and populates them with test data. If it is, then the
|
293 |
// version is checked through various means and if it is not up to date
|
@@ -564,10 +573,10 @@ $default_template = "<strong>{date}</strong> – {link_title}<br /><span>{ti
|
|
564 |
add_option('display_upcoming_days',7);
|
565 |
add_option('my_calendar_version','1.0');
|
566 |
add_option('display_upcoming_type','false');
|
567 |
-
add_option('
|
568 |
add_option('display_past_days',0);
|
569 |
add_option('display_past_events',2);
|
570 |
-
add_option('my_calendar_use_styles','
|
571 |
add_option('my_calendar_show_months',1);
|
572 |
add_option('my_calendar_show_map','true');
|
573 |
add_option('my_calendar_show_address','false');
|
@@ -575,8 +584,8 @@ $default_template = "<strong>{date}</strong> – {link_title}<br /><span>{ti
|
|
575 |
add_option('my_calendar_upcoming_template',$default_template);
|
576 |
add_option('my_calendar_today_title','Today\'s Events');
|
577 |
add_option('my_calendar_upcoming_title','Upcoming Events');
|
578 |
-
add_option('calendar_javascript',
|
579 |
-
add_option('list_javascript',
|
580 |
$sql = "UPDATE " . MY_CALENDAR_TABLE . " SET event_category=1";
|
581 |
$wpdb->get_results($sql);
|
582 |
|
@@ -615,7 +624,7 @@ function jd_cal_checkSelect( $theFieldname,$theValue ) {
|
|
615 |
|
616 |
// Function to return a prefix which will allow the correct
|
617 |
// placement of arguments into the query string.
|
618 |
-
function
|
619 |
// Get the permalink structure from WordPress
|
620 |
$p_link = get_permalink();
|
621 |
|
@@ -652,18 +661,18 @@ function permalink_prefix() {
|
|
652 |
}
|
653 |
|
654 |
// Configure the "Next" link in the calendar
|
655 |
-
function
|
656 |
$mod_rewrite_months = array(1=>'jan','feb','mar','apr','may','jun','jul','aug','sept','oct','nov','dec');
|
657 |
$next_year = $cur_year + 1;
|
658 |
|
659 |
$num_months = get_option('my_calendar_show_months');
|
660 |
if ($num_months <= 1) {
|
661 |
if ($cur_month == 12) {
|
662 |
-
return '<a href="' .
|
663 |
} else {
|
664 |
$next_month = $cur_month + 1;
|
665 |
$month = $mod_rewrite_months[$next_month];
|
666 |
-
return '<a href="' .
|
667 |
}
|
668 |
} else {
|
669 |
if (($cur_month + $num_months) > 12) {
|
@@ -673,26 +682,26 @@ $num_months = get_option('my_calendar_show_months');
|
|
673 |
}
|
674 |
$month = $mod_rewrite_months[$next_month];
|
675 |
if ($cur_month >= (12-$num_months)) {
|
676 |
-
return '<a href="' .
|
677 |
} else {
|
678 |
-
return '<a href="' .
|
679 |
}
|
680 |
}
|
681 |
}
|
682 |
|
683 |
// Configure the "Previous" link in the calendar
|
684 |
-
function
|
685 |
$mod_rewrite_months = array(1=>'jan','feb','mar','apr','may','jun','jul','aug','sept','oct','nov','dec');
|
686 |
$last_year = $cur_year - 1;
|
687 |
|
688 |
$num_months = get_option('my_calendar_show_months');
|
689 |
if ($num_months <= 1) {
|
690 |
if ($cur_month == 1) {
|
691 |
-
return '<a href="' .
|
692 |
} else {
|
693 |
$next_month = $cur_month - 1;
|
694 |
$month = $mod_rewrite_months[$next_month];
|
695 |
-
return '<a href="' .
|
696 |
}
|
697 |
} else {
|
698 |
if ($cur_month > $num_months) {
|
@@ -702,29 +711,29 @@ $num_months = get_option('my_calendar_show_months');
|
|
702 |
}
|
703 |
$month = $mod_rewrite_months[$next_month];
|
704 |
if ($cur_month <= $num_months) {
|
705 |
-
return '<a href="' .
|
706 |
} else {
|
707 |
-
return '<a href="' .
|
708 |
}
|
709 |
}
|
710 |
}
|
711 |
|
712 |
// Used to draw multiple events
|
713 |
-
function
|
714 |
// We need to sort arrays of objects by time
|
715 |
-
usort($events, "
|
716 |
foreach($events as $event) {
|
717 |
-
$output .=
|
718 |
}
|
719 |
return $output;
|
720 |
}
|
721 |
|
722 |
// Used to draw an event to the screen
|
723 |
-
function
|
724 |
global $wpdb;
|
725 |
|
726 |
// My Calendar must be updated to run this function
|
727 |
-
|
728 |
|
729 |
$display_author = get_option('display_author');
|
730 |
$display_map = get_option('my_calendar_show_map');
|
@@ -816,10 +825,11 @@ $my_calendar_directory = get_bloginfo( 'wpurl' ) . '/' . PLUGINDIR . '/' . dirna
|
|
816 |
return $details;
|
817 |
}
|
818 |
// used to generate upcoming events lists
|
819 |
-
function
|
820 |
global $wpdb;
|
821 |
$events = $wpdb->get_results("SELECT * FROM " . MY_CALENDAR_TABLE);
|
822 |
-
$
|
|
|
823 |
if (!empty($events)) {
|
824 |
foreach($events as $event) {
|
825 |
if ($event->event_recur != "S") {
|
@@ -831,8 +841,8 @@ global $wpdb;
|
|
831 |
switch ($event->event_recur) {
|
832 |
case "D":
|
833 |
for ($i=$numback;$i<=$numforward;$i++) {
|
834 |
-
$begin =
|
835 |
-
$end =
|
836 |
${$i} = clone $event;
|
837 |
${$i}->event_begin = $begin;
|
838 |
${$i}->event_end = $end;
|
@@ -841,8 +851,8 @@ global $wpdb;
|
|
841 |
break;
|
842 |
case "W":
|
843 |
for ($i=$numback;$i<=$numforward;$i++) {
|
844 |
-
$begin =
|
845 |
-
$end =
|
846 |
${$i} = clone $event;
|
847 |
${$i}->event_begin = $begin;
|
848 |
${$i}->event_end = $end;
|
@@ -851,8 +861,8 @@ global $wpdb;
|
|
851 |
break;
|
852 |
case "M":
|
853 |
for ($i=$numback;$i<=$numforward;$i++) {
|
854 |
-
$begin =
|
855 |
-
$end =
|
856 |
${$i} = clone $event;
|
857 |
${$i}->event_begin = $begin;
|
858 |
${$i}->event_end = $end;
|
@@ -861,8 +871,8 @@ global $wpdb;
|
|
861 |
break;
|
862 |
case "Y":
|
863 |
for ($i=$numback;$i<=$numforward;$i++) {
|
864 |
-
$begin =
|
865 |
-
$end =
|
866 |
${$i} = clone $event;
|
867 |
${$i}->event_begin = $begin;
|
868 |
${$i}->event_end = $end;
|
@@ -874,11 +884,11 @@ global $wpdb;
|
|
874 |
switch ($event->event_recur) {
|
875 |
case "D":
|
876 |
$event_begin = $event->event_begin;
|
877 |
-
$today = date('Y').'-'.date('m').'-'.date('d');
|
878 |
$nDays = get_option('display_past_events');
|
879 |
-
$fDays = get_option('
|
880 |
-
if (
|
881 |
-
if (
|
882 |
$diff = jd_date_diff_precise(strtotime($event_begin));
|
883 |
$diff_days = $diff/(86400);
|
884 |
$days = explode(".",$diff_days);
|
@@ -886,8 +896,8 @@ global $wpdb;
|
|
886 |
$realFinish = $days[0] + $fDays;
|
887 |
|
888 |
for ($realStart;$realStart<=$realFinish;$realStart++) { // jump forward to near present.
|
889 |
-
$this_date =
|
890 |
-
if (
|
891 |
${$realStart} = clone $event;
|
892 |
${$realStart}->event_begin = $this_date;
|
893 |
$arr_events[] = ${$realStart};
|
@@ -897,8 +907,8 @@ global $wpdb;
|
|
897 |
} else {
|
898 |
$realDays = -($nDays);
|
899 |
for ($realDays;$realDays<=$fDays;$realDays++) { // for each event within plus or minus range, mod date and add to array.
|
900 |
-
$this_date =
|
901 |
-
if (
|
902 |
${$realDays} = clone $event;
|
903 |
${$realDays}->event_begin = $this_date;
|
904 |
$arr_events[] = ${$realDays};
|
@@ -912,12 +922,12 @@ global $wpdb;
|
|
912 |
|
913 |
case "W":
|
914 |
$event_begin = $event->event_begin;
|
915 |
-
$today = date('Y').'-'.date('m').'-'.date('d');
|
916 |
$nDays = get_option('display_past_events');
|
917 |
-
$fDays = get_option('
|
918 |
|
919 |
-
if (
|
920 |
-
if (
|
921 |
$diff = jd_date_diff_precise(strtotime($event_begin));
|
922 |
$diff_weeks = $diff/(86400*7);
|
923 |
$weeks = explode(".",$diff_weeks);
|
@@ -925,8 +935,8 @@ global $wpdb;
|
|
925 |
$realFinish = $weeks[0] + $fDays;
|
926 |
|
927 |
for ($realStart;$realStart<=$realFinish;$realStart++) { // jump forward to near present.
|
928 |
-
$this_date =
|
929 |
-
if (
|
930 |
${$realStart} = clone $event;
|
931 |
${$realStart}->event_begin = $this_date;
|
932 |
$arr_events[] = ${$realStart};
|
@@ -936,8 +946,8 @@ global $wpdb;
|
|
936 |
} else {
|
937 |
$realDays = -($nDays);
|
938 |
for ($realDays;$realDays<=$fDays;$realDays++) { // for each event within plus or minus range, mod date and add to array.
|
939 |
-
$this_date =
|
940 |
-
if (
|
941 |
${$realDays} = clone $event;
|
942 |
${$realDays}->event_begin = $this_date;
|
943 |
$arr_events[] = ${$realDays};
|
@@ -951,12 +961,12 @@ global $wpdb;
|
|
951 |
|
952 |
case "M":
|
953 |
$event_begin = $event->event_begin;
|
954 |
-
$today = date('Y').'-'.date('m').'-'.date('d');
|
955 |
$nDays = get_option('display_past_events');
|
956 |
-
$fDays = get_option('
|
957 |
|
958 |
-
if (
|
959 |
-
if (
|
960 |
$diff = jd_date_diff_precise(strtotime($event_begin));
|
961 |
$diff_days = $diff/(86400*30);
|
962 |
$days = explode(".",$diff_days);
|
@@ -964,8 +974,8 @@ global $wpdb;
|
|
964 |
$realFinish = $days[0] + $fDays;
|
965 |
|
966 |
for ($realStart;$realStart<=$realFinish;$realStart++) { // jump forward to near present.
|
967 |
-
$this_date =
|
968 |
-
if (
|
969 |
${$realStart} = clone $event;
|
970 |
${$realStart}->event_begin = $this_date;
|
971 |
$arr_events[] = ${$realStart};
|
@@ -975,8 +985,8 @@ global $wpdb;
|
|
975 |
} else {
|
976 |
$realDays = -($nDays);
|
977 |
for ($realDays;$realDays<=$fDays;$realDays++) { // for each event within plus or minus range, mod date and add to array.
|
978 |
-
$this_date =
|
979 |
-
if (
|
980 |
${$realDays} = clone $event;
|
981 |
${$realDays}->event_begin = $this_date;
|
982 |
$arr_events[] = ${$realDays};
|
@@ -990,12 +1000,12 @@ global $wpdb;
|
|
990 |
|
991 |
case "Y":
|
992 |
$event_begin = $event->event_begin;
|
993 |
-
$today = date('Y').'-'.date('m').'-'.date('d');
|
994 |
$nDays = get_option('display_past_events');
|
995 |
-
$fDays = get_option('
|
996 |
|
997 |
-
if (
|
998 |
-
if (
|
999 |
$diff = jd_date_diff_precise(strtotime($event_begin));
|
1000 |
$diff_days = $diff/(86400*365);
|
1001 |
$days = explode(".",$diff_days);
|
@@ -1003,8 +1013,8 @@ global $wpdb;
|
|
1003 |
$realFinish = $days[0] + $fDays;
|
1004 |
|
1005 |
for ($realStart;$realStart<=$realFinish;$realStart++) { // jump forward to near present.
|
1006 |
-
$this_date =
|
1007 |
-
if (
|
1008 |
${$realStart} = clone $event;
|
1009 |
${$realStart}->event_begin = $this_date;
|
1010 |
$arr_events[] = ${$realStart};
|
@@ -1014,8 +1024,8 @@ global $wpdb;
|
|
1014 |
} else {
|
1015 |
$realDays = -($nDays);
|
1016 |
for ($realDays;$realDays<=$fDays;$realDays++) { // for each event within plus or minus range, mod date and add to array.
|
1017 |
-
$this_date =
|
1018 |
-
if (
|
1019 |
${$realDays} = clone $event;
|
1020 |
${$realDays}->event_begin = $this_date;
|
1021 |
$arr_events[] = ${$realDays};
|
@@ -1036,7 +1046,7 @@ global $wpdb;
|
|
1036 |
return $arr_events;
|
1037 |
}
|
1038 |
// Grab all events for the requested date from calendar
|
1039 |
-
function
|
1040 |
global $wpdb;
|
1041 |
|
1042 |
if ( $category!=null ) {
|
@@ -1248,8 +1258,9 @@ function grab_events($y,$m,$d,$category=null) {
|
|
1248 |
return $arr_events;
|
1249 |
}
|
1250 |
|
1251 |
-
function
|
1252 |
-
$
|
|
|
1253 |
if (isset($_GET['yr']) && isset($_GET['month'])) {
|
1254 |
if ($month == $_GET['month']) {
|
1255 |
return ' selected="selected"';
|
@@ -1258,8 +1269,10 @@ function month_comparison($month) {
|
|
1258 |
return ' selected="selected"';
|
1259 |
}
|
1260 |
}
|
1261 |
-
|
1262 |
-
|
|
|
|
|
1263 |
if (isset($_GET['yr']) && isset($_GET['month'])) {
|
1264 |
if ($year == $_GET['yr']) {
|
1265 |
return ' selected="selected"';
|
@@ -1268,7 +1281,7 @@ function year_comparison($year) {
|
|
1268 |
return ' selected="selected"';
|
1269 |
}
|
1270 |
}
|
1271 |
-
function
|
1272 |
$my_calendar_body = "";
|
1273 |
$my_calendar_body .= '<div class="my-calendar-date-switcher">
|
1274 |
<form method="get" action=""><div>';
|
@@ -1282,41 +1295,43 @@ function build_date_switcher() {
|
|
1282 |
// We build the months in the switcher
|
1283 |
$my_calendar_body .= '
|
1284 |
<label for="my-calendar-month">'.__('Month','my-calendar').':</label> <select id="my-calendar-month" name="month" style="width:100px;">
|
1285 |
-
<option value="jan"'.
|
1286 |
-
<option value="feb"'.
|
1287 |
-
<option value="mar"'.
|
1288 |
-
<option value="apr"'.
|
1289 |
-
<option value="may"'.
|
1290 |
-
<option value="jun"'.
|
1291 |
-
<option value="jul"'.
|
1292 |
-
<option value="aug"'.
|
1293 |
-
<option value="sept"'.
|
1294 |
-
<option value="oct"'.
|
1295 |
-
<option value="nov"'.
|
1296 |
-
<option value="dec"'.
|
1297 |
</select>
|
1298 |
<label for="my-calendar-year">'.__('Year','my-calendar').':</label> <select id="my-calendar-year" name="yr">
|
1299 |
';
|
1300 |
// The year builder is string mania. If you can make sense of this, you know your PHP!
|
1301 |
-
$past =
|
1302 |
-
$future =
|
1303 |
$fut = 1;
|
|
|
|
|
1304 |
while ($past > 0) {
|
1305 |
$p .= ' <option value="';
|
1306 |
-
$p .= date("Y",time())-$past;
|
1307 |
-
$p .= '"'.
|
1308 |
-
$p .= date("Y",time())-$past."</option>\n";
|
1309 |
$past = $past - 1;
|
1310 |
}
|
1311 |
while ($fut < $future) {
|
1312 |
$f .= ' <option value="';
|
1313 |
-
$f .= date("Y",time())+$fut;
|
1314 |
-
$f .= '"'.
|
1315 |
-
$f .= date("Y",time())+$fut."</option>\n";
|
1316 |
$fut = $fut + 1;
|
1317 |
}
|
1318 |
$my_calendar_body .= $p;
|
1319 |
-
$my_calendar_body .= '<option value="'.date("Y",time()).'"'.
|
1320 |
$my_calendar_body .= $f;
|
1321 |
$my_calendar_body .= '</select> <input type="submit" value="'.__('Go','my-calendar').'" /></div>
|
1322 |
</form></div>';
|
@@ -1332,7 +1347,7 @@ function my_calendar($name,$format,$category,$showkey) {
|
|
1332 |
$category=null;
|
1333 |
}
|
1334 |
// First things first, make sure calendar is up to date
|
1335 |
-
|
1336 |
|
1337 |
// Deal with the week not starting on a monday
|
1338 |
if (get_option('start_of_week') == 0) {
|
@@ -1344,12 +1359,13 @@ function my_calendar($name,$format,$category,$showkey) {
|
|
1344 |
|
1345 |
// Carry on with the script
|
1346 |
$name_months = array(1=>__('January','my-calendar'),__('February','my-calendar'),__('March','my-calendar'),__('April','my-calendar'),__('May','my-calendar'),__('June','my-calendar'),__('July','my-calendar'),__('August','my-calendar'),__('September','my-calendar'),__('October','my-calendar'),__('November','my-calendar'),__('December','my-calendar'));
|
|
|
1347 |
|
1348 |
// If we don't pass arguments we want a calendar that is relevant to today
|
1349 |
if (empty($_GET['month']) || empty($_GET['yr'])) {
|
1350 |
-
$c_year = date("Y");
|
1351 |
-
$c_month = date("m");
|
1352 |
-
$c_day = date("d");
|
1353 |
}
|
1354 |
|
1355 |
// Years get funny if we exceed 3000, so we use this check
|
@@ -1359,7 +1375,7 @@ function my_calendar($name,$format,$category,$showkey) {
|
|
1359 |
if ($_GET['month'] == 'jan' || $_GET['month'] == 'feb' || $_GET['month'] == 'mar' || $_GET['month'] == 'apr' || $_GET['month'] == 'may' || $_GET['month'] == 'jun' || $_GET['month'] == 'jul' || $_GET['month'] == 'aug' || $_GET['month'] == 'sept' || $_GET['month'] == 'oct' || $_GET['month'] == 'nov' || $_GET['month'] == 'dec') {
|
1360 |
// Again nasty code to map permalinks into something
|
1361 |
// databases can understand. This will be cleaned up
|
1362 |
-
$c_year =
|
1363 |
if ($_GET['month'] == 'jan') { $t_month = 1; }
|
1364 |
else if ($_GET['month'] == 'feb') { $t_month = 2; }
|
1365 |
else if ($_GET['month'] == 'mar') { $t_month = 3; }
|
@@ -1373,18 +1389,18 @@ function my_calendar($name,$format,$category,$showkey) {
|
|
1373 |
else if ($_GET['month'] == 'nov') { $t_month = 11; }
|
1374 |
else if ($_GET['month'] == 'dec') { $t_month = 12; }
|
1375 |
$c_month = $t_month;
|
1376 |
-
$c_day = date("d");
|
1377 |
} else {
|
1378 |
// No valid month causes the calendar to default to today
|
1379 |
-
$c_year = date("Y");
|
1380 |
-
$c_month = date("m");
|
1381 |
-
$c_day = date("d");
|
1382 |
}
|
1383 |
} else {
|
1384 |
// No valid year causes the calendar to default to today
|
1385 |
-
$c_year = date("Y");
|
1386 |
-
$c_month = date("m");
|
1387 |
-
$c_day = date("d");
|
1388 |
}
|
1389 |
|
1390 |
// Fix the days of the week if week start is not on a monday
|
@@ -1412,15 +1428,15 @@ function my_calendar($name,$format,$category,$showkey) {
|
|
1412 |
$date_switcher = get_option('display_jump');
|
1413 |
|
1414 |
if ($date_switcher == 'true') {
|
1415 |
-
$my_calendar_body .=
|
1416 |
}
|
1417 |
|
1418 |
// The header of the calendar table and the links. Note calls to link functions
|
1419 |
$my_calendar_body .= '
|
1420 |
<div class="my-calendar-nav">
|
1421 |
<ul>
|
1422 |
-
<li class="my-calendar-prev">' .
|
1423 |
-
<li class="my-calendar-next">' .
|
1424 |
</ul>
|
1425 |
</div>
|
1426 |
</div>';
|
@@ -1441,15 +1457,15 @@ function my_calendar($name,$format,$category,$showkey) {
|
|
1441 |
$date_switcher = get_option('display_jump');
|
1442 |
|
1443 |
if ($date_switcher == 'true') {
|
1444 |
-
$my_calendar_body .=
|
1445 |
}
|
1446 |
|
1447 |
// The header of the calendar table and the links. Note calls to link functions
|
1448 |
$my_calendar_body .= '
|
1449 |
<div class="my-calendar-nav">
|
1450 |
<ul>
|
1451 |
-
<li class="my-calendar-prev">' .
|
1452 |
-
<li class="my-calendar-next">' .
|
1453 |
</ul>
|
1454 |
</div>
|
1455 |
</div>';
|
@@ -1482,20 +1498,20 @@ if ($format == "calendar") {
|
|
1482 |
// Colors again, this time for the day numbers
|
1483 |
if (get_option('start_of_week') == 0) {
|
1484 |
// This bit of code is for styles believe it or not.
|
1485 |
-
$grabbed_events =
|
1486 |
$no_events_class = '';
|
1487 |
if (!count($grabbed_events)) {
|
1488 |
$no_events_class = ' no-events';
|
1489 |
}
|
1490 |
-
$my_calendar_body .= '<td class="'.(date("Ymd", mktime (0,0,0,$c_month,$i,$c_year))==date("Ymd")?'current-day':'day-with-date').$no_events_class.'">'."\n ".'<span'.($ii<7&&$ii>1?'':' class="weekend"').'>'.$i++.'</span>'."\n ".
|
1491 |
} else {
|
1492 |
-
$grabbed_events =
|
1493 |
$no_events_class = '';
|
1494 |
if (!count($grabbed_events))
|
1495 |
{
|
1496 |
$no_events_class = ' no-events';
|
1497 |
}
|
1498 |
-
$my_calendar_body .= '<td class="'.(date("Ymd", mktime (0,0,0,$c_month,$i,$c_year))==date("Ymd")?'current-day':'day-with-date').$no_events_class.'">'."\n ".'<span'.($ii<6?'':' class="weekend"').'>'.$i++.'</span>'."\n ".
|
1499 |
}
|
1500 |
} else {
|
1501 |
$my_calendar_body .= "<td class='day-without-date'> </td>\n";
|
@@ -1521,7 +1537,7 @@ if ($date_format == "") {
|
|
1521 |
}
|
1522 |
$c_month = (int) $c_month + $add_month;
|
1523 |
for ($i=1; $i<=$days_in_month; $i++) {
|
1524 |
-
$grabbed_events =
|
1525 |
if (count($grabbed_events)) {
|
1526 |
if ( get_option('list_javascript') != 1) {
|
1527 |
$is_anchor = "<a href='#'>";
|
@@ -1529,10 +1545,10 @@ if ($date_format == "") {
|
|
1529 |
} else {
|
1530 |
$is_anchor = $is_close_anchor = "";
|
1531 |
}
|
1532 |
-
$my_calendar_body .= "<li$class><strong class=\"event-date\">$is_anchor".date($date_format,mktime(0,0,0,$c_month,$i,$c_year))."$is_close_anchor</strong>".
|
1533 |
$num_events++;
|
1534 |
}
|
1535 |
-
if (
|
1536 |
$class = " class='odd'";
|
1537 |
} else {
|
1538 |
$class = "";
|
@@ -1565,7 +1581,7 @@ if ($date_format == "") {
|
|
1565 |
return $my_calendar_body;
|
1566 |
}
|
1567 |
|
1568 |
-
function
|
1569 |
return( $int & 1 );
|
1570 |
}
|
1571 |
|
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.0.2
|
9 |
*/
|
10 |
/* Copyright 2009 Joe Dolson (email : joe@joedolson.com)
|
11 |
|
27 |
// Enable internationalisation
|
28 |
$plugin_dir = basename(dirname(__FILE__));
|
29 |
load_plugin_textdomain( 'my-calendar','wp-content/plugins/'.$plugin_dir, $plugin_dir);
|
30 |
+
global $wpdb;
|
31 |
// Define the tables used in My Calendar
|
32 |
+
define('MY_CALENDAR_TABLE', $wpdb->prefix . 'my_calendar');
|
33 |
+
define('MY_CALENDAR_CATEGORIES_TABLE', $wpdb->prefix . 'my_calendar_categories');
|
34 |
// Create a master category for My Calendar and its sub-pages
|
35 |
add_action('admin_menu', 'my_calendar_menu');
|
36 |
// Add the function that puts style information in the header
|
37 |
add_action('wp_head', 'my_calendar_wp_head');
|
38 |
// Add the function that deals with deleted users
|
39 |
+
add_action('delete_user', 'mc_deal_with_deleted_user');
|
40 |
// Add the widgets if we are using version 2.8
|
41 |
add_action('widgets_init', 'init_my_calendar_today');
|
42 |
add_action('widgets_init', 'init_my_calendar_upcoming');
|
58 |
|
59 |
// Before we get on with the functions, we need to define the initial style used for My Calendar
|
60 |
|
61 |
+
function jd_show_support_box() {
|
62 |
?>
|
63 |
<div class="resources">
|
64 |
<ul>
|
79 |
}
|
80 |
|
81 |
// Function to deal with events posted by a user when that user is deleted
|
82 |
+
function mc_deal_with_deleted_user($id) {
|
83 |
global $wpdb;
|
84 |
// This wouldn't work unless the database was up to date. Lets check.
|
85 |
+
check_my_calendar();
|
86 |
// Do the query
|
87 |
$wpdb->get_results( "UPDATE ".MY_CALENDAR_TABLE." SET event_author=".$wpdb->get_var("SELECT MIN(ID) FROM ".$wpdb->prefix."users",0,0)." WHERE event_author=".$id );
|
88 |
}
|
91 |
function my_calendar_wp_head() {
|
92 |
global $wpdb;
|
93 |
// If the calendar isn't installed or upgraded this won't work
|
94 |
+
check_my_calendar();
|
95 |
$styles = stripcslashes(get_option('my_calendar_style'));
|
96 |
if ( get_option('my_calendar_use_styles') != 'true' ) {
|
97 |
echo "
|
108 |
function my_calendar_menu() {
|
109 |
global $wpdb;
|
110 |
// We make use of the My Calendar tables so we must have installed My Calendar
|
111 |
+
check_my_calendar();
|
112 |
// Set admin as the only one who can use My Calendar for security
|
113 |
$allowed_group = 'manage_options';
|
114 |
// Use the database to *potentially* override the above if allowed
|
117 |
|
118 |
// Add the admin panel pages for My Calendar. Use permissions pulled from above
|
119 |
if (function_exists('add_menu_page')) {
|
120 |
+
add_menu_page(__('My Calendar','my-calendar'), __('My Calendar','my-calendar'), $allowed_group, 'my-calendar', 'edit_my_calendar');
|
121 |
}
|
122 |
if (function_exists('add_submenu_page')) {
|
123 |
+
add_submenu_page('my-calendar', __('Add/Edit Events','my-calendar'), __('Add/Edit Events','my-calendar'), $allowed_group, 'my-calendar', 'edit_my_calendar');
|
124 |
add_action( "admin_head", 'my_calendar_write_js' );
|
125 |
add_action( "admin_head", 'my_calendar_add_styles' );
|
126 |
// Note only admin can change calendar options
|
127 |
+
add_submenu_page('my-calendar', __('Manage Categories','my-calendar'), __('Manage Categories','my-calendar'), 'manage_options', 'my-calendar-categories', 'my_calendar_manage_categories');
|
128 |
add_submenu_page('my-calendar', __('Settings','my-calendar'), __('Settings','my-calendar'), 'manage_options', 'my-calendar-config', 'edit_my_calendar_config');
|
129 |
add_submenu_page('my-calendar', __('My Calendar Help','my-calendar'), __('Help','my-calendar'), 'manage_options', 'my-calendar-help', 'my_calendar_help');
|
130 |
}
|
265 |
border: 1px solid #999;
|
266 |
background: #b11;
|
267 |
}
|
268 |
+
.import {
|
269 |
+
background: #ffa;
|
270 |
+
padding: 5px 10px;
|
271 |
+
border: 1px solid #aaa;
|
272 |
+
-moz-border-radius: 5px;
|
273 |
+
-webkit-border-radius: 5px;
|
274 |
+
border-radius: 5px;
|
275 |
+
margin: 15px 0;
|
276 |
+
}
|
277 |
.n4 {width: 16px;}
|
278 |
.n5 {width: 32px;}
|
279 |
.n6 {width: 64px;}
|
296 |
add_shortcode('my_calendar','my_calendar_insert');
|
297 |
|
298 |
// Function to check what version of My Calendar is installed and install if needed
|
299 |
+
function check_my_calendar() {
|
300 |
// Checks to make sure My Calendar is installed, if not it adds the default
|
301 |
// database tables and populates them with test data. If it is, then the
|
302 |
// version is checked through various means and if it is not up to date
|
573 |
add_option('display_upcoming_days',7);
|
574 |
add_option('my_calendar_version','1.0');
|
575 |
add_option('display_upcoming_type','false');
|
576 |
+
add_option('display_my_calendar_upcoming_events',3);
|
577 |
add_option('display_past_days',0);
|
578 |
add_option('display_past_events',2);
|
579 |
+
add_option('my_calendar_use_styles','false');
|
580 |
add_option('my_calendar_show_months',1);
|
581 |
add_option('my_calendar_show_map','true');
|
582 |
add_option('my_calendar_show_address','false');
|
584 |
add_option('my_calendar_upcoming_template',$default_template);
|
585 |
add_option('my_calendar_today_title','Today\'s Events');
|
586 |
add_option('my_calendar_upcoming_title','Upcoming Events');
|
587 |
+
add_option('calendar_javascript',0);
|
588 |
+
add_option('list_javascript',0);
|
589 |
$sql = "UPDATE " . MY_CALENDAR_TABLE . " SET event_category=1";
|
590 |
$wpdb->get_results($sql);
|
591 |
|
624 |
|
625 |
// Function to return a prefix which will allow the correct
|
626 |
// placement of arguments into the query string.
|
627 |
+
function my_calendar_permalink_prefix() {
|
628 |
// Get the permalink structure from WordPress
|
629 |
$p_link = get_permalink();
|
630 |
|
661 |
}
|
662 |
|
663 |
// Configure the "Next" link in the calendar
|
664 |
+
function my_calendar_next_link($cur_year,$cur_month) {
|
665 |
$mod_rewrite_months = array(1=>'jan','feb','mar','apr','may','jun','jul','aug','sept','oct','nov','dec');
|
666 |
$next_year = $cur_year + 1;
|
667 |
|
668 |
$num_months = get_option('my_calendar_show_months');
|
669 |
if ($num_months <= 1) {
|
670 |
if ($cur_month == 12) {
|
671 |
+
return '<a href="' . my_calendar_permalink_prefix() . 'month=jan&yr=' . $next_year . '" rel="nofollow">'.__('Next Events','my-calendar').' »</a>';
|
672 |
} else {
|
673 |
$next_month = $cur_month + 1;
|
674 |
$month = $mod_rewrite_months[$next_month];
|
675 |
+
return '<a href="' . my_calendar_permalink_prefix() . 'month='.$month.'&yr=' . $cur_year . '" rel="nofollow">'.__('Next Events','my-calendar').' »</a>';
|
676 |
}
|
677 |
} else {
|
678 |
if (($cur_month + $num_months) > 12) {
|
682 |
}
|
683 |
$month = $mod_rewrite_months[$next_month];
|
684 |
if ($cur_month >= (12-$num_months)) {
|
685 |
+
return '<a href="' . my_calendar_permalink_prefix() . 'month='.$month.'&yr=' . $next_year . '" rel="nofollow">'.__('Next Events','my-calendar').' »</a>';
|
686 |
} else {
|
687 |
+
return '<a href="' . my_calendar_permalink_prefix() . 'month='.$month.'&yr=' . $cur_year . '" rel="nofollow">'.__('Next Events','my-calendar').' »</a>';
|
688 |
}
|
689 |
}
|
690 |
}
|
691 |
|
692 |
// Configure the "Previous" link in the calendar
|
693 |
+
function my_calendar_prev_link($cur_year,$cur_month) {
|
694 |
$mod_rewrite_months = array(1=>'jan','feb','mar','apr','may','jun','jul','aug','sept','oct','nov','dec');
|
695 |
$last_year = $cur_year - 1;
|
696 |
|
697 |
$num_months = get_option('my_calendar_show_months');
|
698 |
if ($num_months <= 1) {
|
699 |
if ($cur_month == 1) {
|
700 |
+
return '<a href="' . my_calendar_permalink_prefix() . 'month=dec&yr='. $last_year .'" rel="nofollow">« '.__('Previous Events','my-calendar').'</a>';
|
701 |
} else {
|
702 |
$next_month = $cur_month - 1;
|
703 |
$month = $mod_rewrite_months[$next_month];
|
704 |
+
return '<a href="' . my_calendar_permalink_prefix() . 'month='.$month.'&yr=' . $cur_year . '" rel="nofollow">« '.__('Previous Events','my-calendar').'</a>';
|
705 |
}
|
706 |
} else {
|
707 |
if ($cur_month > $num_months) {
|
711 |
}
|
712 |
$month = $mod_rewrite_months[$next_month];
|
713 |
if ($cur_month <= $num_months) {
|
714 |
+
return '<a href="' . my_calendar_permalink_prefix() . 'month='.$month.'&yr=' . $last_year . '" rel="nofollow">« '.__('Previous Events','my-calendar').'</a>';
|
715 |
} else {
|
716 |
+
return '<a href="' . my_calendar_permalink_prefix() . 'month='.$month.'&yr=' . $cur_year . '" rel="nofollow">« '.__('Previous Events','my-calendar').'</a>';
|
717 |
}
|
718 |
}
|
719 |
}
|
720 |
|
721 |
// Used to draw multiple events
|
722 |
+
function my_calendar_draw_events($events, $type) {
|
723 |
// We need to sort arrays of objects by time
|
724 |
+
usort($events, "my_calendar_time_cmp");
|
725 |
foreach($events as $event) {
|
726 |
+
$output .= my_calendar_draw_event($event, $type);
|
727 |
}
|
728 |
return $output;
|
729 |
}
|
730 |
|
731 |
// Used to draw an event to the screen
|
732 |
+
function my_calendar_draw_event($event, $type="calendar") {
|
733 |
global $wpdb;
|
734 |
|
735 |
// My Calendar must be updated to run this function
|
736 |
+
check_my_calendar();
|
737 |
|
738 |
$display_author = get_option('display_author');
|
739 |
$display_map = get_option('my_calendar_show_map');
|
825 |
return $details;
|
826 |
}
|
827 |
// used to generate upcoming events lists
|
828 |
+
function mc_get_all_events() {
|
829 |
global $wpdb;
|
830 |
$events = $wpdb->get_results("SELECT * FROM " . MY_CALENDAR_TABLE);
|
831 |
+
$offset = get_option('gmt_offset');
|
832 |
+
$date = date('Y', time()+(60*60*$offset)).'-'.date('m', time()+(60*60*$offset)).'-'.date('d', time()+(60*60*$offset));
|
833 |
if (!empty($events)) {
|
834 |
foreach($events as $event) {
|
835 |
if ($event->event_recur != "S") {
|
841 |
switch ($event->event_recur) {
|
842 |
case "D":
|
843 |
for ($i=$numback;$i<=$numforward;$i++) {
|
844 |
+
$begin = my_calendar_add_date($orig_begin,$i,0,0);
|
845 |
+
$end = my_calendar_add_date($orig_end,$i,0,0);
|
846 |
${$i} = clone $event;
|
847 |
${$i}->event_begin = $begin;
|
848 |
${$i}->event_end = $end;
|
851 |
break;
|
852 |
case "W":
|
853 |
for ($i=$numback;$i<=$numforward;$i++) {
|
854 |
+
$begin = my_calendar_add_date($orig_begin,($i*7),0,0);
|
855 |
+
$end = my_calendar_add_date($orig_end,($i*7),0,0);
|
856 |
${$i} = clone $event;
|
857 |
${$i}->event_begin = $begin;
|
858 |
${$i}->event_end = $end;
|
861 |
break;
|
862 |
case "M":
|
863 |
for ($i=$numback;$i<=$numforward;$i++) {
|
864 |
+
$begin = my_calendar_add_date($orig_begin,0,$i,0);
|
865 |
+
$end = my_calendar_add_date($orig_end,0,$i,0);
|
866 |
${$i} = clone $event;
|
867 |
${$i}->event_begin = $begin;
|
868 |
${$i}->event_end = $end;
|
871 |
break;
|
872 |
case "Y":
|
873 |
for ($i=$numback;$i<=$numforward;$i++) {
|
874 |
+
$begin = my_calendar_add_date($orig_begin,0,0,$i);
|
875 |
+
$end = my_calendar_add_date($orig_end,0,0,$i);
|
876 |
${$i} = clone $event;
|
877 |
${$i}->event_begin = $begin;
|
878 |
${$i}->event_end = $end;
|
884 |
switch ($event->event_recur) {
|
885 |
case "D":
|
886 |
$event_begin = $event->event_begin;
|
887 |
+
$today = date('Y',time()+(60*60*$offset)).'-'.date('m',time()+(60*60*$offset)).'-'.date('d',time()+(60*60*$offset));
|
888 |
$nDays = get_option('display_past_events');
|
889 |
+
$fDays = get_option('display_my_calendar_upcoming_events');
|
890 |
+
if ( my_calendar_date_comp($event_begin, $today) ) { // compare first date against today's date
|
891 |
+
if (my_calendar_date_comp( $event_begin, my_calendar_add_date($this_date,-($nDays),0,0) )) {
|
892 |
$diff = jd_date_diff_precise(strtotime($event_begin));
|
893 |
$diff_days = $diff/(86400);
|
894 |
$days = explode(".",$diff_days);
|
896 |
$realFinish = $days[0] + $fDays;
|
897 |
|
898 |
for ($realStart;$realStart<=$realFinish;$realStart++) { // jump forward to near present.
|
899 |
+
$this_date = my_calendar_add_date($event_begin,($realStart),0,0);
|
900 |
+
if ( my_calendar_date_comp( $event->event_begin,$this_date ) ) {
|
901 |
${$realStart} = clone $event;
|
902 |
${$realStart}->event_begin = $this_date;
|
903 |
$arr_events[] = ${$realStart};
|
907 |
} else {
|
908 |
$realDays = -($nDays);
|
909 |
for ($realDays;$realDays<=$fDays;$realDays++) { // for each event within plus or minus range, mod date and add to array.
|
910 |
+
$this_date = my_calendar_add_date($event_begin,$realDays,0,0);
|
911 |
+
if ( my_calendar_date_comp( $event->event_begin,$this_date ) == true ) {
|
912 |
${$realDays} = clone $event;
|
913 |
${$realDays}->event_begin = $this_date;
|
914 |
$arr_events[] = ${$realDays};
|
922 |
|
923 |
case "W":
|
924 |
$event_begin = $event->event_begin;
|
925 |
+
$today = date('Y',time()+(60*60*$offset)).'-'.date('m',time()+(60*60*$offset)).'-'.date('d',time()+(60*60*$offset));
|
926 |
$nDays = get_option('display_past_events');
|
927 |
+
$fDays = get_option('display_my_calendar_upcoming_events');
|
928 |
|
929 |
+
if ( my_calendar_date_comp($event_begin, $today) ) { // compare first date against today's date
|
930 |
+
if (my_calendar_date_comp( $event_begin, my_calendar_add_date($this_date,-($nDays*7),0,0) )) {
|
931 |
$diff = jd_date_diff_precise(strtotime($event_begin));
|
932 |
$diff_weeks = $diff/(86400*7);
|
933 |
$weeks = explode(".",$diff_weeks);
|
935 |
$realFinish = $weeks[0] + $fDays;
|
936 |
|
937 |
for ($realStart;$realStart<=$realFinish;$realStart++) { // jump forward to near present.
|
938 |
+
$this_date = my_calendar_add_date($event_begin,($realStart*7),0,0);
|
939 |
+
if ( my_calendar_date_comp( $event->event_begin,$this_date ) ) {
|
940 |
${$realStart} = clone $event;
|
941 |
${$realStart}->event_begin = $this_date;
|
942 |
$arr_events[] = ${$realStart};
|
946 |
} else {
|
947 |
$realDays = -($nDays);
|
948 |
for ($realDays;$realDays<=$fDays;$realDays++) { // for each event within plus or minus range, mod date and add to array.
|
949 |
+
$this_date = my_calendar_add_date($event_begin,($realDays*7),0,0);
|
950 |
+
if ( my_calendar_date_comp( $event->event_begin,$this_date ) ) {
|
951 |
${$realDays} = clone $event;
|
952 |
${$realDays}->event_begin = $this_date;
|
953 |
$arr_events[] = ${$realDays};
|
961 |
|
962 |
case "M":
|
963 |
$event_begin = $event->event_begin;
|
964 |
+
$today = date('Y',time()+(60*60*$offset)).'-'.date('m',time()+(60*60*$offset)).'-'.date('d',time()+(60*60*$offset));
|
965 |
$nDays = get_option('display_past_events');
|
966 |
+
$fDays = get_option('display_my_calendar_upcoming_events');
|
967 |
|
968 |
+
if ( my_calendar_date_comp($event_begin, $today) ) { // compare first date against today's date
|
969 |
+
if (my_calendar_date_comp( $event_begin, my_calendar_add_date($this_date,-($nDays),0,0) )) {
|
970 |
$diff = jd_date_diff_precise(strtotime($event_begin));
|
971 |
$diff_days = $diff/(86400*30);
|
972 |
$days = explode(".",$diff_days);
|
974 |
$realFinish = $days[0] + $fDays;
|
975 |
|
976 |
for ($realStart;$realStart<=$realFinish;$realStart++) { // jump forward to near present.
|
977 |
+
$this_date = my_calendar_add_date($event_begin,0,$realStart,0);
|
978 |
+
if ( my_calendar_date_comp( $event->event_begin,$this_date ) ) {
|
979 |
${$realStart} = clone $event;
|
980 |
${$realStart}->event_begin = $this_date;
|
981 |
$arr_events[] = ${$realStart};
|
985 |
} else {
|
986 |
$realDays = -($nDays);
|
987 |
for ($realDays;$realDays<=$fDays;$realDays++) { // for each event within plus or minus range, mod date and add to array.
|
988 |
+
$this_date = my_calendar_add_date($event_begin,0,$realDays,0);
|
989 |
+
if ( my_calendar_date_comp( $event->event_begin,$this_date ) == true ) {
|
990 |
${$realDays} = clone $event;
|
991 |
${$realDays}->event_begin = $this_date;
|
992 |
$arr_events[] = ${$realDays};
|
1000 |
|
1001 |
case "Y":
|
1002 |
$event_begin = $event->event_begin;
|
1003 |
+
$today = date('Y',time()+(60*60*$offset)).'-'.date('m',time()+(60*60*$offset)).'-'.date('d',time()+(60*60*$offset));
|
1004 |
$nDays = get_option('display_past_events');
|
1005 |
+
$fDays = get_option('display_my_calendar_upcoming_events');
|
1006 |
|
1007 |
+
if ( my_calendar_date_comp($event_begin, $today) ) { // compare first date against today's date
|
1008 |
+
if (my_calendar_date_comp( $event_begin, my_calendar_add_date($this_date,-($nDays),0,0) )) {
|
1009 |
$diff = jd_date_diff_precise(strtotime($event_begin));
|
1010 |
$diff_days = $diff/(86400*365);
|
1011 |
$days = explode(".",$diff_days);
|
1013 |
$realFinish = $days[0] + $fDays;
|
1014 |
|
1015 |
for ($realStart;$realStart<=$realFinish;$realStart++) { // jump forward to near present.
|
1016 |
+
$this_date = my_calendar_add_date($event_begin,0,0,$realStart);
|
1017 |
+
if ( my_calendar_date_comp( $event->event_begin,$this_date ) ) {
|
1018 |
${$realStart} = clone $event;
|
1019 |
${$realStart}->event_begin = $this_date;
|
1020 |
$arr_events[] = ${$realStart};
|
1024 |
} else {
|
1025 |
$realDays = -($nDays);
|
1026 |
for ($realDays;$realDays<=$fDays;$realDays++) { // for each event within plus or minus range, mod date and add to array.
|
1027 |
+
$this_date = my_calendar_add_date($event_begin,0,0,$realDays);
|
1028 |
+
if ( my_calendar_date_comp( $event->event_begin,$this_date ) == true ) {
|
1029 |
${$realDays} = clone $event;
|
1030 |
${$realDays}->event_begin = $this_date;
|
1031 |
$arr_events[] = ${$realDays};
|
1046 |
return $arr_events;
|
1047 |
}
|
1048 |
// Grab all events for the requested date from calendar
|
1049 |
+
function my_calendar_grab_events($y,$m,$d,$category=null) {
|
1050 |
global $wpdb;
|
1051 |
|
1052 |
if ( $category!=null ) {
|
1258 |
return $arr_events;
|
1259 |
}
|
1260 |
|
1261 |
+
function mc_month_comparison($month) {
|
1262 |
+
$offset = get_option('gmt_offset');
|
1263 |
+
$current_month = strtolower(date("M", time()+(60*60*$offset)));
|
1264 |
if (isset($_GET['yr']) && isset($_GET['month'])) {
|
1265 |
if ($month == $_GET['month']) {
|
1266 |
return ' selected="selected"';
|
1269 |
return ' selected="selected"';
|
1270 |
}
|
1271 |
}
|
1272 |
+
|
1273 |
+
function mc_year_comparison($year) {
|
1274 |
+
$offset = get_option('gmt_offset');
|
1275 |
+
$current_year = strtolower(date("Y", time()+(60*60*$offset)));
|
1276 |
if (isset($_GET['yr']) && isset($_GET['month'])) {
|
1277 |
if ($year == $_GET['yr']) {
|
1278 |
return ' selected="selected"';
|
1281 |
return ' selected="selected"';
|
1282 |
}
|
1283 |
}
|
1284 |
+
function mc_build_date_switcher() {
|
1285 |
$my_calendar_body = "";
|
1286 |
$my_calendar_body .= '<div class="my-calendar-date-switcher">
|
1287 |
<form method="get" action=""><div>';
|
1295 |
// We build the months in the switcher
|
1296 |
$my_calendar_body .= '
|
1297 |
<label for="my-calendar-month">'.__('Month','my-calendar').':</label> <select id="my-calendar-month" name="month" style="width:100px;">
|
1298 |
+
<option value="jan"'.mc_month_comparison('jan').'>'.__('January','my-calendar').'</option>
|
1299 |
+
<option value="feb"'.mc_month_comparison('feb').'>'.__('February','my-calendar').'</option>
|
1300 |
+
<option value="mar"'.mc_month_comparison('mar').'>'.__('March','my-calendar').'</option>
|
1301 |
+
<option value="apr"'.mc_month_comparison('apr').'>'.__('April','my-calendar').'</option>
|
1302 |
+
<option value="may"'.mc_month_comparison('may').'>'.__('May','my-calendar').'</option>
|
1303 |
+
<option value="jun"'.mc_month_comparison('jun').'>'.__('June','my-calendar').'</option>
|
1304 |
+
<option value="jul"'.mc_month_comparison('jul').'>'.__('July','my-calendar').'</option>
|
1305 |
+
<option value="aug"'.mc_month_comparison('aug').'>'.__('August','my-calendar').'</option>
|
1306 |
+
<option value="sept"'.mc_month_comparison('sept').'>'.__('September','my-calendar').'</option>
|
1307 |
+
<option value="oct"'.mc_month_comparison('oct').'>'.__('October','my-calendar').'</option>
|
1308 |
+
<option value="nov"'.mc_month_comparison('nov').'>'.__('November','my-calendar').'</option>
|
1309 |
+
<option value="dec"'.mc_month_comparison('dec').'>'.__('December','my-calendar').'</option>
|
1310 |
</select>
|
1311 |
<label for="my-calendar-year">'.__('Year','my-calendar').':</label> <select id="my-calendar-year" name="yr">
|
1312 |
';
|
1313 |
// The year builder is string mania. If you can make sense of this, you know your PHP!
|
1314 |
+
$past = 5;
|
1315 |
+
$future = 5;
|
1316 |
$fut = 1;
|
1317 |
+
$offset = get_option('gmt_offset');
|
1318 |
+
|
1319 |
while ($past > 0) {
|
1320 |
$p .= ' <option value="';
|
1321 |
+
$p .= date("Y",time()+(60*60*$offset))-$past;
|
1322 |
+
$p .= '"'.mc_year_comparison(date("Y",time()+(60*60*$offset))-$past).'>';
|
1323 |
+
$p .= date("Y",time()+(60*60*$offset))-$past."</option>\n";
|
1324 |
$past = $past - 1;
|
1325 |
}
|
1326 |
while ($fut < $future) {
|
1327 |
$f .= ' <option value="';
|
1328 |
+
$f .= date("Y",time()+(60*60*$offset))+$fut;
|
1329 |
+
$f .= '"'.mc_year_comparison(date("Y",time()+(60*60*$offset))+$fut).'>';
|
1330 |
+
$f .= date("Y",time()+(60*60*$offset))+$fut."</option>\n";
|
1331 |
$fut = $fut + 1;
|
1332 |
}
|
1333 |
$my_calendar_body .= $p;
|
1334 |
+
$my_calendar_body .= '<option value="'.date("Y",time()+(60*60*$offset)).'"'.mc_year_comparison(date("Y",time()+(60*60*$offset))).'>'.date("Y",time()+(60*60*$offset))."</option>\n";
|
1335 |
$my_calendar_body .= $f;
|
1336 |
$my_calendar_body .= '</select> <input type="submit" value="'.__('Go','my-calendar').'" /></div>
|
1337 |
</form></div>';
|
1347 |
$category=null;
|
1348 |
}
|
1349 |
// First things first, make sure calendar is up to date
|
1350 |
+
check_my_calendar();
|
1351 |
|
1352 |
// Deal with the week not starting on a monday
|
1353 |
if (get_option('start_of_week') == 0) {
|
1359 |
|
1360 |
// Carry on with the script
|
1361 |
$name_months = array(1=>__('January','my-calendar'),__('February','my-calendar'),__('March','my-calendar'),__('April','my-calendar'),__('May','my-calendar'),__('June','my-calendar'),__('July','my-calendar'),__('August','my-calendar'),__('September','my-calendar'),__('October','my-calendar'),__('November','my-calendar'),__('December','my-calendar'));
|
1362 |
+
$offset = get_option('gmt_offset');
|
1363 |
|
1364 |
// If we don't pass arguments we want a calendar that is relevant to today
|
1365 |
if (empty($_GET['month']) || empty($_GET['yr'])) {
|
1366 |
+
$c_year = date("Y",time()+(60*60*$offset));
|
1367 |
+
$c_month = date("m",time()+(60*60*$offset));
|
1368 |
+
$c_day = date("d",time()+(60*60*$offset));
|
1369 |
}
|
1370 |
|
1371 |
// Years get funny if we exceed 3000, so we use this check
|
1375 |
if ($_GET['month'] == 'jan' || $_GET['month'] == 'feb' || $_GET['month'] == 'mar' || $_GET['month'] == 'apr' || $_GET['month'] == 'may' || $_GET['month'] == 'jun' || $_GET['month'] == 'jul' || $_GET['month'] == 'aug' || $_GET['month'] == 'sept' || $_GET['month'] == 'oct' || $_GET['month'] == 'nov' || $_GET['month'] == 'dec') {
|
1376 |
// Again nasty code to map permalinks into something
|
1377 |
// databases can understand. This will be cleaned up
|
1378 |
+
$c_year = mysql_real_escape_string($_GET['yr']);
|
1379 |
if ($_GET['month'] == 'jan') { $t_month = 1; }
|
1380 |
else if ($_GET['month'] == 'feb') { $t_month = 2; }
|
1381 |
else if ($_GET['month'] == 'mar') { $t_month = 3; }
|
1389 |
else if ($_GET['month'] == 'nov') { $t_month = 11; }
|
1390 |
else if ($_GET['month'] == 'dec') { $t_month = 12; }
|
1391 |
$c_month = $t_month;
|
1392 |
+
$c_day = date("d",time()+(60*60*$offset));
|
1393 |
} else {
|
1394 |
// No valid month causes the calendar to default to today
|
1395 |
+
$c_year = date("Y",time()+(60*60*$offset));
|
1396 |
+
$c_month = date("m",time()+(60*60*$offset));
|
1397 |
+
$c_day = date("d",time()+(60*60*$offset));
|
1398 |
}
|
1399 |
} else {
|
1400 |
// No valid year causes the calendar to default to today
|
1401 |
+
$c_year = date("Y",time()+(60*60*$offset));
|
1402 |
+
$c_month = date("m",time()+(60*60*$offset));
|
1403 |
+
$c_day = date("d",time()+(60*60*$offset));
|
1404 |
}
|
1405 |
|
1406 |
// Fix the days of the week if week start is not on a monday
|
1428 |
$date_switcher = get_option('display_jump');
|
1429 |
|
1430 |
if ($date_switcher == 'true') {
|
1431 |
+
$my_calendar_body .= mc_build_date_switcher();
|
1432 |
}
|
1433 |
|
1434 |
// The header of the calendar table and the links. Note calls to link functions
|
1435 |
$my_calendar_body .= '
|
1436 |
<div class="my-calendar-nav">
|
1437 |
<ul>
|
1438 |
+
<li class="my-calendar-prev">' . my_calendar_prev_link($c_year,$c_month) . '</li>
|
1439 |
+
<li class="my-calendar-next">' . my_calendar_next_link($c_year,$c_month) . '</li>
|
1440 |
</ul>
|
1441 |
</div>
|
1442 |
</div>';
|
1457 |
$date_switcher = get_option('display_jump');
|
1458 |
|
1459 |
if ($date_switcher == 'true') {
|
1460 |
+
$my_calendar_body .= mc_build_date_switcher();
|
1461 |
}
|
1462 |
|
1463 |
// The header of the calendar table and the links. Note calls to link functions
|
1464 |
$my_calendar_body .= '
|
1465 |
<div class="my-calendar-nav">
|
1466 |
<ul>
|
1467 |
+
<li class="my-calendar-prev">' . my_calendar_prev_link($c_year,$c_month) . '</li>
|
1468 |
+
<li class="my-calendar-next">' . my_calendar_next_link($c_year,$c_month) . '</li>
|
1469 |
</ul>
|
1470 |
</div>
|
1471 |
</div>';
|
1498 |
// Colors again, this time for the day numbers
|
1499 |
if (get_option('start_of_week') == 0) {
|
1500 |
// This bit of code is for styles believe it or not.
|
1501 |
+
$grabbed_events = my_calendar_grab_events($c_year,$c_month,$i,$category);
|
1502 |
$no_events_class = '';
|
1503 |
if (!count($grabbed_events)) {
|
1504 |
$no_events_class = ' no-events';
|
1505 |
}
|
1506 |
+
$my_calendar_body .= '<td class="'.(date("Ymd", mktime (0,0,0,$c_month,$i,$c_year))==date("Ymd",time()+(60*60*$offset))?'current-day':'day-with-date').$no_events_class.'">'."\n ".'<span'.($ii<7&&$ii>1?'':' class="weekend"').'>'.$i++.'</span>'."\n ". my_calendar_draw_events($grabbed_events, $format) . "\n</td>\n";
|
1507 |
} else {
|
1508 |
+
$grabbed_events = my_calendar_grab_events($c_year,$c_month,$i,$category);
|
1509 |
$no_events_class = '';
|
1510 |
if (!count($grabbed_events))
|
1511 |
{
|
1512 |
$no_events_class = ' no-events';
|
1513 |
}
|
1514 |
+
$my_calendar_body .= '<td class="'.(date("Ymd", mktime (0,0,0,$c_month,$i,$c_year))==date("Ymd",time()+(60*60*$offset))?'current-day':'day-with-date').$no_events_class.'">'."\n ".'<span'.($ii<6?'':' class="weekend"').'>'.$i++.'</span>'."\n ". my_calendar_draw_events($grabbed_events, $format) . "\n</td>\n";
|
1515 |
}
|
1516 |
} else {
|
1517 |
$my_calendar_body .= "<td class='day-without-date'> </td>\n";
|
1537 |
}
|
1538 |
$c_month = (int) $c_month + $add_month;
|
1539 |
for ($i=1; $i<=$days_in_month; $i++) {
|
1540 |
+
$grabbed_events = my_calendar_grab_events($c_year,$c_month,$i,$category);
|
1541 |
if (count($grabbed_events)) {
|
1542 |
if ( get_option('list_javascript') != 1) {
|
1543 |
$is_anchor = "<a href='#'>";
|
1545 |
} else {
|
1546 |
$is_anchor = $is_close_anchor = "";
|
1547 |
}
|
1548 |
+
$my_calendar_body .= "<li$class><strong class=\"event-date\">$is_anchor".date($date_format,mktime(0,0,0,$c_month,$i,$c_year))."$is_close_anchor</strong>".my_calendar_draw_events($grabbed_events, $format)."</li>";
|
1549 |
$num_events++;
|
1550 |
}
|
1551 |
+
if (my_calendar_is_odd($num_events)) {
|
1552 |
$class = " class='odd'";
|
1553 |
} else {
|
1554 |
$class = "";
|
1581 |
return $my_calendar_body;
|
1582 |
}
|
1583 |
|
1584 |
+
function my_calendar_is_odd( $int ) {
|
1585 |
return( $int & 1 );
|
1586 |
}
|
1587 |
|
my-calendar.pot
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
# Translation of the WordPress plugin My Calendar 1.0.
|
2 |
# Copyright (C) 2010 Joseph C Dolson
|
3 |
# This file is distributed under the same license as the My Calendar package.
|
4 |
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
@@ -6,9 +6,9 @@
|
|
6 |
#, fuzzy
|
7 |
msgid ""
|
8 |
msgstr ""
|
9 |
-
"Project-Id-Version: My Calendar 1.0.
|
10 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/my-calendar\n"
|
11 |
-
"POT-Creation-Date: 2010-04-
|
12 |
"PO-Revision-Date: 2010-MO-DA HO:MI+ZONE\n"
|
13 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
@@ -67,7 +67,7 @@ msgstr ""
|
|
67 |
msgid "Manage Categories"
|
68 |
msgstr ""
|
69 |
|
70 |
-
#: my-calendar-categories.php:138 my-calendar-event-manager.php:
|
71 |
msgid "ID"
|
72 |
msgstr ""
|
73 |
|
@@ -76,17 +76,17 @@ msgid "Category Color"
|
|
76 |
msgstr ""
|
77 |
|
78 |
#: my-calendar-categories.php:142 my-calendar-categories.php:156
|
79 |
-
#: my-calendar-event-manager.php:
|
80 |
msgid "Edit"
|
81 |
msgstr ""
|
82 |
|
83 |
#: my-calendar-categories.php:143 my-calendar-categories.php:162
|
84 |
-
#: my-calendar-event-manager.php:
|
85 |
msgid "Delete"
|
86 |
msgstr ""
|
87 |
|
88 |
-
#: my-calendar-categories.php:159 my-calendar-event-manager.php:
|
89 |
-
#: my-calendar.php:
|
90 |
msgid "N/A"
|
91 |
msgstr ""
|
92 |
|
@@ -98,301 +98,316 @@ msgstr ""
|
|
98 |
msgid "There are no categories in the database - something has gone wrong!"
|
99 |
msgstr ""
|
100 |
|
101 |
-
#: my-calendar-event-manager.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
msgid "Delete Event"
|
103 |
msgstr ""
|
104 |
|
105 |
-
#: my-calendar-event-manager.php:
|
106 |
msgid "Are you sure you want to delete this event?"
|
107 |
msgstr ""
|
108 |
|
109 |
-
#: my-calendar-event-manager.php:
|
110 |
-
#: my-calendar-event-manager.php:
|
111 |
-
#: my-calendar-event-manager.php:
|
112 |
-
#: my-calendar-event-manager.php:
|
113 |
-
#: my-calendar-event-manager.php:
|
114 |
-
#: my-calendar-event-manager.php:
|
115 |
-
#: my-calendar-event-manager.php:
|
116 |
-
#: my-calendar-event-manager.php:
|
117 |
-
#: my-calendar-event-manager.php:
|
118 |
msgid "Error"
|
119 |
msgstr ""
|
120 |
|
121 |
-
#: my-calendar-event-manager.php:
|
122 |
msgid ""
|
123 |
"Your event end date must be either after or the same as your event begin date"
|
124 |
msgstr ""
|
125 |
|
126 |
-
#: my-calendar-event-manager.php:
|
127 |
msgid ""
|
128 |
"Your date formatting is correct but one or more of your dates is invalid. "
|
129 |
"Check for number of days in month and leap year related errors."
|
130 |
msgstr ""
|
131 |
|
132 |
-
#: my-calendar-event-manager.php:
|
133 |
msgid ""
|
134 |
"Both start and end dates must be entered and be in the format YYYY-MM-DD"
|
135 |
msgstr ""
|
136 |
|
137 |
-
#: my-calendar-event-manager.php:
|
138 |
msgid "The time field must either be blank or be entered in the format hh:mm"
|
139 |
msgstr ""
|
140 |
|
141 |
-
#: my-calendar-event-manager.php:
|
142 |
msgid ""
|
143 |
"The URL entered must either be prefixed with http:// or be completely blank"
|
144 |
msgstr ""
|
145 |
|
146 |
-
#: my-calendar-event-manager.php:
|
147 |
msgid ""
|
148 |
"The event title must be between 1 and 60 characters in length. Some "
|
149 |
"punctuation characters may not be allowed."
|
150 |
msgstr ""
|
151 |
|
152 |
-
#: my-calendar-event-manager.php:
|
153 |
msgid ""
|
154 |
"The repetition value must be 0 unless a type of recurrance is selected in "
|
155 |
"which case the repetition value must be 0 or higher"
|
156 |
msgstr ""
|
157 |
|
158 |
-
#: my-calendar-event-manager.php:
|
159 |
msgid ""
|
160 |
"An event with the details you submitted could not be found in the database. "
|
161 |
"This may indicate a problem with your database or the way in which it is "
|
162 |
"configured."
|
163 |
msgstr ""
|
164 |
|
165 |
-
#: my-calendar-event-manager.php:
|
166 |
msgid "Event added. It will now show in your calendar."
|
167 |
msgstr ""
|
168 |
|
169 |
-
#: my-calendar-event-manager.php:
|
170 |
msgid "Failure"
|
171 |
msgstr ""
|
172 |
|
173 |
-
#: my-calendar-event-manager.php:
|
174 |
msgid "You can't update an event if you haven't submitted an event id"
|
175 |
msgstr ""
|
176 |
|
177 |
-
#: my-calendar-event-manager.php:
|
178 |
msgid ""
|
179 |
"The database failed to return data to indicate the event has been updated "
|
180 |
"sucessfully. This may indicate a problem with your database or the way in "
|
181 |
"which it is configured."
|
182 |
msgstr ""
|
183 |
|
184 |
-
#: my-calendar-event-manager.php:
|
185 |
msgid "Event updated successfully"
|
186 |
msgstr ""
|
187 |
|
188 |
-
#: my-calendar-event-manager.php:
|
189 |
msgid "You can't delete an event if you haven't submitted an event id"
|
190 |
msgstr ""
|
191 |
|
192 |
-
#: my-calendar-event-manager.php:
|
193 |
msgid "Event deleted successfully"
|
194 |
msgstr ""
|
195 |
|
196 |
-
#: my-calendar-event-manager.php:
|
197 |
msgid ""
|
198 |
"Despite issuing a request to delete, the event still remains in the "
|
199 |
"database. Please investigate."
|
200 |
msgstr ""
|
201 |
|
202 |
-
#: my-calendar-event-manager.php:
|
203 |
msgid "Edit Event"
|
204 |
msgstr ""
|
205 |
|
206 |
-
#: my-calendar-event-manager.php:
|
207 |
msgid "You must provide an event id in order to edit it"
|
208 |
msgstr ""
|
209 |
|
210 |
-
#: my-calendar-event-manager.php:
|
211 |
msgid "Add Event"
|
212 |
msgstr ""
|
213 |
|
214 |
-
#: my-calendar-event-manager.php:
|
215 |
msgid "Manage Events"
|
216 |
msgstr ""
|
217 |
|
218 |
-
#: my-calendar-event-manager.php:
|
219 |
msgid "Sorry! That's an invalid event key."
|
220 |
msgstr ""
|
221 |
|
222 |
-
#: my-calendar-event-manager.php:
|
223 |
msgid "Sorry! We couldn't find an event with that ID."
|
224 |
msgstr ""
|
225 |
|
226 |
-
#: my-calendar-event-manager.php:
|
227 |
msgid "Add an Event"
|
228 |
msgstr ""
|
229 |
|
230 |
-
#: my-calendar-event-manager.php:
|
231 |
msgid "Enter your Event Information"
|
232 |
msgstr ""
|
233 |
|
234 |
-
#: my-calendar-event-manager.php:
|
235 |
msgid "Event Title"
|
236 |
msgstr ""
|
237 |
|
238 |
-
#: my-calendar-event-manager.php:
|
239 |
msgid ""
|
240 |
"Event Description (<abbr title=\"hypertext markup language\">HTML</abbr> "
|
241 |
"allowed)"
|
242 |
msgstr ""
|
243 |
|
244 |
-
#: my-calendar-event-manager.php:
|
245 |
msgid "Event Category"
|
246 |
msgstr ""
|
247 |
|
248 |
-
#: my-calendar-event-manager.php:
|
249 |
msgid "Event Link (Optional)"
|
250 |
msgstr ""
|
251 |
|
252 |
-
#: my-calendar-event-manager.php:
|
253 |
msgid "Start Date (YYYY-MM-DD)"
|
254 |
msgstr ""
|
255 |
|
256 |
-
#: my-calendar-event-manager.php:
|
257 |
msgid "End Date (YYYY-MM-DD) (Optional)"
|
258 |
msgstr ""
|
259 |
|
260 |
-
#: my-calendar-event-manager.php:
|
261 |
msgid "Time (hh:mm)"
|
262 |
msgstr ""
|
263 |
|
264 |
-
#: my-calendar-event-manager.php:
|
265 |
msgid ""
|
266 |
"Optional, set blank if your event is an all-day event or does not happen at "
|
267 |
"a specific time."
|
268 |
msgstr ""
|
269 |
|
270 |
-
#: my-calendar-event-manager.php:
|
271 |
msgid "Current time difference from GMT is "
|
272 |
msgstr ""
|
273 |
|
274 |
-
#: my-calendar-event-manager.php:
|
275 |
msgid " hour(s)"
|
276 |
msgstr ""
|
277 |
|
278 |
-
#: my-calendar-event-manager.php:
|
279 |
msgid "Recurring Events"
|
280 |
msgstr ""
|
281 |
|
282 |
-
#: my-calendar-event-manager.php:
|
283 |
msgid "Repeats for"
|
284 |
msgstr ""
|
285 |
|
286 |
-
#: my-calendar-event-manager.php:
|
287 |
msgid "Units"
|
288 |
msgstr ""
|
289 |
|
290 |
-
#: my-calendar-event-manager.php:
|
291 |
msgid ""
|
292 |
"Entering 0 means forever, if a unit is selected. If the recurrance unit is "
|
293 |
"left at \"Does not recur,\" the event will not reoccur."
|
294 |
msgstr ""
|
295 |
|
296 |
-
#: my-calendar-event-manager.php:
|
297 |
msgid ""
|
298 |
"All location fields are optional: <em>insufficient information may result in "
|
299 |
"an inaccurate map</em>."
|
300 |
msgstr ""
|
301 |
|
302 |
-
#: my-calendar-event-manager.php:
|
303 |
msgid "Name of Location (e.g. <em>Joe's Bar and Grill</em>)"
|
304 |
msgstr ""
|
305 |
|
306 |
-
#: my-calendar-event-manager.php:
|
307 |
msgid "Street Address"
|
308 |
msgstr ""
|
309 |
|
310 |
-
#: my-calendar-event-manager.php:
|
311 |
msgid "Street Address (2)"
|
312 |
msgstr ""
|
313 |
|
314 |
-
#: my-calendar-event-manager.php:
|
315 |
msgid "City"
|
316 |
msgstr ""
|
317 |
|
318 |
-
#: my-calendar-event-manager.php:
|
319 |
msgid "State/Province"
|
320 |
msgstr ""
|
321 |
|
322 |
-
#: my-calendar-event-manager.php:
|
323 |
msgid "Postal Code"
|
324 |
msgstr ""
|
325 |
|
326 |
-
#: my-calendar-event-manager.php:
|
327 |
msgid "Country"
|
328 |
msgstr ""
|
329 |
|
330 |
-
#: my-calendar-event-manager.php:
|
331 |
msgid "Save Event"
|
332 |
msgstr ""
|
333 |
|
334 |
-
#: my-calendar-event-manager.php:
|
335 |
#: my-calendar-widgets.php:108
|
336 |
msgid "Title"
|
337 |
msgstr ""
|
338 |
|
339 |
-
#: my-calendar-event-manager.php:
|
340 |
msgid "Description"
|
341 |
msgstr ""
|
342 |
|
343 |
-
#: my-calendar-event-manager.php:
|
344 |
msgid "Start Date"
|
345 |
msgstr ""
|
346 |
|
347 |
-
#: my-calendar-event-manager.php:
|
348 |
msgid "Recurs"
|
349 |
msgstr ""
|
350 |
|
351 |
-
#: my-calendar-event-manager.php:
|
352 |
msgid "Repeats"
|
353 |
msgstr ""
|
354 |
|
355 |
-
#: my-calendar-event-manager.php:
|
356 |
msgid "Author"
|
357 |
msgstr ""
|
358 |
|
359 |
-
#: my-calendar-event-manager.php:
|
360 |
msgid "Category"
|
361 |
msgstr ""
|
362 |
|
363 |
-
#: my-calendar-event-manager.php:
|
364 |
msgid "Edit / Delete"
|
365 |
msgstr ""
|
366 |
|
367 |
-
#: my-calendar-event-manager.php:
|
368 |
msgid "Never"
|
369 |
msgstr ""
|
370 |
|
371 |
-
#: my-calendar-event-manager.php:
|
372 |
msgid "Daily"
|
373 |
msgstr ""
|
374 |
|
375 |
-
#: my-calendar-event-manager.php:
|
376 |
msgid "Weekly"
|
377 |
msgstr ""
|
378 |
|
379 |
-
#: my-calendar-event-manager.php:
|
380 |
msgid "Monthly"
|
381 |
msgstr ""
|
382 |
|
383 |
-
#: my-calendar-event-manager.php:
|
384 |
msgid "Yearly"
|
385 |
msgstr ""
|
386 |
|
387 |
-
#: my-calendar-event-manager.php:
|
388 |
msgid "Forever"
|
389 |
msgstr ""
|
390 |
|
391 |
-
#: my-calendar-event-manager.php:
|
392 |
msgid "Times"
|
393 |
msgstr ""
|
394 |
|
395 |
-
#: my-calendar-event-manager.php:
|
396 |
msgid "There are no events in the database!"
|
397 |
msgstr ""
|
398 |
|
@@ -476,167 +491,187 @@ msgid "Displays the date on which the event begins."
|
|
476 |
msgstr ""
|
477 |
|
478 |
#: my-calendar-help.php:60
|
479 |
-
msgid "Displays the
|
480 |
msgstr ""
|
481 |
|
482 |
#: my-calendar-help.php:63
|
483 |
-
msgid "Displays the
|
484 |
msgstr ""
|
485 |
|
486 |
#: my-calendar-help.php:66
|
487 |
-
msgid "Displays the
|
488 |
msgstr ""
|
489 |
|
490 |
#: my-calendar-help.php:69
|
|
|
|
|
|
|
|
|
491 |
msgid ""
|
492 |
"Displays title of the event as a link if a URL is present, or the title "
|
493 |
"alone if no URL is available."
|
494 |
msgstr ""
|
495 |
|
496 |
-
#: my-calendar-help.php:
|
497 |
msgid "Displays the name of the location of the event."
|
498 |
msgstr ""
|
499 |
|
500 |
-
#: my-calendar-help.php:
|
501 |
msgid "Displays the first line of the site address."
|
502 |
msgstr ""
|
503 |
|
504 |
-
#: my-calendar-help.php:
|
505 |
msgid "Displays the second line of the site address."
|
506 |
msgstr ""
|
507 |
|
508 |
-
#: my-calendar-help.php:
|
509 |
msgid "Displays the city for the event."
|
510 |
msgstr ""
|
511 |
|
512 |
-
#: my-calendar-help.php:
|
513 |
msgid "Displays the state for the event."
|
514 |
msgstr ""
|
515 |
|
516 |
-
#: my-calendar-help.php:
|
517 |
msgid "Displays the postcode for the event."
|
518 |
msgstr ""
|
519 |
|
520 |
-
#: my-calendar-help.php:
|
521 |
msgid "Displays the country for the event location."
|
522 |
msgstr ""
|
523 |
|
524 |
-
#: my-calendar-help.php:
|
525 |
msgid ""
|
526 |
"Displays the event address in <a href=\"http://microformats.org/wiki/hcard"
|
527 |
"\">hcard</a> format."
|
528 |
msgstr ""
|
529 |
|
530 |
-
#: my-calendar-help.php:
|
531 |
msgid ""
|
532 |
"Displays a link to a Google Map of the event, if sufficient address "
|
533 |
"information is available. If not, will be empty."
|
534 |
msgstr ""
|
535 |
|
536 |
-
#: my-calendar-settings.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
537 |
msgid "Settings saved"
|
538 |
msgstr ""
|
539 |
|
540 |
-
#: my-calendar-settings.php:
|
541 |
msgid "My Calendar Options"
|
542 |
msgstr ""
|
543 |
|
544 |
-
#: my-calendar-settings.php:
|
545 |
msgid "Calendar Settings"
|
546 |
msgstr ""
|
547 |
|
548 |
-
#: my-calendar-settings.php:
|
549 |
msgid "Primary Calendar Options"
|
550 |
msgstr ""
|
551 |
|
552 |
-
#: my-calendar-settings.php:
|
553 |
msgid "Choose the lowest user group that may manage events"
|
554 |
msgstr ""
|
555 |
|
556 |
-
#: my-calendar-settings.php:
|
557 |
msgid "Subscriber"
|
558 |
msgstr ""
|
559 |
|
560 |
-
#: my-calendar-settings.php:
|
561 |
msgid "Contributor"
|
562 |
msgstr ""
|
563 |
|
564 |
-
#: my-calendar-settings.php:
|
565 |
msgid "Editor"
|
566 |
msgstr ""
|
567 |
|
568 |
-
#: my-calendar-settings.php:
|
569 |
msgid "Administrator"
|
570 |
msgstr ""
|
571 |
|
572 |
-
#: my-calendar-settings.php:
|
573 |
msgid "Do you want to display the author name on events?"
|
574 |
msgstr ""
|
575 |
|
576 |
-
#: my-calendar-settings.php:
|
577 |
msgid "Yes"
|
578 |
msgstr ""
|
579 |
|
580 |
-
#: my-calendar-settings.php:
|
581 |
msgid "No"
|
582 |
msgstr ""
|
583 |
|
584 |
-
#: my-calendar-settings.php:
|
585 |
msgid "Display a jumpbox for changing month and year quickly?"
|
586 |
msgstr ""
|
587 |
|
588 |
-
#: my-calendar-settings.php:
|
589 |
msgid "In list mode, show how many months of events at a time:"
|
590 |
msgstr ""
|
591 |
|
592 |
-
#: my-calendar-settings.php:
|
593 |
msgid "Date format in list mode"
|
594 |
msgstr ""
|
595 |
|
596 |
-
#: my-calendar-settings.php:
|
597 |
msgid ""
|
598 |
"Date format uses the same syntax as the <a href=\"http://php.net/date\">PHP "
|
599 |
"<code>date()</code> function</a>. Save option to update sample output."
|
600 |
msgstr ""
|
601 |
|
602 |
-
#: my-calendar-settings.php:
|
603 |
msgid ""
|
604 |
"Show Link to Google Map (when sufficient address information is available.)"
|
605 |
msgstr ""
|
606 |
|
607 |
-
#: my-calendar-settings.php:
|
608 |
msgid "Show Event Address in Details"
|
609 |
msgstr ""
|
610 |
|
611 |
-
#: my-calendar-settings.php:
|
612 |
msgid "Calendar Styles"
|
613 |
msgstr ""
|
614 |
|
615 |
-
#: my-calendar-settings.php:
|
616 |
msgid "Reset the My Calendar style to default"
|
617 |
msgstr ""
|
618 |
|
619 |
-
#: my-calendar-settings.php:
|
620 |
msgid "Disable My Calendar Stylesheet"
|
621 |
msgstr ""
|
622 |
|
623 |
-
#: my-calendar-settings.php:
|
624 |
msgid "Edit the stylesheet for My Calendar"
|
625 |
msgstr ""
|
626 |
|
627 |
-
#: my-calendar-settings.php:
|
628 |
msgid "Calendar Behaviors"
|
629 |
msgstr ""
|
630 |
|
631 |
-
#: my-calendar-settings.php:
|
632 |
msgid "Disable List Javascript Effects"
|
633 |
msgstr ""
|
634 |
|
635 |
-
#: my-calendar-settings.php:
|
636 |
msgid "Disable Calendar Javascript Effects"
|
637 |
msgstr ""
|
638 |
|
639 |
-
#: my-calendar-settings.php:
|
640 |
msgid "Save"
|
641 |
msgstr ""
|
642 |
|
@@ -698,7 +733,7 @@ msgstr ""
|
|
698 |
msgid "Make a Donation"
|
699 |
msgstr ""
|
700 |
|
701 |
-
#. #-#-#-#-# plugin.pot (My Calendar 1.0.
|
702 |
#. Plugin Name of the plugin/theme
|
703 |
#: my-calendar.php:120
|
704 |
msgid "My Calendar"
|
@@ -716,129 +751,129 @@ msgstr ""
|
|
716 |
msgid "Help"
|
717 |
msgstr ""
|
718 |
|
719 |
-
#: my-calendar.php:
|
720 |
-
#: my-calendar.php:
|
721 |
msgid "Next Events"
|
722 |
msgstr ""
|
723 |
|
724 |
-
#: my-calendar.php:
|
725 |
-
#: my-calendar.php:
|
726 |
msgid "Previous Events"
|
727 |
msgstr ""
|
728 |
|
729 |
-
#: my-calendar.php:
|
730 |
msgid "Event Details"
|
731 |
msgstr ""
|
732 |
|
733 |
-
#: my-calendar.php:
|
734 |
msgid "Not Applicable"
|
735 |
msgstr ""
|
736 |
|
737 |
-
#: my-calendar.php:
|
738 |
msgid "Posted by"
|
739 |
msgstr ""
|
740 |
|
741 |
-
#: my-calendar.php:
|
742 |
msgid "Month"
|
743 |
msgstr ""
|
744 |
|
745 |
-
#: my-calendar.php:
|
746 |
msgid "January"
|
747 |
msgstr ""
|
748 |
|
749 |
-
#: my-calendar.php:
|
750 |
msgid "February"
|
751 |
msgstr ""
|
752 |
|
753 |
-
#: my-calendar.php:
|
754 |
msgid "March"
|
755 |
msgstr ""
|
756 |
|
757 |
-
#: my-calendar.php:
|
758 |
msgid "April"
|
759 |
msgstr ""
|
760 |
|
761 |
-
#: my-calendar.php:
|
762 |
msgid "May"
|
763 |
msgstr ""
|
764 |
|
765 |
-
#: my-calendar.php:
|
766 |
msgid "June"
|
767 |
msgstr ""
|
768 |
|
769 |
-
#: my-calendar.php:
|
770 |
msgid "July"
|
771 |
msgstr ""
|
772 |
|
773 |
-
#: my-calendar.php:
|
774 |
msgid "August"
|
775 |
msgstr ""
|
776 |
|
777 |
-
#: my-calendar.php:
|
778 |
msgid "September"
|
779 |
msgstr ""
|
780 |
|
781 |
-
#: my-calendar.php:
|
782 |
msgid "October"
|
783 |
msgstr ""
|
784 |
|
785 |
-
#: my-calendar.php:
|
786 |
msgid "November"
|
787 |
msgstr ""
|
788 |
|
789 |
-
#: my-calendar.php:
|
790 |
msgid "December"
|
791 |
msgstr ""
|
792 |
|
793 |
-
#: my-calendar.php:
|
794 |
msgid "Year"
|
795 |
msgstr ""
|
796 |
|
797 |
-
#: my-calendar.php:
|
798 |
msgid "Go"
|
799 |
msgstr ""
|
800 |
|
801 |
-
#: my-calendar.php:
|
802 |
msgid "<abbr title=\"Sunday\">Sun</abbr>"
|
803 |
msgstr ""
|
804 |
|
805 |
-
#: my-calendar.php:
|
806 |
msgid "<abbr title=\"Monday\">Mon</abbr>"
|
807 |
msgstr ""
|
808 |
|
809 |
-
#: my-calendar.php:
|
810 |
msgid "<abbr title=\"Tuesday\">Tues</abbr>"
|
811 |
msgstr ""
|
812 |
|
813 |
-
#: my-calendar.php:
|
814 |
msgid "<abbr title=\"Wednesday\">Wed</abbr>"
|
815 |
msgstr ""
|
816 |
|
817 |
-
#: my-calendar.php:
|
818 |
msgid "<abbr title=\"Thursday\">Thur</abbr>"
|
819 |
msgstr ""
|
820 |
|
821 |
-
#: my-calendar.php:
|
822 |
msgid "<abbr title=\"Friday\">Fri</abbr>"
|
823 |
msgstr ""
|
824 |
|
825 |
-
#: my-calendar.php:
|
826 |
msgid "<abbr title=\"Saturday\">Sat</abbr>"
|
827 |
msgstr ""
|
828 |
|
829 |
-
#: my-calendar.php:
|
830 |
msgid "Calendar"
|
831 |
msgstr ""
|
832 |
|
833 |
-
#: my-calendar.php:
|
834 |
msgid "Events in"
|
835 |
msgstr ""
|
836 |
|
837 |
-
#: my-calendar.php:
|
838 |
msgid "There are no events scheduled during this period."
|
839 |
msgstr ""
|
840 |
|
841 |
-
#: my-calendar.php:
|
842 |
msgid "Category Key"
|
843 |
msgstr ""
|
844 |
|
1 |
+
# Translation of the WordPress plugin My Calendar 1.0.2 by Joseph C Dolson.
|
2 |
# Copyright (C) 2010 Joseph C Dolson
|
3 |
# This file is distributed under the same license as the My Calendar package.
|
4 |
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
6 |
#, fuzzy
|
7 |
msgid ""
|
8 |
msgstr ""
|
9 |
+
"Project-Id-Version: My Calendar 1.0.2\n"
|
10 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/my-calendar\n"
|
11 |
+
"POT-Creation-Date: 2010-04-17 17:49+0000\n"
|
12 |
"PO-Revision-Date: 2010-MO-DA HO:MI+ZONE\n"
|
13 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
67 |
msgid "Manage Categories"
|
68 |
msgstr ""
|
69 |
|
70 |
+
#: my-calendar-categories.php:138 my-calendar-event-manager.php:616
|
71 |
msgid "ID"
|
72 |
msgstr ""
|
73 |
|
76 |
msgstr ""
|
77 |
|
78 |
#: my-calendar-categories.php:142 my-calendar-categories.php:156
|
79 |
+
#: my-calendar-event-manager.php:664
|
80 |
msgid "Edit"
|
81 |
msgstr ""
|
82 |
|
83 |
#: my-calendar-categories.php:143 my-calendar-categories.php:162
|
84 |
+
#: my-calendar-event-manager.php:57 my-calendar-event-manager.php:664
|
85 |
msgid "Delete"
|
86 |
msgstr ""
|
87 |
|
88 |
+
#: my-calendar-categories.php:159 my-calendar-event-manager.php:652
|
89 |
+
#: my-calendar.php:805
|
90 |
msgid "N/A"
|
91 |
msgstr ""
|
92 |
|
98 |
msgid "There are no categories in the database - something has gone wrong!"
|
99 |
msgstr ""
|
100 |
|
101 |
+
#: my-calendar-event-manager.php:14 my-calendar-settings.php:206
|
102 |
+
msgid ""
|
103 |
+
"My Calendar has identified that you have the Calendar plugin by Kieran "
|
104 |
+
"O'Shea installed. You can import those events and categories into the My "
|
105 |
+
"Calendar database. Would you like to import these events?"
|
106 |
+
msgstr ""
|
107 |
+
|
108 |
+
#: my-calendar-event-manager.php:25
|
109 |
+
msgid ""
|
110 |
+
"Calendar Import has received limited testing. Although it is possible that "
|
111 |
+
"it could fail to import your events correctly, it should not have any impact "
|
112 |
+
"on your existing Calendar database. If you encounter any problems, <a href="
|
113 |
+
"\"http://www.joedolson.com/contact.php\">please contact me</a>!"
|
114 |
+
msgstr ""
|
115 |
+
|
116 |
+
#: my-calendar-event-manager.php:52
|
117 |
msgid "Delete Event"
|
118 |
msgstr ""
|
119 |
|
120 |
+
#: my-calendar-event-manager.php:52
|
121 |
msgid "Are you sure you want to delete this event?"
|
122 |
msgstr ""
|
123 |
|
124 |
+
#: my-calendar-event-manager.php:123 my-calendar-event-manager.php:128
|
125 |
+
#: my-calendar-event-manager.php:133 my-calendar-event-manager.php:143
|
126 |
+
#: my-calendar-event-manager.php:151 my-calendar-event-manager.php:159
|
127 |
+
#: my-calendar-event-manager.php:167 my-calendar-event-manager.php:198
|
128 |
+
#: my-calendar-event-manager.php:289 my-calendar-event-manager.php:294
|
129 |
+
#: my-calendar-event-manager.php:299 my-calendar-event-manager.php:309
|
130 |
+
#: my-calendar-event-manager.php:317 my-calendar-event-manager.php:325
|
131 |
+
#: my-calendar-event-manager.php:333 my-calendar-event-manager.php:398
|
132 |
+
#: my-calendar-event-manager.php:413
|
133 |
msgid "Error"
|
134 |
msgstr ""
|
135 |
|
136 |
+
#: my-calendar-event-manager.php:123 my-calendar-event-manager.php:289
|
137 |
msgid ""
|
138 |
"Your event end date must be either after or the same as your event begin date"
|
139 |
msgstr ""
|
140 |
|
141 |
+
#: my-calendar-event-manager.php:128 my-calendar-event-manager.php:294
|
142 |
msgid ""
|
143 |
"Your date formatting is correct but one or more of your dates is invalid. "
|
144 |
"Check for number of days in month and leap year related errors."
|
145 |
msgstr ""
|
146 |
|
147 |
+
#: my-calendar-event-manager.php:133 my-calendar-event-manager.php:299
|
148 |
msgid ""
|
149 |
"Both start and end dates must be entered and be in the format YYYY-MM-DD"
|
150 |
msgstr ""
|
151 |
|
152 |
+
#: my-calendar-event-manager.php:143 my-calendar-event-manager.php:309
|
153 |
msgid "The time field must either be blank or be entered in the format hh:mm"
|
154 |
msgstr ""
|
155 |
|
156 |
+
#: my-calendar-event-manager.php:151 my-calendar-event-manager.php:317
|
157 |
msgid ""
|
158 |
"The URL entered must either be prefixed with http:// or be completely blank"
|
159 |
msgstr ""
|
160 |
|
161 |
+
#: my-calendar-event-manager.php:159 my-calendar-event-manager.php:325
|
162 |
msgid ""
|
163 |
"The event title must be between 1 and 60 characters in length. Some "
|
164 |
"punctuation characters may not be allowed."
|
165 |
msgstr ""
|
166 |
|
167 |
+
#: my-calendar-event-manager.php:167 my-calendar-event-manager.php:333
|
168 |
msgid ""
|
169 |
"The repetition value must be 0 unless a type of recurrance is selected in "
|
170 |
"which case the repetition value must be 0 or higher"
|
171 |
msgstr ""
|
172 |
|
173 |
+
#: my-calendar-event-manager.php:198
|
174 |
msgid ""
|
175 |
"An event with the details you submitted could not be found in the database. "
|
176 |
"This may indicate a problem with your database or the way in which it is "
|
177 |
"configured."
|
178 |
msgstr ""
|
179 |
|
180 |
+
#: my-calendar-event-manager.php:202
|
181 |
msgid "Event added. It will now show in your calendar."
|
182 |
msgstr ""
|
183 |
|
184 |
+
#: my-calendar-event-manager.php:266 my-calendar-event-manager.php:365
|
185 |
msgid "Failure"
|
186 |
msgstr ""
|
187 |
|
188 |
+
#: my-calendar-event-manager.php:266
|
189 |
msgid "You can't update an event if you haven't submitted an event id"
|
190 |
msgstr ""
|
191 |
|
192 |
+
#: my-calendar-event-manager.php:365
|
193 |
msgid ""
|
194 |
"The database failed to return data to indicate the event has been updated "
|
195 |
"sucessfully. This may indicate a problem with your database or the way in "
|
196 |
"which it is configured."
|
197 |
msgstr ""
|
198 |
|
199 |
+
#: my-calendar-event-manager.php:369
|
200 |
msgid "Event updated successfully"
|
201 |
msgstr ""
|
202 |
|
203 |
+
#: my-calendar-event-manager.php:398
|
204 |
msgid "You can't delete an event if you haven't submitted an event id"
|
205 |
msgstr ""
|
206 |
|
207 |
+
#: my-calendar-event-manager.php:409
|
208 |
msgid "Event deleted successfully"
|
209 |
msgstr ""
|
210 |
|
211 |
+
#: my-calendar-event-manager.php:413
|
212 |
msgid ""
|
213 |
"Despite issuing a request to delete, the event still remains in the "
|
214 |
"database. Please investigate."
|
215 |
msgstr ""
|
216 |
|
217 |
+
#: my-calendar-event-manager.php:428 my-calendar-event-manager.php:482
|
218 |
msgid "Edit Event"
|
219 |
msgstr ""
|
220 |
|
221 |
+
#: my-calendar-event-manager.php:432
|
222 |
msgid "You must provide an event id in order to edit it"
|
223 |
msgstr ""
|
224 |
|
225 |
+
#: my-calendar-event-manager.php:438
|
226 |
msgid "Add Event"
|
227 |
msgstr ""
|
228 |
|
229 |
+
#: my-calendar-event-manager.php:443
|
230 |
msgid "Manage Events"
|
231 |
msgstr ""
|
232 |
|
233 |
+
#: my-calendar-event-manager.php:460
|
234 |
msgid "Sorry! That's an invalid event key."
|
235 |
msgstr ""
|
236 |
|
237 |
+
#: my-calendar-event-manager.php:465
|
238 |
msgid "Sorry! We couldn't find an event with that ID."
|
239 |
msgstr ""
|
240 |
|
241 |
+
#: my-calendar-event-manager.php:482
|
242 |
msgid "Add an Event"
|
243 |
msgstr ""
|
244 |
|
245 |
+
#: my-calendar-event-manager.php:490
|
246 |
msgid "Enter your Event Information"
|
247 |
msgstr ""
|
248 |
|
249 |
+
#: my-calendar-event-manager.php:492
|
250 |
msgid "Event Title"
|
251 |
msgstr ""
|
252 |
|
253 |
+
#: my-calendar-event-manager.php:495
|
254 |
msgid ""
|
255 |
"Event Description (<abbr title=\"hypertext markup language\">HTML</abbr> "
|
256 |
"allowed)"
|
257 |
msgstr ""
|
258 |
|
259 |
+
#: my-calendar-event-manager.php:498
|
260 |
msgid "Event Category"
|
261 |
msgstr ""
|
262 |
|
263 |
+
#: my-calendar-event-manager.php:517
|
264 |
msgid "Event Link (Optional)"
|
265 |
msgstr ""
|
266 |
|
267 |
+
#: my-calendar-event-manager.php:520
|
268 |
msgid "Start Date (YYYY-MM-DD)"
|
269 |
msgstr ""
|
270 |
|
271 |
+
#: my-calendar-event-manager.php:523
|
272 |
msgid "End Date (YYYY-MM-DD) (Optional)"
|
273 |
msgstr ""
|
274 |
|
275 |
+
#: my-calendar-event-manager.php:526
|
276 |
msgid "Time (hh:mm)"
|
277 |
msgstr ""
|
278 |
|
279 |
+
#: my-calendar-event-manager.php:537
|
280 |
msgid ""
|
281 |
"Optional, set blank if your event is an all-day event or does not happen at "
|
282 |
"a specific time."
|
283 |
msgstr ""
|
284 |
|
285 |
+
#: my-calendar-event-manager.php:537
|
286 |
msgid "Current time difference from GMT is "
|
287 |
msgstr ""
|
288 |
|
289 |
+
#: my-calendar-event-manager.php:537
|
290 |
msgid " hour(s)"
|
291 |
msgstr ""
|
292 |
|
293 |
+
#: my-calendar-event-manager.php:541
|
294 |
msgid "Recurring Events"
|
295 |
msgstr ""
|
296 |
|
297 |
+
#: my-calendar-event-manager.php:560
|
298 |
msgid "Repeats for"
|
299 |
msgstr ""
|
300 |
|
301 |
+
#: my-calendar-event-manager.php:561
|
302 |
msgid "Units"
|
303 |
msgstr ""
|
304 |
|
305 |
+
#: my-calendar-event-manager.php:568
|
306 |
msgid ""
|
307 |
"Entering 0 means forever, if a unit is selected. If the recurrance unit is "
|
308 |
"left at \"Does not recur,\" the event will not reoccur."
|
309 |
msgstr ""
|
310 |
|
311 |
+
#: my-calendar-event-manager.php:575
|
312 |
msgid ""
|
313 |
"All location fields are optional: <em>insufficient information may result in "
|
314 |
"an inaccurate map</em>."
|
315 |
msgstr ""
|
316 |
|
317 |
+
#: my-calendar-event-manager.php:578
|
318 |
msgid "Name of Location (e.g. <em>Joe's Bar and Grill</em>)"
|
319 |
msgstr ""
|
320 |
|
321 |
+
#: my-calendar-event-manager.php:581
|
322 |
msgid "Street Address"
|
323 |
msgstr ""
|
324 |
|
325 |
+
#: my-calendar-event-manager.php:584
|
326 |
msgid "Street Address (2)"
|
327 |
msgstr ""
|
328 |
|
329 |
+
#: my-calendar-event-manager.php:587
|
330 |
msgid "City"
|
331 |
msgstr ""
|
332 |
|
333 |
+
#: my-calendar-event-manager.php:587
|
334 |
msgid "State/Province"
|
335 |
msgstr ""
|
336 |
|
337 |
+
#: my-calendar-event-manager.php:587
|
338 |
msgid "Postal Code"
|
339 |
msgstr ""
|
340 |
|
341 |
+
#: my-calendar-event-manager.php:590
|
342 |
msgid "Country"
|
343 |
msgstr ""
|
344 |
|
345 |
+
#: my-calendar-event-manager.php:595
|
346 |
msgid "Save Event"
|
347 |
msgstr ""
|
348 |
|
349 |
+
#: my-calendar-event-manager.php:617 my-calendar-widgets.php:32
|
350 |
#: my-calendar-widgets.php:108
|
351 |
msgid "Title"
|
352 |
msgstr ""
|
353 |
|
354 |
+
#: my-calendar-event-manager.php:618
|
355 |
msgid "Description"
|
356 |
msgstr ""
|
357 |
|
358 |
+
#: my-calendar-event-manager.php:619
|
359 |
msgid "Start Date"
|
360 |
msgstr ""
|
361 |
|
362 |
+
#: my-calendar-event-manager.php:621
|
363 |
msgid "Recurs"
|
364 |
msgstr ""
|
365 |
|
366 |
+
#: my-calendar-event-manager.php:622
|
367 |
msgid "Repeats"
|
368 |
msgstr ""
|
369 |
|
370 |
+
#: my-calendar-event-manager.php:623 my-calendar-settings.php:152
|
371 |
msgid "Author"
|
372 |
msgstr ""
|
373 |
|
374 |
+
#: my-calendar-event-manager.php:624
|
375 |
msgid "Category"
|
376 |
msgstr ""
|
377 |
|
378 |
+
#: my-calendar-event-manager.php:625
|
379 |
msgid "Edit / Delete"
|
380 |
msgstr ""
|
381 |
|
382 |
+
#: my-calendar-event-manager.php:642
|
383 |
msgid "Never"
|
384 |
msgstr ""
|
385 |
|
386 |
+
#: my-calendar-event-manager.php:643
|
387 |
msgid "Daily"
|
388 |
msgstr ""
|
389 |
|
390 |
+
#: my-calendar-event-manager.php:644
|
391 |
msgid "Weekly"
|
392 |
msgstr ""
|
393 |
|
394 |
+
#: my-calendar-event-manager.php:645
|
395 |
msgid "Monthly"
|
396 |
msgstr ""
|
397 |
|
398 |
+
#: my-calendar-event-manager.php:646
|
399 |
msgid "Yearly"
|
400 |
msgstr ""
|
401 |
|
402 |
+
#: my-calendar-event-manager.php:653
|
403 |
msgid "Forever"
|
404 |
msgstr ""
|
405 |
|
406 |
+
#: my-calendar-event-manager.php:654
|
407 |
msgid "Times"
|
408 |
msgstr ""
|
409 |
|
410 |
+
#: my-calendar-event-manager.php:672
|
411 |
msgid "There are no events in the database!"
|
412 |
msgstr ""
|
413 |
|
491 |
msgstr ""
|
492 |
|
493 |
#: my-calendar-help.php:60
|
494 |
+
msgid "Displays the date on which the event ends."
|
495 |
msgstr ""
|
496 |
|
497 |
#: my-calendar-help.php:63
|
498 |
+
msgid "Displays the WordPress author who posted the event."
|
499 |
msgstr ""
|
500 |
|
501 |
#: my-calendar-help.php:66
|
502 |
+
msgid "Displays the URL provided for the event."
|
503 |
msgstr ""
|
504 |
|
505 |
#: my-calendar-help.php:69
|
506 |
+
msgid "Displays the description of the event."
|
507 |
+
msgstr ""
|
508 |
+
|
509 |
+
#: my-calendar-help.php:72
|
510 |
msgid ""
|
511 |
"Displays title of the event as a link if a URL is present, or the title "
|
512 |
"alone if no URL is available."
|
513 |
msgstr ""
|
514 |
|
515 |
+
#: my-calendar-help.php:75
|
516 |
msgid "Displays the name of the location of the event."
|
517 |
msgstr ""
|
518 |
|
519 |
+
#: my-calendar-help.php:78
|
520 |
msgid "Displays the first line of the site address."
|
521 |
msgstr ""
|
522 |
|
523 |
+
#: my-calendar-help.php:81
|
524 |
msgid "Displays the second line of the site address."
|
525 |
msgstr ""
|
526 |
|
527 |
+
#: my-calendar-help.php:84
|
528 |
msgid "Displays the city for the event."
|
529 |
msgstr ""
|
530 |
|
531 |
+
#: my-calendar-help.php:87
|
532 |
msgid "Displays the state for the event."
|
533 |
msgstr ""
|
534 |
|
535 |
+
#: my-calendar-help.php:90
|
536 |
msgid "Displays the postcode for the event."
|
537 |
msgstr ""
|
538 |
|
539 |
+
#: my-calendar-help.php:93
|
540 |
msgid "Displays the country for the event location."
|
541 |
msgstr ""
|
542 |
|
543 |
+
#: my-calendar-help.php:96
|
544 |
msgid ""
|
545 |
"Displays the event address in <a href=\"http://microformats.org/wiki/hcard"
|
546 |
"\">hcard</a> format."
|
547 |
msgstr ""
|
548 |
|
549 |
+
#: my-calendar-help.php:99
|
550 |
msgid ""
|
551 |
"Displays a link to a Google Map of the event, if sufficient address "
|
552 |
"information is available. If not, will be empty."
|
553 |
msgstr ""
|
554 |
|
555 |
+
#: my-calendar-settings.php:56
|
556 |
+
msgid "Categories imported successfully."
|
557 |
+
msgstr ""
|
558 |
+
|
559 |
+
#: my-calendar-settings.php:58
|
560 |
+
msgid "Categories not imported."
|
561 |
+
msgstr ""
|
562 |
+
|
563 |
+
#: my-calendar-settings.php:61
|
564 |
+
msgid "Events imported successfully."
|
565 |
+
msgstr ""
|
566 |
+
|
567 |
+
#: my-calendar-settings.php:63
|
568 |
+
msgid "Events not imported."
|
569 |
+
msgstr ""
|
570 |
+
|
571 |
+
#: my-calendar-settings.php:112
|
572 |
msgid "Settings saved"
|
573 |
msgstr ""
|
574 |
|
575 |
+
#: my-calendar-settings.php:139
|
576 |
msgid "My Calendar Options"
|
577 |
msgstr ""
|
578 |
|
579 |
+
#: my-calendar-settings.php:143
|
580 |
msgid "Calendar Settings"
|
581 |
msgstr ""
|
582 |
|
583 |
+
#: my-calendar-settings.php:147
|
584 |
msgid "Primary Calendar Options"
|
585 |
msgstr ""
|
586 |
|
587 |
+
#: my-calendar-settings.php:149
|
588 |
msgid "Choose the lowest user group that may manage events"
|
589 |
msgstr ""
|
590 |
|
591 |
+
#: my-calendar-settings.php:150
|
592 |
msgid "Subscriber"
|
593 |
msgstr ""
|
594 |
|
595 |
+
#: my-calendar-settings.php:151
|
596 |
msgid "Contributor"
|
597 |
msgstr ""
|
598 |
|
599 |
+
#: my-calendar-settings.php:153
|
600 |
msgid "Editor"
|
601 |
msgstr ""
|
602 |
|
603 |
+
#: my-calendar-settings.php:154
|
604 |
msgid "Administrator"
|
605 |
msgstr ""
|
606 |
|
607 |
+
#: my-calendar-settings.php:158
|
608 |
msgid "Do you want to display the author name on events?"
|
609 |
msgstr ""
|
610 |
|
611 |
+
#: my-calendar-settings.php:159 my-calendar-settings.php:165
|
612 |
msgid "Yes"
|
613 |
msgstr ""
|
614 |
|
615 |
+
#: my-calendar-settings.php:160 my-calendar-settings.php:166
|
616 |
msgid "No"
|
617 |
msgstr ""
|
618 |
|
619 |
+
#: my-calendar-settings.php:164
|
620 |
msgid "Display a jumpbox for changing month and year quickly?"
|
621 |
msgstr ""
|
622 |
|
623 |
+
#: my-calendar-settings.php:170
|
624 |
msgid "In list mode, show how many months of events at a time:"
|
625 |
msgstr ""
|
626 |
|
627 |
+
#: my-calendar-settings.php:173
|
628 |
msgid "Date format in list mode"
|
629 |
msgstr ""
|
630 |
|
631 |
+
#: my-calendar-settings.php:174
|
632 |
msgid ""
|
633 |
"Date format uses the same syntax as the <a href=\"http://php.net/date\">PHP "
|
634 |
"<code>date()</code> function</a>. Save option to update sample output."
|
635 |
msgstr ""
|
636 |
|
637 |
+
#: my-calendar-settings.php:177
|
638 |
msgid ""
|
639 |
"Show Link to Google Map (when sufficient address information is available.)"
|
640 |
msgstr ""
|
641 |
|
642 |
+
#: my-calendar-settings.php:178
|
643 |
msgid "Show Event Address in Details"
|
644 |
msgstr ""
|
645 |
|
646 |
+
#: my-calendar-settings.php:182
|
647 |
msgid "Calendar Styles"
|
648 |
msgstr ""
|
649 |
|
650 |
+
#: my-calendar-settings.php:184
|
651 |
msgid "Reset the My Calendar style to default"
|
652 |
msgstr ""
|
653 |
|
654 |
+
#: my-calendar-settings.php:185
|
655 |
msgid "Disable My Calendar Stylesheet"
|
656 |
msgstr ""
|
657 |
|
658 |
+
#: my-calendar-settings.php:188
|
659 |
msgid "Edit the stylesheet for My Calendar"
|
660 |
msgstr ""
|
661 |
|
662 |
+
#: my-calendar-settings.php:192
|
663 |
msgid "Calendar Behaviors"
|
664 |
msgstr ""
|
665 |
|
666 |
+
#: my-calendar-settings.php:194
|
667 |
msgid "Disable List Javascript Effects"
|
668 |
msgstr ""
|
669 |
|
670 |
+
#: my-calendar-settings.php:195
|
671 |
msgid "Disable Calendar Javascript Effects"
|
672 |
msgstr ""
|
673 |
|
674 |
+
#: my-calendar-settings.php:198
|
675 |
msgid "Save"
|
676 |
msgstr ""
|
677 |
|
733 |
msgid "Make a Donation"
|
734 |
msgstr ""
|
735 |
|
736 |
+
#. #-#-#-#-# plugin.pot (My Calendar 1.0.2) #-#-#-#-#
|
737 |
#. Plugin Name of the plugin/theme
|
738 |
#: my-calendar.php:120
|
739 |
msgid "My Calendar"
|
751 |
msgid "Help"
|
752 |
msgstr ""
|
753 |
|
754 |
+
#: my-calendar.php:671 my-calendar.php:675 my-calendar.php:685
|
755 |
+
#: my-calendar.php:687
|
756 |
msgid "Next Events"
|
757 |
msgstr ""
|
758 |
|
759 |
+
#: my-calendar.php:700 my-calendar.php:704 my-calendar.php:714
|
760 |
+
#: my-calendar.php:716
|
761 |
msgid "Previous Events"
|
762 |
msgstr ""
|
763 |
|
764 |
+
#: my-calendar.php:799
|
765 |
msgid "Event Details"
|
766 |
msgstr ""
|
767 |
|
768 |
+
#: my-calendar.php:805
|
769 |
msgid "Not Applicable"
|
770 |
msgstr ""
|
771 |
|
772 |
+
#: my-calendar.php:813
|
773 |
msgid "Posted by"
|
774 |
msgstr ""
|
775 |
|
776 |
+
#: my-calendar.php:1297
|
777 |
msgid "Month"
|
778 |
msgstr ""
|
779 |
|
780 |
+
#: my-calendar.php:1298 my-calendar.php:1361
|
781 |
msgid "January"
|
782 |
msgstr ""
|
783 |
|
784 |
+
#: my-calendar.php:1299 my-calendar.php:1361
|
785 |
msgid "February"
|
786 |
msgstr ""
|
787 |
|
788 |
+
#: my-calendar.php:1300 my-calendar.php:1361
|
789 |
msgid "March"
|
790 |
msgstr ""
|
791 |
|
792 |
+
#: my-calendar.php:1301 my-calendar.php:1361
|
793 |
msgid "April"
|
794 |
msgstr ""
|
795 |
|
796 |
+
#: my-calendar.php:1302 my-calendar.php:1361
|
797 |
msgid "May"
|
798 |
msgstr ""
|
799 |
|
800 |
+
#: my-calendar.php:1303 my-calendar.php:1361
|
801 |
msgid "June"
|
802 |
msgstr ""
|
803 |
|
804 |
+
#: my-calendar.php:1304 my-calendar.php:1361
|
805 |
msgid "July"
|
806 |
msgstr ""
|
807 |
|
808 |
+
#: my-calendar.php:1305 my-calendar.php:1361
|
809 |
msgid "August"
|
810 |
msgstr ""
|
811 |
|
812 |
+
#: my-calendar.php:1306 my-calendar.php:1361
|
813 |
msgid "September"
|
814 |
msgstr ""
|
815 |
|
816 |
+
#: my-calendar.php:1307 my-calendar.php:1361
|
817 |
msgid "October"
|
818 |
msgstr ""
|
819 |
|
820 |
+
#: my-calendar.php:1308 my-calendar.php:1361
|
821 |
msgid "November"
|
822 |
msgstr ""
|
823 |
|
824 |
+
#: my-calendar.php:1309 my-calendar.php:1361
|
825 |
msgid "December"
|
826 |
msgstr ""
|
827 |
|
828 |
+
#: my-calendar.php:1311
|
829 |
msgid "Year"
|
830 |
msgstr ""
|
831 |
|
832 |
+
#: my-calendar.php:1336
|
833 |
msgid "Go"
|
834 |
msgstr ""
|
835 |
|
836 |
+
#: my-calendar.php:1354 my-calendar.php:1357
|
837 |
msgid "<abbr title=\"Sunday\">Sun</abbr>"
|
838 |
msgstr ""
|
839 |
|
840 |
+
#: my-calendar.php:1354 my-calendar.php:1357
|
841 |
msgid "<abbr title=\"Monday\">Mon</abbr>"
|
842 |
msgstr ""
|
843 |
|
844 |
+
#: my-calendar.php:1354 my-calendar.php:1357
|
845 |
msgid "<abbr title=\"Tuesday\">Tues</abbr>"
|
846 |
msgstr ""
|
847 |
|
848 |
+
#: my-calendar.php:1354 my-calendar.php:1357
|
849 |
msgid "<abbr title=\"Wednesday\">Wed</abbr>"
|
850 |
msgstr ""
|
851 |
|
852 |
+
#: my-calendar.php:1354 my-calendar.php:1357
|
853 |
msgid "<abbr title=\"Thursday\">Thur</abbr>"
|
854 |
msgstr ""
|
855 |
|
856 |
+
#: my-calendar.php:1354 my-calendar.php:1357
|
857 |
msgid "<abbr title=\"Friday\">Fri</abbr>"
|
858 |
msgstr ""
|
859 |
|
860 |
+
#: my-calendar.php:1354 my-calendar.php:1357
|
861 |
msgid "<abbr title=\"Saturday\">Sat</abbr>"
|
862 |
msgstr ""
|
863 |
|
864 |
+
#: my-calendar.php:1443 my-calendar.php:1446
|
865 |
msgid "Calendar"
|
866 |
msgstr ""
|
867 |
|
868 |
+
#: my-calendar.php:1450
|
869 |
msgid "Events in"
|
870 |
msgstr ""
|
871 |
|
872 |
+
#: my-calendar.php:1559
|
873 |
msgid "There are no events scheduled during this period."
|
874 |
msgstr ""
|
875 |
|
876 |
+
#: my-calendar.php:1569
|
877 |
msgid "Category Key"
|
878 |
msgstr ""
|
879 |
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: joedolson
|
|
3 |
Donate link: http://www.joedolson.com/donate.php
|
4 |
Tags: calendar, dates, times, events, scheduling
|
5 |
Requires at least: 2.7
|
6 |
-
Tested up to:
|
7 |
Stable tag: trunk
|
8 |
|
9 |
Accessible WordPress event calendar plugin. Show events from multiple calendars on pages, in posts, or in widgets.
|
@@ -38,6 +38,7 @@ Features:
|
|
38 |
* Events can be placed into categories
|
39 |
* A calendar of events can be displayed including a single category or all categories
|
40 |
* Events can be links pointing to a location of your choice
|
|
|
41 |
|
42 |
== Installation ==
|
43 |
|
@@ -47,18 +48,32 @@ Features:
|
|
47 |
|
48 |
3. Configure My Calendar using the following pages in the admin panel:
|
49 |
|
50 |
-
My Calendar ->
|
51 |
-
|
52 |
My Calendar -> Manage Categories
|
|
|
53 |
|
54 |
-
|
55 |
-
|
56 |
-
5. Edit or create a page on your blog which includes the shortcode [my_calendar] and visit
|
57 |
the page you have edited or created. You should see your calendar. Visit My Calendar -> Help for assistance
|
58 |
with shortcode options or widget configuration.
|
59 |
|
60 |
== Changelog ==
|
61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
= 1.0.0 =
|
63 |
|
64 |
* Initial launch.
|
@@ -69,6 +84,7 @@ Features:
|
|
69 |
|
70 |
Hey, give me a break. I'm only going to release this with one default CSS - it works pretty well with Kubrick or Twenty Ten, and should be usable in many other themes. However, I'm not about to make any guarantees that it'll work with your theme. If you want it to look a particular way, you'll need to do some customization.
|
71 |
|
|
|
72 |
== Screenshots ==
|
73 |
|
74 |
1. Calendar using calendar list format.
|
3 |
Donate link: http://www.joedolson.com/donate.php
|
4 |
Tags: calendar, dates, times, events, scheduling
|
5 |
Requires at least: 2.7
|
6 |
+
Tested up to: 3.0 beta1
|
7 |
Stable tag: trunk
|
8 |
|
9 |
Accessible WordPress event calendar plugin. Show events from multiple calendars on pages, in posts, or in widgets.
|
38 |
* Events can be placed into categories
|
39 |
* A calendar of events can be displayed including a single category or all categories
|
40 |
* Events can be links pointing to a location of your choice
|
41 |
+
* Import method from Kieran's Calendar plugin
|
42 |
|
43 |
== Installation ==
|
44 |
|
48 |
|
49 |
3. Configure My Calendar using the following pages in the admin panel:
|
50 |
|
51 |
+
My Calendar -> Add/Edit Events
|
|
|
52 |
My Calendar -> Manage Categories
|
53 |
+
My Calendar -> Settings
|
54 |
|
55 |
+
4. Edit or create a page on your blog which includes the shortcode [my_calendar] and visit
|
|
|
|
|
56 |
the page you have edited or created. You should see your calendar. Visit My Calendar -> Help for assistance
|
57 |
with shortcode options or widget configuration.
|
58 |
|
59 |
== Changelog ==
|
60 |
|
61 |
+
= 1.0.2 =
|
62 |
+
|
63 |
+
* Fixed problems with editing and deleting events or categories in multiblog installation
|
64 |
+
* Fixed escaping/character set issue
|
65 |
+
* Fixed issue when blog address and wp address did not match (introduced in 1.0.1)
|
66 |
+
* Added import method to transfer events and categories from Kieran O'Shea's Calendar plugin
|
67 |
+
|
68 |
+
= 1.0.1 =
|
69 |
+
|
70 |
+
* Added missing template code for event end dates.
|
71 |
+
* Changed defaults so that styles and javascript are initially turned on.
|
72 |
+
* Removed function collisions with Calendar
|
73 |
+
* Fixed bug where My Calendar didn't respect the timezone offset in identifying the current day.
|
74 |
+
* Fixed bug where multiblog installations in WP 3.0 were unable to save events and settings.
|
75 |
+
* Added Spanish translation, courtesy of [Esteban Truelsegaard](http://www.netmdp.com). Thanks!
|
76 |
+
|
77 |
= 1.0.0 =
|
78 |
|
79 |
* Initial launch.
|
84 |
|
85 |
Hey, give me a break. I'm only going to release this with one default CSS - it works pretty well with Kubrick or Twenty Ten, and should be usable in many other themes. However, I'm not about to make any guarantees that it'll work with your theme. If you want it to look a particular way, you'll need to do some customization.
|
86 |
|
87 |
+
|
88 |
== Screenshots ==
|
89 |
|
90 |
1. Calendar using calendar list format.
|
uninstall.php
CHANGED
@@ -32,6 +32,7 @@ delete_option('display_upcoming_days');
|
|
32 |
delete_option('display_upcoming_events');
|
33 |
delete_option('display_past_events');
|
34 |
delete_option('display_past_days');
|
|
|
35 |
|
36 |
}
|
37 |
?>
|
32 |
delete_option('display_upcoming_events');
|
33 |
delete_option('display_past_events');
|
34 |
delete_option('display_past_days');
|
35 |
+
delete_option('ko_calendar_imported');
|
36 |
|
37 |
}
|
38 |
?>
|