Calendar - Version 1.1.1

Version Description

Download this release

Release Info

Developer KieranOShea
Plugin Icon 128x128 Calendar
Version 1.1.1
Comparing to
See all releases

Code changes from version 1.1.2 to 1.1.1

README ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ------ Calendar for WordPress v1.1.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.2
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.1
7
  */
8
 
9
  require_once('admin.php');
wp-calendar.php CHANGED
@@ -1,53 +1,52 @@
1
  <?php
2
  /*
3
- Plugin Name: Calendar
4
- Plugin URI: http://www.kieranoshea.com/programming
5
- Description: This plugin allows you to display a calendar of all your events an\d appointments as a page on your site.
6
- Author: Kieran O'Shea
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.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
+ <style type="text/css">
19
+ span.calnk a {
20
+ text-decoration:none;
21
+ color:#000000;
22
+ border-bottom:1px dotted #000000;
23
+ }
24
+ span.calnk a:hover {
25
+ text-decoration:none;
26
+ color:#000000;
27
+ border-bottom:1px dotted #000000;
28
+ }
29
+ span.calnk {
30
+ position:relative;
31
+ }
32
+ span.calnk a span {
33
+ display:none;
34
+ }
35
+ span.calnk a:hover span {
36
+ color:#333333;
37
+ background:#F6F79B;
38
+ display:block;
39
+ position:absolute;
40
+ margin-top:1px;
41
+ padding:5px;
42
+ width:150px;
43
+ z-index:100;
44
+ }
45
  </style>
46
+
47
  <h2>Calendar</h2>
48
+
49
+ <?php echo calendar(); ?>
50
 
51
  <?php get_sidebar(); ?>
52
+ <?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.2
9
  */
10
 
11
  // Define the table for the plugin.
@@ -330,7 +330,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) >= (TO_DAYS('$date') - TO_DAYS(event_end)) ORDER BY event_id");
334
  if (!empty($events))
335
  {
336
  foreach($events as $event)
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.1
9
  */
10
 
11
  // Define the table for the plugin.
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) >= DATEDIFF('$date',event_end) ORDER BY event_id");
334
  if (!empty($events))
335
  {
336
  foreach($events as $event)