Version Description
Download this release
Release Info
Developer | KieranOShea |
Plugin | Calendar |
Version | 1.1 |
Comparing to | |
See all releases |
Code changes from version 1.1.2 to 1.1
- README +69 -0
- readme.txt +0 -105
- wp-admin/edit-calendar.php +1 -1
- wp-calendar.php +10 -40
- wp-content/plugins/calendar.php +22 -23
README
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
------ Calendar for WordPress v1.1 ------
|
2 |
+
|
3 |
+
Author: Kieran O'Shea
|
4 |
+
E-Mail: kieran@kieranoshea.com
|
5 |
+
Website: http://www.kieranoshea.com
|
6 |
+
|
7 |
+
-----------------------------------------
|
8 |
+
|
9 |
+
Features:
|
10 |
+
|
11 |
+
* Monthly view of events
|
12 |
+
* Mouse-over details for each event
|
13 |
+
* Events can have a timestamp (optional)
|
14 |
+
* Events can span more than one day
|
15 |
+
* Multiple events per day possible
|
16 |
+
* Events can repeat on a weekly, monthly or yearly basis
|
17 |
+
* Repeats can occur indefinitely or a limited number of times
|
18 |
+
* User and search friendly URL scheme
|
19 |
+
* Easy to use events manager in admin dashboard
|
20 |
+
|
21 |
+
|
22 |
+
Installing:
|
23 |
+
|
24 |
+
1. Add the following lines to your .htaccess file to enable the nice URLs the calendar
|
25 |
+
uses. Place the lines after the RewriteBase entry in your current WordPress rewrite
|
26 |
+
rules. They must be placed BEFORE the other WordPress rules. The calendar will not
|
27 |
+
function without these lines. If you do not currently use mod_rewrite to craft your
|
28 |
+
WordPress URLs then you will need to start doing so in order to use the calendar.
|
29 |
+
|
30 |
+
RewriteRule ^calendar/([^/\.]+)/([^/\.]+)/?$ wp-calendar.php?year=$1&month=$2 [QSA,L]
|
31 |
+
RewriteRule ^calendar/?$ wp-calendar.php [QSA,L]
|
32 |
+
|
33 |
+
2. Upload the other included files into the same directories as they are in the package
|
34 |
+
|
35 |
+
3. Visit the plugins page of your dashboard and activate Calendar 1.1 by Kieran O'Shea
|
36 |
+
|
37 |
+
4. Visit Manage -> Calendar in the dashboard to initialise the database and start adding
|
38 |
+
calendar events into your system
|
39 |
+
|
40 |
+
5. Visit your blog URL /calendar to see your calendar in action
|
41 |
+
|
42 |
+
|
43 |
+
|
44 |
+
Modifying the calendar page:
|
45 |
+
|
46 |
+
1. You can modify the look and layout of the public calendar page by editing
|
47 |
+
wp-calendar.php
|
48 |
+
|
49 |
+
|
50 |
+
|
51 |
+
Removing the link to me:
|
52 |
+
|
53 |
+
1. If you want to remove the text and link to my site from underneath the calendar you can
|
54 |
+
do so in the calendar.php file. Please only do this if you have to though as it will stop
|
55 |
+
other people from finding out how to get their own copy. You could always link to me in
|
56 |
+
your blogroll or in your site footer as an alternative if you prefer. Ultimately it's your
|
57 |
+
site however and if you don't want to link to me you are under no obligation to do so.
|
58 |
+
|
59 |
+
|
60 |
+
|
61 |
+
Uninstalling:
|
62 |
+
|
63 |
+
1. Deactivate the plugin on the plugins page of your blog dashboard
|
64 |
+
|
65 |
+
2. Delete the uploaded files for the plugin
|
66 |
+
|
67 |
+
3. Remove the added lines from the .htaccess file
|
68 |
+
|
69 |
+
4. Drop the wp_calendar table from your database
|
readme.txt
DELETED
@@ -1,105 +0,0 @@
|
|
1 |
-
=== Calendar ===
|
2 |
-
Contributors: KieranOShea
|
3 |
-
Donate link: http://www.kieranoshea.com
|
4 |
-
Tags: calendar, dates, times, events
|
5 |
-
Requires at least: 2.0
|
6 |
-
Tested up to: 2.1
|
7 |
-
Stable tag: 1.1.2
|
8 |
-
|
9 |
-
A simple but effective Calendar plugin for WordPress that allows you to
|
10 |
-
manage your events and appointments and display them to the world.
|
11 |
-
|
12 |
-
== Description ==
|
13 |
-
|
14 |
-
A simple but effective Calendar plugin for WordPress that allows you to
|
15 |
-
manage your events and appointments and display them to the world on your
|
16 |
-
website.
|
17 |
-
|
18 |
-
Features:
|
19 |
-
|
20 |
-
* Monthly view of events
|
21 |
-
* Mouse-over details for each event
|
22 |
-
* Events can have a timestamp (optional)
|
23 |
-
* Events can span more than one day
|
24 |
-
* Multiple events per day possible
|
25 |
-
* Events can repeat on a weekly, monthly or yearly basis
|
26 |
-
* Repeats can occur indefinitely or a limited number of times
|
27 |
-
* User and search friendly URL scheme
|
28 |
-
* Easy to use events manager in admin dashboard
|
29 |
-
|
30 |
-
|
31 |
-
== Installation ==
|
32 |
-
|
33 |
-
The installation process is simple and only takes a few minutes. Please read
|
34 |
-
these steps carefully though to ensure a trouble free install.
|
35 |
-
|
36 |
-
Installing:
|
37 |
-
|
38 |
-
1. Ensure you have a permalink structure defined in your WordPress settings.
|
39 |
-
You can do this by selecting the appropriate option in the WP admin panel
|
40 |
-
|
41 |
-
Options -> Permalinks
|
42 |
-
|
43 |
-
If you already have a permalink structure enabled, there is no need to
|
44 |
-
enable it again
|
45 |
-
|
46 |
-
2. Once you have enabled permalinks, you should have a file called .htaccess
|
47 |
-
in the root directory of your blog. Check it is there - this may be
|
48 |
-
difficult on Windows due to the way files are displayed.
|
49 |
-
|
50 |
-
3. Add the following lines to your .htaccess file to enable the nice URLs
|
51 |
-
the calendar uses. The calendar WILL NOT WORK properly without these lines!
|
52 |
-
|
53 |
-
After the line containing:
|
54 |
-
RewriteBase
|
55 |
-
|
56 |
-
Add:
|
57 |
-
RewriteRule ^calendar/([^/\.]+)/([^/\.]+)/?$ wp-calendar.php?year=$1&month=$2 [QSA,L]
|
58 |
-
RewriteRule ^calendar/?$ wp-calendar.php [QSA,L]
|
59 |
-
|
60 |
-
Save and upload the .htaccess file to your install.
|
61 |
-
|
62 |
-
4. Upload the other included files into the same directories as they are in
|
63 |
-
the package
|
64 |
-
|
65 |
-
5. Visit the plugins page of your dashboard and activate Calendar 1.1.2 by
|
66 |
-
Kieran O'Shea
|
67 |
-
|
68 |
-
6. Visit Manage -> Calendar in the dashboard to initialise the database and
|
69 |
-
start adding calendar events into your system
|
70 |
-
|
71 |
-
7. Visit your blog URL /calendar to see your calendar in action
|
72 |
-
|
73 |
-
|
74 |
-
Uninstalling:
|
75 |
-
|
76 |
-
1. Deactivate the plugin on the plugins page of your blog dashboard
|
77 |
-
|
78 |
-
2. Delete the uploaded files for the plugin
|
79 |
-
|
80 |
-
3. Remove the added lines from the .htaccess file
|
81 |
-
|
82 |
-
4. Drop the wp_calendar table from your database
|
83 |
-
|
84 |
-
== Frequently Asked Questions ==
|
85 |
-
|
86 |
-
= How do I modify the style and layout of the calendar page? =
|
87 |
-
|
88 |
-
You can modify the look and layout of the public calendar page by editing
|
89 |
-
wp-calendar.php Note the style block it contains and line of php calling
|
90 |
-
the display of the actual calendar.
|
91 |
-
|
92 |
-
= Can I removing the link to you? =
|
93 |
-
|
94 |
-
If you want to remove the text and link to my site from underneath the
|
95 |
-
calendar you can do so in the calendar.php file. Please only do this if
|
96 |
-
you have to though as it will stop other people from finding out how to
|
97 |
-
get their own copy. You could always link to me in your blogroll or in
|
98 |
-
your site footer as an alternative if you prefer. Ultimately it's your
|
99 |
-
site however and if you don't want to link to me you are under no
|
100 |
-
obligation to do so.
|
101 |
-
|
102 |
-
== Screenshots ==
|
103 |
-
|
104 |
-
There are no screenshots available for the Calednar at this time, however you
|
105 |
-
can get an idea of how it looks from the [Calendar on my site](http://www.kieranoshea.com/calendar "Personal Website of Kieran O'Shea")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wp-admin/edit-calendar.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Author: Kieran O'Shea
|
4 |
Author URI: http://www.kieranoshea.com
|
5 |
Description: Admin panel for the calendar plugin
|
6 |
-
Version: 1.1
|
7 |
*/
|
8 |
|
9 |
require_once('admin.php');
|
3 |
Author: Kieran O'Shea
|
4 |
Author URI: http://www.kieranoshea.com
|
5 |
Description: Admin panel for the calendar plugin
|
6 |
+
Version: 1.1
|
7 |
*/
|
8 |
|
9 |
require_once('admin.php');
|
wp-calendar.php
CHANGED
@@ -1,53 +1,23 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
Version: 1.1.2
|
8 |
-
Author URI: http://www.kieranoshea.com
|
9 |
*/
|
10 |
|
|
|
11 |
// Require the standard WordPress header
|
12 |
require(dirname(__FILE__).'/wp-blog-header.php');
|
13 |
|
14 |
// Begin content of page
|
15 |
|
16 |
-
get_header();
|
17 |
?>
|
18 |
-
|
19 |
-
<style type="text/css">
|
20 |
-
span.calnk a {
|
21 |
-
text-decoration:none;
|
22 |
-
color:#000000;
|
23 |
-
border-bottom:1px dotted #000000;
|
24 |
-
}
|
25 |
-
span.calnk a:hover {
|
26 |
-
text-decoration:none;
|
27 |
-
color:#000000;
|
28 |
-
border-bottom:1px dotted #000000;
|
29 |
-
}
|
30 |
-
span.calnk {
|
31 |
-
position:relative;
|
32 |
-
}
|
33 |
-
span.calnk a span {
|
34 |
-
display:none;
|
35 |
-
}
|
36 |
-
span.calnk a:hover span {
|
37 |
-
color:#333333;
|
38 |
-
background:#F6F79B;
|
39 |
-
display:block;
|
40 |
-
position:absolute;
|
41 |
-
margin-top:1px;
|
42 |
-
padding:5px;
|
43 |
-
width:150px;
|
44 |
-
z-index:100;
|
45 |
-
}
|
46 |
-
</style>
|
47 |
-
|
48 |
<h2>Calendar</h2>
|
49 |
-
|
50 |
-
<?php echo calendar(); ?>
|
51 |
|
52 |
<?php get_sidebar(); ?>
|
53 |
-
<?php get_footer(); ?>
|
1 |
<?php
|
2 |
/*
|
3 |
+
Calendar v1.1 for WordPress
|
4 |
+
Author: Kieran O'Shea
|
5 |
+
E-Mail: kieran@kieranoshea.com
|
6 |
+
Website: http://www.kieranoshea.com
|
|
|
|
|
7 |
*/
|
8 |
|
9 |
+
|
10 |
// Require the standard WordPress header
|
11 |
require(dirname(__FILE__).'/wp-blog-header.php');
|
12 |
|
13 |
// Begin content of page
|
14 |
|
15 |
+
get_header();
|
16 |
?>
|
17 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
<h2>Calendar</h2>
|
19 |
+
|
20 |
+
<?php echo calendar(); ?>
|
21 |
|
22 |
<?php get_sidebar(); ?>
|
23 |
+
<?php get_footer(); ?>
|
wp-content/plugins/calendar.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.kieranoshea.com/
|
|
5 |
Description: This plugin allows you to display a calendar of all your events and appointments as a page on your site.
|
6 |
Author: Kieran O'Shea
|
7 |
Author URI: http://www.kieranoshea.com
|
8 |
-
Version: 1.1
|
9 |
*/
|
10 |
|
11 |
// Define the table for the plugin.
|
@@ -66,7 +66,7 @@ add_action('admin_menu', 'wp_events_admin_menu');
|
|
66 |
|
67 |
// Firstly we check for conventional events. These will form the first instance of a recurring event
|
68 |
// or the only instance of a one-off event
|
69 |
-
$events = $wpdb->get_results("SELECT * FROM " . WP_CALENDAR_TABLE . " WHERE event_begin <= '$date' AND event_end >= '$date' AND event_recur = 'S' ORDER BY
|
70 |
if (!empty($events))
|
71 |
{
|
72 |
foreach($events as $event)
|
@@ -77,10 +77,9 @@ add_action('admin_menu', 'wp_events_admin_menu');
|
|
77 |
}
|
78 |
else
|
79 |
{
|
80 |
-
$event_time =
|
81 |
}
|
82 |
-
|
83 |
-
$output .= '<br />* <span class="calnk" nowrap="nowrap"><a>' . $event->event_title . '<span>' . $event_time . '' . $event->event_desc . '</span></a></span>';
|
84 |
}
|
85 |
}
|
86 |
|
@@ -95,7 +94,7 @@ add_action('admin_menu', 'wp_events_admin_menu');
|
|
95 |
|
96 |
|
97 |
// Deal with forever recurring year events
|
98 |
-
$events = $wpdb->get_results("SELECT * FROM " . WP_CALENDAR_TABLE . " WHERE event_recur = 'Y' AND EXTRACT(YEAR FROM '$date') >= EXTRACT(YEAR FROM event_begin) AND event_repeats = 0 ORDER BY
|
99 |
|
100 |
if (!empty($events))
|
101 |
{
|
@@ -109,9 +108,9 @@ add_action('admin_menu', 'wp_events_admin_menu');
|
|
109 |
}
|
110 |
else
|
111 |
{
|
112 |
-
$event_time =
|
113 |
}
|
114 |
-
$event_out = '<br />* <
|
115 |
|
116 |
// Technically we don't care about the years, but we need to find out if the
|
117 |
// event spans the turn of a year so we can deal with it appropriately.
|
@@ -138,7 +137,7 @@ add_action('admin_menu', 'wp_events_admin_menu');
|
|
138 |
}
|
139 |
|
140 |
// Now the ones that happen a finite number of times
|
141 |
-
$events = $wpdb->get_results("SELECT * FROM " . WP_CALENDAR_TABLE . " WHERE event_recur = 'Y' AND EXTRACT(YEAR FROM '$date') >= EXTRACT(YEAR FROM event_begin) AND event_repeats != 0 AND (EXTRACT(YEAR FROM '$date')-EXTRACT(YEAR FROM event_begin)) <= event_repeats ORDER BY
|
142 |
if (!empty($events))
|
143 |
{
|
144 |
foreach($events as $event)
|
@@ -151,9 +150,9 @@ add_action('admin_menu', 'wp_events_admin_menu');
|
|
151 |
}
|
152 |
else
|
153 |
{
|
154 |
-
$event_time =
|
155 |
}
|
156 |
-
$event_out = '<br />* <
|
157 |
|
158 |
// Technically we don't care about the years, but we need to find out if the
|
159 |
// event spans the turn of a year so we can deal with it appropriately.
|
@@ -185,7 +184,7 @@ add_action('admin_menu', 'wp_events_admin_menu');
|
|
185 |
*/
|
186 |
|
187 |
// The monthly events that never stop recurring
|
188 |
-
$events = $wpdb->get_results("SELECT * FROM " . WP_CALENDAR_TABLE . " WHERE event_recur = 'M' AND EXTRACT(YEAR FROM '$date') >= EXTRACT(YEAR FROM event_begin) AND event_repeats = 0 ORDER BY
|
189 |
if (!empty($events))
|
190 |
{
|
191 |
foreach($events as $event)
|
@@ -198,9 +197,9 @@ add_action('admin_menu', 'wp_events_admin_menu');
|
|
198 |
}
|
199 |
else
|
200 |
{
|
201 |
-
$event_time =
|
202 |
}
|
203 |
-
$event_out = '<br />* <
|
204 |
|
205 |
// Technically we don't care about the years or months, but we need to find out if the
|
206 |
// event spans the turn of a year or month so we can deal with it appropriately.
|
@@ -228,7 +227,7 @@ add_action('admin_menu', 'wp_events_admin_menu');
|
|
228 |
|
229 |
|
230 |
// Now the ones that happen a finite number of times
|
231 |
-
$events = $wpdb->get_results("SELECT * FROM " . WP_CALENDAR_TABLE . " WHERE event_recur = 'M' AND EXTRACT(YEAR FROM '$date') >= EXTRACT(YEAR FROM event_begin) AND event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '$date'),EXTRACT(YEAR_MONTH FROM event_begin))) <= event_repeats ORDER BY
|
232 |
if (!empty($events))
|
233 |
{
|
234 |
foreach($events as $event)
|
@@ -241,9 +240,9 @@ add_action('admin_menu', 'wp_events_admin_menu');
|
|
241 |
}
|
242 |
else
|
243 |
{
|
244 |
-
$event_time =
|
245 |
}
|
246 |
-
$event_out = '<br />* <
|
247 |
|
248 |
// Technically we don't care about the years or months, but we need to find out if the
|
249 |
// event spans the turn of a year or month so we can deal with it appropriately.
|
@@ -278,7 +277,7 @@ add_action('admin_menu', 'wp_events_admin_menu');
|
|
278 |
*/
|
279 |
|
280 |
// The weekly events that never stop recurring
|
281 |
-
$events = $wpdb->get_results("SELECT * FROM " . WP_CALENDAR_TABLE . " WHERE event_recur = 'W' AND '$date' >= event_begin AND event_repeats = 0 ORDER BY
|
282 |
if (!empty($events))
|
283 |
{
|
284 |
foreach($events as $event)
|
@@ -291,9 +290,9 @@ add_action('admin_menu', 'wp_events_admin_menu');
|
|
291 |
}
|
292 |
else
|
293 |
{
|
294 |
-
$event_time =
|
295 |
}
|
296 |
-
$event_out = '<br />* <
|
297 |
|
298 |
// Now we are going to check to see what day the original event
|
299 |
// fell on and see if the current date is both after it and on
|
@@ -330,7 +329,7 @@ add_action('admin_menu', 'wp_events_admin_menu');
|
|
330 |
}
|
331 |
|
332 |
// The weekly events that have a limit on how many times they occur
|
333 |
-
$events = $wpdb->get_results("SELECT * FROM " . WP_CALENDAR_TABLE . " WHERE event_recur = 'W' AND '$date' >= event_begin AND event_repeats != 0 AND (event_repeats*7) >= (
|
334 |
if (!empty($events))
|
335 |
{
|
336 |
foreach($events as $event)
|
@@ -343,9 +342,9 @@ add_action('admin_menu', 'wp_events_admin_menu');
|
|
343 |
}
|
344 |
else
|
345 |
{
|
346 |
-
$event_time =
|
347 |
}
|
348 |
-
$event_out = '<br />* <
|
349 |
|
350 |
// Now we are going to check to see what day the original event
|
351 |
// fell on and see if the current date is both after it and on
|
5 |
Description: This plugin allows you to display a calendar of all your events and appointments as a page on your site.
|
6 |
Author: Kieran O'Shea
|
7 |
Author URI: http://www.kieranoshea.com
|
8 |
+
Version: 1.1
|
9 |
*/
|
10 |
|
11 |
// Define the table for the plugin.
|
66 |
|
67 |
// Firstly we check for conventional events. These will form the first instance of a recurring event
|
68 |
// or the only instance of a one-off event
|
69 |
+
$events = $wpdb->get_results("SELECT * FROM " . WP_CALENDAR_TABLE . " WHERE event_begin <= '$date' AND event_end >= '$date' AND event_recur = 'S' ORDER BY event_begin");
|
70 |
if (!empty($events))
|
71 |
{
|
72 |
foreach($events as $event)
|
77 |
}
|
78 |
else
|
79 |
{
|
80 |
+
$event_time = date("H:i", strtotime($event->event_time)) . ' > ';
|
81 |
}
|
82 |
+
$output .= '<br />* <a style="color:#333333; border-bottom: 1px dotted #333333;" title="' . $event_time . $event->event_desc . '">' . $event->event_title . '</a>';
|
|
|
83 |
}
|
84 |
}
|
85 |
|
94 |
|
95 |
|
96 |
// Deal with forever recurring year events
|
97 |
+
$events = $wpdb->get_results("SELECT * FROM " . WP_CALENDAR_TABLE . " WHERE event_recur = 'Y' AND EXTRACT(YEAR FROM '$date') >= EXTRACT(YEAR FROM event_begin) AND event_repeats = 0 ORDER BY event_begin");
|
98 |
|
99 |
if (!empty($events))
|
100 |
{
|
108 |
}
|
109 |
else
|
110 |
{
|
111 |
+
$event_time = date("H:i", strtotime($event->event_time)) . ' > ';
|
112 |
}
|
113 |
+
$event_out = '<br />* <a style="color:#333333; border-bottom: 1px dotted #333333;" title="' . $event_time . $event->event_desc . '">' . $event->event_title . '</a>';
|
114 |
|
115 |
// Technically we don't care about the years, but we need to find out if the
|
116 |
// event spans the turn of a year so we can deal with it appropriately.
|
137 |
}
|
138 |
|
139 |
// Now the ones that happen a finite number of times
|
140 |
+
$events = $wpdb->get_results("SELECT * FROM " . WP_CALENDAR_TABLE . " WHERE event_recur = 'Y' AND EXTRACT(YEAR FROM '$date') >= EXTRACT(YEAR FROM event_begin) AND event_repeats != 0 AND (EXTRACT(YEAR FROM '$date')-EXTRACT(YEAR FROM event_begin)) <= event_repeats ORDER BY event_begin");
|
141 |
if (!empty($events))
|
142 |
{
|
143 |
foreach($events as $event)
|
150 |
}
|
151 |
else
|
152 |
{
|
153 |
+
$event_time = date("H:i", strtotime($event->event_time)) . ' > ';
|
154 |
}
|
155 |
+
$event_out = '<br />* <a style="color:#333333; border-bottom: 1px dotted #333333;" title="' . $event_time . $event->event_desc . '">' . $event->event_title . '</a>';
|
156 |
|
157 |
// Technically we don't care about the years, but we need to find out if the
|
158 |
// event spans the turn of a year so we can deal with it appropriately.
|
184 |
*/
|
185 |
|
186 |
// The monthly events that never stop recurring
|
187 |
+
$events = $wpdb->get_results("SELECT * FROM " . WP_CALENDAR_TABLE . " WHERE event_recur = 'M' AND EXTRACT(YEAR FROM '$date') >= EXTRACT(YEAR FROM event_begin) AND event_repeats = 0 ORDER BY event_begin");
|
188 |
if (!empty($events))
|
189 |
{
|
190 |
foreach($events as $event)
|
197 |
}
|
198 |
else
|
199 |
{
|
200 |
+
$event_time = date("H:i", strtotime($event->event_time)) . ' > ';
|
201 |
}
|
202 |
+
$event_out = '<br />* <a style="color:#333333; border-bottom: 1px dotted #333333;" title="' . $event_time . $event->event_desc . '">' . $event->event_title . '</a>';
|
203 |
|
204 |
// Technically we don't care about the years or months, but we need to find out if the
|
205 |
// event spans the turn of a year or month so we can deal with it appropriately.
|
227 |
|
228 |
|
229 |
// Now the ones that happen a finite number of times
|
230 |
+
$events = $wpdb->get_results("SELECT * FROM " . WP_CALENDAR_TABLE . " WHERE event_recur = 'M' AND EXTRACT(YEAR FROM '$date') >= EXTRACT(YEAR FROM event_begin) AND event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '$date'),EXTRACT(YEAR_MONTH FROM event_begin))) <= event_repeats ORDER BY event_begin");
|
231 |
if (!empty($events))
|
232 |
{
|
233 |
foreach($events as $event)
|
240 |
}
|
241 |
else
|
242 |
{
|
243 |
+
$event_time = date("H:i", strtotime($event->event_time)) . ' > ';
|
244 |
}
|
245 |
+
$event_out = '<br />* <a style="color:#333333; border-bottom: 1px dotted #333333;" title="' . $event_time . $event->event_desc . '">' . $event->event_title . '</a>';
|
246 |
|
247 |
// Technically we don't care about the years or months, but we need to find out if the
|
248 |
// event spans the turn of a year or month so we can deal with it appropriately.
|
277 |
*/
|
278 |
|
279 |
// The weekly events that never stop recurring
|
280 |
+
$events = $wpdb->get_results("SELECT * FROM " . WP_CALENDAR_TABLE . " WHERE event_recur = 'W' AND '$date' >= event_begin AND event_repeats = 0 ORDER BY event_begin");
|
281 |
if (!empty($events))
|
282 |
{
|
283 |
foreach($events as $event)
|
290 |
}
|
291 |
else
|
292 |
{
|
293 |
+
$event_time = date("H:i", strtotime($event->event_time)) . ' > ';
|
294 |
}
|
295 |
+
$event_out = '<br />* <a style="color:#333333; border-bottom: 1px dotted #333333;" title="' . $event_time . $event->event_desc . '">' . $event->event_title . '</a>';
|
296 |
|
297 |
// Now we are going to check to see what day the original event
|
298 |
// fell on and see if the current date is both after it and on
|
329 |
}
|
330 |
|
331 |
// The weekly events that have a limit on how many times they occur
|
332 |
+
$events = $wpdb->get_results("SELECT * FROM " . WP_CALENDAR_TABLE . " WHERE event_recur = 'W' AND '$date' >= event_begin AND event_repeats != 0 AND (event_repeats*7) >= DATEDIFF('$date',event_end) ORDER BY event_begin");
|
333 |
if (!empty($events))
|
334 |
{
|
335 |
foreach($events as $event)
|
342 |
}
|
343 |
else
|
344 |
{
|
345 |
+
$event_time = date("H:i", strtotime($event->event_time)) . ' > ';
|
346 |
}
|
347 |
+
$event_out = '<br />* <a style="color:#333333; border-bottom: 1px dotted #333333;" title="' . $event_time . $event->event_desc . '">' . $event->event_title . '</a>';
|
348 |
|
349 |
// Now we are going to check to see what day the original event
|
350 |
// fell on and see if the current date is both after it and on
|