Simple Calendar – Google Calendar Plugin - Version 0.1.1

Version Description

  • Fix to prevent conflicts with other plugins.
  • Changes to readme.txt.
Download this release

Release Info

Developer rosshanney
Plugin Icon 128x128 Simple Calendar – Google Calendar Plugin
Version 0.1.1
Comparing to
See all releases

Code changes from version 0.1 to 0.1.1

Files changed (3) hide show
  1. inc/gce-parser.php +3 -3
  2. inc/php-calendar.php +3 -2
  3. readme.txt +15 -5
inc/gce-parser.php CHANGED
@@ -123,7 +123,7 @@ class GCE_Parser{
123
  $css_classes = 'gce-has-events';
124
  if($key == mktime(0, 0, 0, date('m'), date('d'), date('Y'))) $css_classes .= ' gce-today';
125
 
126
- //Change array entry to array of link href, CSS classes, and markup for use in generate_calendar (below)
127
  $event_days[$key] = array(null, $css_classes, $events_markup);
128
  }else{
129
  //Else if event day isn't in month and year specified, remove event day (and all associated events) from the array
@@ -141,12 +141,12 @@ class GCE_Parser{
141
  $next_key = ($no_more_events ? ' ' : '»');
142
  $next = ($no_more_events ? null : date('m-Y', mktime(0, 0, 0, $month + 1, 1, $year)));
143
 
144
- //Array of previous and next link stuff for use in generate_calendar (below)
145
  $pn = array($prev_key => $prev, $next_key => $next);
146
  }
147
 
148
  //Generate the calendar markup and return it
149
- return generate_calendar($year, $month, $event_days, 1, null, $this->week_start_day, $pn);
150
  }
151
  }
152
  ?>
123
  $css_classes = 'gce-has-events';
124
  if($key == mktime(0, 0, 0, date('m'), date('d'), date('Y'))) $css_classes .= ' gce-today';
125
 
126
+ //Change array entry to array of link href, CSS classes, and markup for use in gce_generate_calendar (below)
127
  $event_days[$key] = array(null, $css_classes, $events_markup);
128
  }else{
129
  //Else if event day isn't in month and year specified, remove event day (and all associated events) from the array
141
  $next_key = ($no_more_events ? ' ' : '»');
142
  $next = ($no_more_events ? null : date('m-Y', mktime(0, 0, 0, $month + 1, 1, $year)));
143
 
144
+ //Array of previous and next link stuff for use in gce_generate_calendar (below)
145
  $pn = array($prev_key => $prev, $next_key => $next);
146
  }
147
 
148
  //Generate the calendar markup and return it
149
+ return gce_generate_calendar($year, $month, $event_days, 1, null, $this->week_start_day, $pn);
150
  }
151
  }
152
  ?>
inc/php-calendar.php CHANGED
@@ -8,11 +8,12 @@
8
  Changes made to original PHP Calendar script by me (Ross Hanney):
9
 
10
  - Renamed CSS classes to fit with my plugin
11
- - Slight modification of lines 55-63 to use Unix timestamp rather than day number
12
  - Other small markup changes
 
13
  */
14
 
15
- function generate_calendar($year, $month, $days = array(), $day_name_length = 3, $month_href = NULL, $first_day = 0, $pn = array()){
16
  $first_of_month = gmmktime(0, 0, 0, $month, 1, $year);
17
  #remember that mktime will automatically correct if invalid dates are entered
18
  # for instance, mktime(0,0,0,12,32,1997) will be the date for Jan 1, 1998
8
  Changes made to original PHP Calendar script by me (Ross Hanney):
9
 
10
  - Renamed CSS classes to fit with my plugin
11
+ - Slight modification of lines 56-64 to use Unix timestamp rather than day number
12
  - Other small markup changes
13
+ - Renamed function to prevent conflicts
14
  */
15
 
16
+ function gce_generate_calendar($year, $month, $days = array(), $day_name_length = 3, $month_href = NULL, $first_day = 0, $pn = array()){
17
  $first_of_month = gmmktime(0, 0, 0, $month, 1, $year);
18
  #remember that mktime will automatically correct if invalid dates are entered
19
  # for instance, mktime(0,0,0,12,32,1997) will be the date for Jan 1, 1998
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: rosshanney
3
  Tags: google, google calendar, calendar, events, ajax, widget
4
  Requires at least: 2.9.2
5
  Tested up to: 3.0
6
- Stable tag: 0.1
7
 
8
  Parses Google Calendar feeds and displays the events as a calendar grid or list on a page, post or widget.
9
 
@@ -19,7 +19,7 @@ Parses Google Calendar feeds and displays the events as a calendar grid or list
19
  * Options to change the number of events retrieved, date / time format, cache duration etc.
20
  * Calendar grids can have the ability to change month, utilising AJAX
21
 
22
- Please visit the plugin homepage for how to get started and help:
23
 
24
  * [plugin homepage](http://www.rhanney.co.uk/plugins/google-calendar-events)
25
 
@@ -27,8 +27,9 @@ Please visit the plugin homepage for how to get started and help:
27
 
28
  Use the automatic installer from within the WordPress administration, or:
29
 
30
- 1. Unzip the `google-calendar-events.zip` file
31
- 1. Upload the `google-calendar-events` folder to your `plugins` directory
 
32
  1. Go to the Plugins page from within the WordPress administration
33
  1. Click Activate for Google Calendar Events
34
 
@@ -38,8 +39,17 @@ You can now start adding feeds. Visit the [plugin homepage](http://www.rhanney.c
38
 
39
  == Changelog ==
40
 
 
 
 
 
41
  = 0.1 =
42
- Initial release.
 
 
 
 
 
43
 
44
  == Frequently Asked Questions ==
45
 
3
  Tags: google, google calendar, calendar, events, ajax, widget
4
  Requires at least: 2.9.2
5
  Tested up to: 3.0
6
+ Stable tag: 0.1.1
7
 
8
  Parses Google Calendar feeds and displays the events as a calendar grid or list on a page, post or widget.
9
 
19
  * Options to change the number of events retrieved, date / time format, cache duration etc.
20
  * Calendar grids can have the ability to change month, utilising AJAX
21
 
22
+ Please visit the plugin homepage for how to get started and other help:
23
 
24
  * [plugin homepage](http://www.rhanney.co.uk/plugins/google-calendar-events)
25
 
27
 
28
  Use the automatic installer from within the WordPress administration, or:
29
 
30
+ 1. Download the `.zip` file by clicking on the Download button on the right
31
+ 1. Unzip the file
32
+ 1. Upload the `google-calendar-events` directory to your `plugins` directory
33
  1. Go to the Plugins page from within the WordPress administration
34
  1. Click Activate for Google Calendar Events
35
 
39
 
40
  == Changelog ==
41
 
42
+ = 0.1.1 =
43
+ * Fix to prevent conflicts with other plugins.
44
+ * Changes to readme.txt.
45
+
46
  = 0.1 =
47
+ * Initial release.
48
+
49
+ == Upgrade Notice ==
50
+
51
+ = 0.1.1 =
52
+ Bug fix to prevent conflicts with other plugins.
53
 
54
  == Frequently Asked Questions ==
55