Events Manager - Version 3.0.93

Version Description

  • Fixed bug with ownership and widgets
  • Resolved 2.9 incompatability
  • Fixed rss ownership bug
  • Fixed calendar bug where pre/post dates don't show events
  • Fixed calendar, now showing today correctly
  • Categories blank page fix
  • fixed page nav conflicts with role scoper
  • added shortcut to manage bookings on event list
Download this release

Release Info

Developer netweblogic
Plugin Icon 128x128 Events Manager
Version 3.0.93
Comparing to
See all releases

Code changes from version 3.0.92 to 3.0.93

admin/bookings/em-cancelled.php CHANGED
@@ -11,7 +11,7 @@ function em_bookings_cancelled_table(){
11
  $action = ( $action_scope && !empty($_GET ['action']) ) ? $_GET ['action']:'';
12
  $order = ( $action_scope && !empty($_GET ['order']) ) ? $_GET ['order']:'ASC';
13
  $limit = ( $action_scope && !empty($_GET['limit']) ) ? $_GET['limit'] : 20;//Default limit
14
- $page = ( $action_scope && !empty($_GET['p']) ) ? $_GET['p']:1;
15
  $offset = ( $action_scope && $page > 1 ) ? ($page-1)*$limit : 0;
16
 
17
  if( is_object($EM_Event) ){
@@ -61,7 +61,7 @@ function em_bookings_cancelled_table(){
61
  -->
62
  <?php
63
  if ( $bookings_count >= $limit ) {
64
- $page_link_template = em_add_get_params($_SERVER['REQUEST_URI'], array('p'=>'%PAGE%', 'em_ajax'=>0, 'em_obj'=>'em_bookings_confirmed_table'));
65
  $bookings_nav .= em_admin_paginate( $page_link_template, $bookings_count, $limit, $page, 5);
66
  echo $bookings_nav;
67
  }
11
  $action = ( $action_scope && !empty($_GET ['action']) ) ? $_GET ['action']:'';
12
  $order = ( $action_scope && !empty($_GET ['order']) ) ? $_GET ['order']:'ASC';
13
  $limit = ( $action_scope && !empty($_GET['limit']) ) ? $_GET['limit'] : 20;//Default limit
14
+ $page = ( $action_scope && !empty($_GET['pno']) ) ? $_GET['pno']:1;
15
  $offset = ( $action_scope && $page > 1 ) ? ($page-1)*$limit : 0;
16
 
17
  if( is_object($EM_Event) ){
61
  -->
62
  <?php
63
  if ( $bookings_count >= $limit ) {
64
+ $page_link_template = em_add_get_params($_SERVER['REQUEST_URI'], array('pno'=>'%PAGE%', 'em_ajax'=>0, 'em_obj'=>'em_bookings_confirmed_table'));
65
  $bookings_nav .= em_admin_paginate( $page_link_template, $bookings_count, $limit, $page, 5);
66
  echo $bookings_nav;
67
  }
admin/bookings/em-confirmed.php CHANGED
@@ -12,7 +12,7 @@ function em_bookings_confirmed_table(){
12
  $action = ( $action_scope && !empty($_GET ['action']) ) ? $_GET ['action']:'';
13
  $order = ( $action_scope && !empty($_GET ['order']) ) ? $_GET ['order']:'ASC';
14
  $limit = ( $action_scope && !empty($_GET['limit']) ) ? $_GET['limit'] : 20;//Default limit
15
- $page = ( $action_scope && !empty($_GET['p']) ) ? $_GET['p']:1;
16
  $offset = ( $action_scope && $page > 1 ) ? ($page-1)*$limit : 0;
17
 
18
  if( is_object($EM_Event) ){
@@ -62,7 +62,7 @@ function em_bookings_confirmed_table(){
62
  -->
63
  <?php
64
  if ( $bookings_count >= $limit ) {
65
- $page_link_template = em_add_get_params($_SERVER['REQUEST_URI'], array('p'=>'%PAGE%', 'em_ajax'=>0, 'em_obj'=>'em_bookings_confirmed_table'));
66
  $bookings_nav .= em_admin_paginate( $page_link_template, $bookings_count, $limit, $page, 5);
67
  echo $bookings_nav;
68
  }
12
  $action = ( $action_scope && !empty($_GET ['action']) ) ? $_GET ['action']:'';
13
  $order = ( $action_scope && !empty($_GET ['order']) ) ? $_GET ['order']:'ASC';
14
  $limit = ( $action_scope && !empty($_GET['limit']) ) ? $_GET['limit'] : 20;//Default limit
15
+ $page = ( $action_scope && !empty($_GET['pno']) ) ? $_GET['pno']:1;
16
  $offset = ( $action_scope && $page > 1 ) ? ($page-1)*$limit : 0;
17
 
18
  if( is_object($EM_Event) ){
62
  -->
63
  <?php
64
  if ( $bookings_count >= $limit ) {
65
+ $page_link_template = em_add_get_params($_SERVER['REQUEST_URI'], array('pno'=>'%PAGE%', 'em_ajax'=>0, 'em_obj'=>'em_bookings_confirmed_table'));
66
  $bookings_nav .= em_admin_paginate( $page_link_template, $bookings_count, $limit, $page, 5);
67
  echo $bookings_nav;
68
  }
admin/bookings/em-events.php CHANGED
@@ -19,7 +19,7 @@ function em_bookings_events_table() {
19
  $action = ( $action_scope && !empty($_GET ['action']) ) ? $_GET ['action']:'';
20
  $order = ( $action_scope && !empty($_GET ['order']) ) ? $_GET ['order']:'ASC';
21
  $limit = ( $action_scope && !empty($_GET['limit']) ) ? $_GET['limit'] : 20;//Default limit
22
- $page = ( $action_scope && !empty($_GET['p']) ) ? $_GET['p']:1;
23
  $offset = ( $action_scope && $page > 1 ) ? ($page-1)*$limit : 0;
24
  $scope = ( $action_scope && !empty($_GET ['scope']) && array_key_exists($_GET ['scope'], $scope_names) ) ? $_GET ['scope']:'future';
25
 
@@ -77,7 +77,7 @@ function em_bookings_events_table() {
77
  -->
78
  <?php
79
  if ( $events_count >= $limit ) {
80
- $page_link_template = em_add_get_params($_SERVER['REQUEST_URI'], array('p'=>'%PAGE%', 'em_ajax'=>0, 'em_obj'=>'em_bookings_events_table'));
81
  $events_nav .= em_admin_paginate( $page_link_template, $events_count, $limit, $page, 5);
82
  echo $events_nav;
83
  }
19
  $action = ( $action_scope && !empty($_GET ['action']) ) ? $_GET ['action']:'';
20
  $order = ( $action_scope && !empty($_GET ['order']) ) ? $_GET ['order']:'ASC';
21
  $limit = ( $action_scope && !empty($_GET['limit']) ) ? $_GET['limit'] : 20;//Default limit
22
+ $page = ( $action_scope && !empty($_GET['pno']) ) ? $_GET['pno']:1;
23
  $offset = ( $action_scope && $page > 1 ) ? ($page-1)*$limit : 0;
24
  $scope = ( $action_scope && !empty($_GET ['scope']) && array_key_exists($_GET ['scope'], $scope_names) ) ? $_GET ['scope']:'future';
25
 
77
  -->
78
  <?php
79
  if ( $events_count >= $limit ) {
80
+ $page_link_template = em_add_get_params($_SERVER['REQUEST_URI'], array('pno'=>'%PAGE%', 'em_ajax'=>0, 'em_obj'=>'em_bookings_events_table'));
81
  $events_nav .= em_admin_paginate( $page_link_template, $events_count, $limit, $page, 5);
82
  echo $events_nav;
83
  }
admin/bookings/em-pending.php CHANGED
@@ -17,7 +17,7 @@ function em_bookings_pending_table($event_id = false){
17
  $action = ( $action_scope && !empty($_GET ['action']) ) ? $_GET ['action']:'';
18
  $order = ( $action_scope && !empty($_GET ['order']) ) ? $_GET ['order']:'ASC';
19
  $limit = ( $action_scope && !empty($_GET['limit']) ) ? $_GET['limit'] : 20;//Default limit
20
- $page = ( $action_scope && !empty($_GET['p']) ) ? $_GET['p']:1;
21
  $offset = ( $action_scope && $page > 1 ) ? ($page-1)*$limit : 0;
22
 
23
  if( is_object($EM_Event) ){
@@ -76,7 +76,7 @@ function em_bookings_pending_table($event_id = false){
76
  -->
77
  <?php
78
  if ( $bookings_count >= $limit ) {
79
- $page_link_template = em_add_get_params($_SERVER['REQUEST_URI'], array('p'=>'%PAGE%', 'em_ajax'=>0, 'em_obj'=>'em_bookings_pending_table'));
80
  $bookings_nav .= em_admin_paginate( $page_link_template, $bookings_count, $limit, $page, 5);
81
  echo $bookings_nav;
82
  }
17
  $action = ( $action_scope && !empty($_GET ['action']) ) ? $_GET ['action']:'';
18
  $order = ( $action_scope && !empty($_GET ['order']) ) ? $_GET ['order']:'ASC';
19
  $limit = ( $action_scope && !empty($_GET['limit']) ) ? $_GET['limit'] : 20;//Default limit
20
+ $page = ( $action_scope && !empty($_GET['pno']) ) ? $_GET['pno']:1;
21
  $offset = ( $action_scope && $page > 1 ) ? ($page-1)*$limit : 0;
22
 
23
  if( is_object($EM_Event) ){
76
  -->
77
  <?php
78
  if ( $bookings_count >= $limit ) {
79
+ $page_link_template = em_add_get_params($_SERVER['REQUEST_URI'], array('pno'=>'%PAGE%', 'em_ajax'=>0, 'em_obj'=>'em_bookings_pending_table'));
80
  $bookings_nav .= em_admin_paginate( $page_link_template, $bookings_count, $limit, $page, 5);
81
  echo $bookings_nav;
82
  }
admin/bookings/em-person.php CHANGED
@@ -14,7 +14,7 @@ function em_bookings_person_table(){
14
  $action = ( $action_scope && !empty($_GET ['action']) ) ? $_GET ['action']:'';
15
  $order = ( $action_scope && !empty($_GET ['order']) ) ? $_GET ['order']:'ASC';
16
  $limit = ( $action_scope && !empty($_GET['limit']) ) ? $_GET['limit'] : 20;//Default limit
17
- $page = ( $action_scope && !empty($_GET['p']) ) ? $_GET['p']:1;
18
  $offset = ( $action_scope && $page > 1 ) ? ($page-1)*$limit : 0;
19
 
20
  $bookings = $EM_Person->get_bookings();
@@ -67,7 +67,7 @@ function em_bookings_person_table(){
67
  -->
68
  <?php
69
  if ( $bookings_count >= $limit ) {
70
- $page_link_template = em_add_get_params($_SERVER['REQUEST_URI'], array('p'=>'%PAGE%', 'em_ajax'=>0, 'em_obj'=>'em_bookings_confirmed_table'));
71
  $bookings_nav .= em_admin_paginate( $page_link_template, $bookings_count, $limit, $page, 5);
72
  echo $bookings_nav;
73
  }
14
  $action = ( $action_scope && !empty($_GET ['action']) ) ? $_GET ['action']:'';
15
  $order = ( $action_scope && !empty($_GET ['order']) ) ? $_GET ['order']:'ASC';
16
  $limit = ( $action_scope && !empty($_GET['limit']) ) ? $_GET['limit'] : 20;//Default limit
17
+ $page = ( $action_scope && !empty($_GET['pno']) ) ? $_GET['pno']:1;
18
  $offset = ( $action_scope && $page > 1 ) ? ($page-1)*$limit : 0;
19
 
20
  $bookings = $EM_Person->get_bookings();
67
  -->
68
  <?php
69
  if ( $bookings_count >= $limit ) {
70
+ $page_link_template = em_add_get_params($_SERVER['REQUEST_URI'], array('pno'=>'%PAGE%', 'em_ajax'=>0, 'em_obj'=>'em_bookings_confirmed_table'));
71
  $bookings_nav .= em_admin_paginate( $page_link_template, $bookings_count, $limit, $page, 5);
72
  echo $bookings_nav;
73
  }
admin/bookings/em-rejected.php CHANGED
@@ -11,7 +11,7 @@ function em_bookings_rejected_table(){
11
  $action = ( $action_scope && !empty($_GET ['action']) ) ? $_GET ['action']:'';
12
  $order = ( $action_scope && !empty($_GET ['order']) ) ? $_GET ['order']:'ASC';
13
  $limit = ( $action_scope && !empty($_GET['limit']) ) ? $_GET['limit'] : 20;//Default limit
14
- $page = ( $action_scope && !empty($_GET['p']) ) ? $_GET['p']:1;
15
  $offset = ( $action_scope && $page > 1 ) ? ($page-1)*$limit : 0;
16
 
17
  if( is_object($EM_Event) ){
@@ -61,7 +61,7 @@ function em_bookings_rejected_table(){
61
  -->
62
  <?php
63
  if ( $bookings_count >= $limit ) {
64
- $page_link_template = em_add_get_params($_SERVER['REQUEST_URI'], array('p'=>'%PAGE%', 'em_ajax'=>0, 'em_obj'=>'em_bookings_confirmed_table'));
65
  $bookings_nav .= em_admin_paginate( $page_link_template, $bookings_count, $limit, $page, 5);
66
  echo $bookings_nav;
67
  }
11
  $action = ( $action_scope && !empty($_GET ['action']) ) ? $_GET ['action']:'';
12
  $order = ( $action_scope && !empty($_GET ['order']) ) ? $_GET ['order']:'ASC';
13
  $limit = ( $action_scope && !empty($_GET['limit']) ) ? $_GET['limit'] : 20;//Default limit
14
+ $page = ( $action_scope && !empty($_GET['pno']) ) ? $_GET['pno']:1;
15
  $offset = ( $action_scope && $page > 1 ) ? ($page-1)*$limit : 0;
16
 
17
  if( is_object($EM_Event) ){
61
  -->
62
  <?php
63
  if ( $bookings_count >= $limit ) {
64
+ $page_link_template = em_add_get_params($_SERVER['REQUEST_URI'], array('pno'=>'%PAGE%', 'em_ajax'=>0, 'em_obj'=>'em_bookings_confirmed_table'));
65
  $bookings_nav .= em_admin_paginate( $page_link_template, $bookings_count, $limit, $page, 5);
66
  echo $bookings_nav;
67
  }
admin/em-categories.php CHANGED
@@ -34,6 +34,8 @@ function em_admin_categories_page() {
34
  $message = __('Categories Deleted', "dbem" );
35
  em_categories_table_layout($message);
36
  }
 
 
37
  }
38
  }
39
 
34
  $message = __('Categories Deleted', "dbem" );
35
  em_categories_table_layout($message);
36
  }
37
+ }else{
38
+ em_categories_table_layout($message);
39
  }
40
  }
41
 
admin/em-event.php CHANGED
@@ -15,7 +15,7 @@ function em_admin_event_actions(){
15
  if ( $validation ) { //EM_Event gets the event if submitted via POST and validates it (safer than to depend on JS)
16
  //Save
17
  if( $EM_Event->save() ) {
18
- $page = !empty($_REQUEST['p']) ? $_REQUEST['p']:'';
19
  $scope = !empty($_REQUEST['scope']) ? $_REQUEST['scope']:'';
20
  wp_redirect( get_bloginfo('wpurl').'/wp-admin/admin.php?page=events-manager&p='.$page.'&scope='.$scope.'&message='.urlencode($EM_Event->feedback_message));
21
  }
@@ -30,7 +30,7 @@ function em_admin_event_actions(){
30
  $redirect_url = em_add_get_params($_SERVER['HTTP_REFERER'], array('error' => __('There was an error duplicating the event. Try again maybe?', 'dbem'), 'message'=>''), false);
31
  wp_redirect($redirect_url);
32
  }else{
33
- $page = !empty($_REQUEST['p']) ? $_REQUEST['p']:'';
34
  $scope = !empty($_REQUEST['scope']) ? $_REQUEST['scope']:'';
35
  wp_redirect( get_bloginfo('wpurl').'/wp-admin/admin.php?page=events-manager-event&event_id='.$EM_Event->id.'&p='.$page.'&scope='.$scope.'&message='.urlencode($EM_Event->feedback_message));
36
  }
@@ -591,7 +591,7 @@ function em_admin_event_page() {
591
  <p class="submit">
592
  <input type="submit" name="events_update" value="<?php _e ( 'Submit Event', 'dbem' ); ?> &raquo;" />
593
  </p>
594
- <input type="hidden" name="p" value="<?php echo ( !empty($_REQUEST['p']) ) ? $_REQUEST['p']:''; ?>" /><a>
595
  <input type="hidden" name="scope" value="<?php echo ( !empty($_REQUEST['scope']) ) ? $_REQUEST['scope']:'' ?>" /></a>
596
  <input type="hidden" name="action" value="save" />
597
  </div>
15
  if ( $validation ) { //EM_Event gets the event if submitted via POST and validates it (safer than to depend on JS)
16
  //Save
17
  if( $EM_Event->save() ) {
18
+ $page = !empty($_REQUEST['pno']) ? $_REQUEST['pno']:'';
19
  $scope = !empty($_REQUEST['scope']) ? $_REQUEST['scope']:'';
20
  wp_redirect( get_bloginfo('wpurl').'/wp-admin/admin.php?page=events-manager&p='.$page.'&scope='.$scope.'&message='.urlencode($EM_Event->feedback_message));
21
  }
30
  $redirect_url = em_add_get_params($_SERVER['HTTP_REFERER'], array('error' => __('There was an error duplicating the event. Try again maybe?', 'dbem'), 'message'=>''), false);
31
  wp_redirect($redirect_url);
32
  }else{
33
+ $page = !empty($_REQUEST['pno']) ? $_REQUEST['pno']:'';
34
  $scope = !empty($_REQUEST['scope']) ? $_REQUEST['scope']:'';
35
  wp_redirect( get_bloginfo('wpurl').'/wp-admin/admin.php?page=events-manager-event&event_id='.$EM_Event->id.'&p='.$page.'&scope='.$scope.'&message='.urlencode($EM_Event->feedback_message));
36
  }
591
  <p class="submit">
592
  <input type="submit" name="events_update" value="<?php _e ( 'Submit Event', 'dbem' ); ?> &raquo;" />
593
  </p>
594
+ <input type="hidden" name="p" value="<?php echo ( !empty($_REQUEST['pno']) ) ? $_REQUEST['pno']:''; ?>" /><a>
595
  <input type="hidden" name="scope" value="<?php echo ( !empty($_REQUEST['scope']) ) ? $_REQUEST['scope']:'' ?>" /></a>
596
  <input type="hidden" name="action" value="save" />
597
  </div>
admin/em-events.php CHANGED
@@ -11,7 +11,7 @@ function em_admin_events_page() {
11
  $action = ( !empty($_GET ['action']) ) ? $_GET ['action']:'';
12
  $order = ( !empty($_GET ['order']) ) ? $_GET ['order']:'ASC';
13
  $limit = ( !empty($_GET['limit']) ) ? $_GET['limit'] : 20;//Default limit
14
- $page = ( !empty($_GET['p']) ) ? $_GET['p']:1;
15
  $offset = ( $page > 1 ) ? ($page-1)*$limit : 0;
16
  $scope_names = array (
17
  'past' => __ ( 'Past events', 'dbem' ),
@@ -108,7 +108,7 @@ function em_admin_events_page() {
108
  -->
109
  <?php
110
  if ( $events_count >= $limit ) {
111
- $page_link_template = em_add_get_params($_SERVER['REQUEST_URI'], array('p'=>'%PAGE%'));
112
  $events_nav .= em_admin_paginate( $page_link_template, $events_count, $limit, $page, 5);
113
  echo $events_nav;
114
  }
@@ -170,11 +170,13 @@ function em_admin_events_page() {
170
  <?php endif; ?>
171
  <?php
172
  if( get_option('dbem_rsvp_enabled') == 1 && $event->rsvp == 1 ){
173
- echo "<br/>";
174
- echo __("Booked Seats",'dbem').": ". $event->get_bookings()->get_booked_seats()."/".$event->seats;
175
- if( get_option('dbem_bookings_approval') == 1 ){
176
- echo " | ". __("Pending",'dbem').": ". $event->get_bookings()->get_pending_seats();
177
- }
 
 
178
  }
179
  ?>
180
  </td>
11
  $action = ( !empty($_GET ['action']) ) ? $_GET ['action']:'';
12
  $order = ( !empty($_GET ['order']) ) ? $_GET ['order']:'ASC';
13
  $limit = ( !empty($_GET['limit']) ) ? $_GET['limit'] : 20;//Default limit
14
+ $page = ( !empty($_GET['pno']) ) ? $_GET['pno']:1;
15
  $offset = ( $page > 1 ) ? ($page-1)*$limit : 0;
16
  $scope_names = array (
17
  'past' => __ ( 'Past events', 'dbem' ),
108
  -->
109
  <?php
110
  if ( $events_count >= $limit ) {
111
+ $page_link_template = em_add_get_params($_SERVER['REQUEST_URI'], array('pno'=>'%PAGE%'));
112
  $events_nav .= em_admin_paginate( $page_link_template, $events_count, $limit, $page, 5);
113
  echo $events_nav;
114
  }
170
  <?php endif; ?>
171
  <?php
172
  if( get_option('dbem_rsvp_enabled') == 1 && $event->rsvp == 1 ){
173
+ ?>
174
+ <br/>
175
+ <a href="<?php bloginfo ( 'wpurl' )?>/wp-admin/admin.php?page=events-manager-bookings&amp;event_id=<?php echo $event->id ?>"><?php echo __("Bookings",'dbem'); ?></a> &ndash;
176
+ <?php _e("Booked",'dbem'); ?>: <?php echo $event->get_bookings()->get_booked_seats()."/".$event->seats; ?>
177
+ <?php if( get_option('dbem_bookings_approval') == 1 ): ?>
178
+ | <?php _e("Pending",'dbem') ?>: <?php echo $event->get_bookings()->get_pending_seats(); ?>
179
+ <?php endif;
180
  }
181
  ?>
182
  </td>
admin/em-locations.php CHANGED
@@ -52,7 +52,7 @@ function em_admin_locations_page() {
52
 
53
  function em_admin_locations($message='', $fill_fields = false) {
54
  $limit = ( !empty($_REQUEST['limit']) ) ? $_REQUEST['limit'] : 20;//Default limit
55
- $page = ( !empty($_REQUEST['p']) ) ? $_REQUEST['p']:1;
56
  $offset = ( $page > 1 ) ? ($page-1)*$limit : 0;
57
  $locations = EM_Locations::get();
58
  $locations_count = count($locations);
@@ -89,7 +89,7 @@ function em_admin_locations($message='', $fill_fields = false) {
89
  if( $locations_count >= $limit ){
90
  //Show the pagination links (unless there's less than 10 events
91
  $page_link_template = preg_replace('/(&|\?)p=\d+/i','',$_SERVER['REQUEST_URI']);
92
- $page_link_template = em_add_get_params($page_link_template, array('p'=>'%PAGE%'));
93
  $locations_nav = em_paginate( $page_link_template, $locations_count, $limit, $page);
94
  echo $locations_nav;
95
  }
52
 
53
  function em_admin_locations($message='', $fill_fields = false) {
54
  $limit = ( !empty($_REQUEST['limit']) ) ? $_REQUEST['limit'] : 20;//Default limit
55
+ $page = ( !empty($_REQUEST['pno']) ) ? $_REQUEST['pno']:1;
56
  $offset = ( $page > 1 ) ? ($page-1)*$limit : 0;
57
  $locations = EM_Locations::get();
58
  $locations_count = count($locations);
89
  if( $locations_count >= $limit ){
90
  //Show the pagination links (unless there's less than 10 events
91
  $page_link_template = preg_replace('/(&|\?)p=\d+/i','',$_SERVER['REQUEST_URI']);
92
+ $page_link_template = em_add_get_params($page_link_template, array('pno'=>'%PAGE%'));
93
  $locations_nav = em_paginate( $page_link_template, $locations_count, $limit, $page);
94
  echo $locations_nav;
95
  }
classes/em-calendar.php CHANGED
@@ -173,30 +173,28 @@ class EM_Calendar extends EM_Object {
173
  // week with the days of that week in the table data
174
 
175
  $i = 0;
176
- $current_date = date('Y-m-d', current_time('timestamp'));
177
- foreach ( $weeks as $week ) {
178
- $calendar .= "<tr>\n";
179
- foreach ( $week as $d ) {
180
  if ($i < $offset_count) { //if it is PREVIOUS month
181
- $calendar .= "<td class='eventless-pre'>" . date ( 'j', $d ) . "</td>\n";
182
- }
183
  if (($i >= $offset_count) && ($i < ($num_weeks * 7) - $outset)) { // if it is THIS month
184
- $fullday = $d;
185
- $d = date ( 'j', $d );
186
- $month_string = ($month < 10) ? '0'.$month : $month;
187
- if ( $current_date == "$year-". $month_string ."-$d" ) {
188
- $calendar .= "<td class='eventless-today'>$d</td>\n";
189
- } else {
190
- $calendar .= "<td class='eventless'>$d</td>\n";
191
- }
192
  } elseif (($outset > 0)) { //if it is NEXT month
193
- if (($i >= ($num_weeks * 7) - $outset)) {
194
- $calendar .= "<td class='eventless-post'>" . date ( 'j', $d ) . "</td>\n";
195
- }
196
- }
197
- $i ++;
198
- }
199
- $calendar .= "</tr>\n";
200
  }
201
 
202
  $calendar .= " </table>\n</div>";
@@ -293,11 +291,11 @@ class EM_Calendar extends EM_Object {
293
 
294
  if($events){
295
  foreach($cells as $cell) {
296
- if ($cell['month'] == $month_pre) {
297
  $calendar = str_replace("<td class='eventless-pre'>".$cell['day']."</td>","<td class='eventful-pre'>".$cell['cell']."</td>",$calendar);
298
- } elseif($cell['month'] == $month_post) {
299
  $calendar = str_replace("<td class='eventless-post'>".$cell['day']."</td>","<td class='eventful-post'>".$cell['cell']."</td>",$calendar);
300
- } elseif( date('Y-m-d', current_time('timestamp')) == $cell['year']."-".$cell['month']."-".$cell['day'] ) {
301
  $calendar = str_replace("<td class='eventless-today'>".$cell['day']."</td>","<td class='eventful-today'>".$cell['cell']."</td>",$calendar);
302
  } elseif( $cell['month'] == $month && $cell['year'] == $year){
303
  $calendar = str_replace("<td class='eventless'>".$cell['day']."</td>","<td class='eventful'>".$cell['cell']."</td>",$calendar);
@@ -355,7 +353,8 @@ class EM_Calendar extends EM_Object {
355
  $defaults = array(
356
  'full' => 0, //Will display a full calendar with event names
357
  'long_events' => 0, //Events that last longer than a day
358
- 'scope' => 'future'
 
359
  );
360
  $atts = parent::get_default_search($defaults, $array);
361
  $atts['full'] = ($atts['full']==true) ? 1:0;
173
  // week with the days of that week in the table data
174
 
175
  $i = 0;
176
+ $current_date = date('Y-m-d', current_time('timestamp'));
177
+ foreach ( $weeks as $week ) {
178
+ $calendar .= "<tr>\n";
179
+ foreach ( $week as $d ) {
180
  if ($i < $offset_count) { //if it is PREVIOUS month
181
+ $calendar .= "<td class='eventless-pre'>" . date ( 'j', $d ) . "</td>\n";
182
+ }
183
  if (($i >= $offset_count) && ($i < ($num_weeks * 7) - $outset)) { // if it is THIS month
184
+ $day = date ( 'j', $d );
185
+ if ( $current_date == date('Y-m-d', $d) ){
186
+ $calendar .= "<td class='eventless-today'>$day</td>\n";
187
+ } else {
188
+ $calendar .= "<td class='eventless'>$day</td>\n";
189
+ }
 
 
190
  } elseif (($outset > 0)) { //if it is NEXT month
191
+ if (($i >= ($num_weeks * 7) - $outset)) {
192
+ $calendar .= "<td class='eventless-post'>" . date ( 'j', $d ) . "</td>\n";
193
+ }
194
+ }
195
+ $i ++;
196
+ }
197
+ $calendar .= "</tr>\n";
198
  }
199
 
200
  $calendar .= " </table>\n</div>";
291
 
292
  if($events){
293
  foreach($cells as $cell) {
294
+ if ($cell['month'] == $month_pre && $cell['year'] == $year_pre) {
295
  $calendar = str_replace("<td class='eventless-pre'>".$cell['day']."</td>","<td class='eventful-pre'>".$cell['cell']."</td>",$calendar);
296
+ } elseif($cell['month'] == $month_post && $cell['year'] == $year_post) {
297
  $calendar = str_replace("<td class='eventless-post'>".$cell['day']."</td>","<td class='eventful-post'>".$cell['cell']."</td>",$calendar);
298
+ } elseif( date('Y-m-j', current_time('timestamp')) == $cell['year']."-".$cell['month']."-".$cell['day'] ) {
299
  $calendar = str_replace("<td class='eventless-today'>".$cell['day']."</td>","<td class='eventful-today'>".$cell['cell']."</td>",$calendar);
300
  } elseif( $cell['month'] == $month && $cell['year'] == $year){
301
  $calendar = str_replace("<td class='eventless'>".$cell['day']."</td>","<td class='eventful'>".$cell['cell']."</td>",$calendar);
353
  $defaults = array(
354
  'full' => 0, //Will display a full calendar with event names
355
  'long_events' => 0, //Events that last longer than a day
356
+ 'scope' => 'future',
357
+ 'owner' => false
358
  );
359
  $atts = parent::get_default_search($defaults, $array);
360
  $atts['full'] = ($atts['full']==true) ? 1:0;
classes/em-calendar.php.bak ADDED
@@ -0,0 +1,369 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class EM_Calendar extends EM_Object {
3
+
4
+ function init(){
5
+ add_action('wp_head', array('EM_Calendar', 'insert_js'));
6
+ }
7
+
8
+ function output($args = array()) {
9
+ global $wpdb;
10
+
11
+ $args = self::get_default_search($args);
12
+ $full = $args['full']; //For ZDE, don't delete pls
13
+ $month = $args['month'];
14
+ $year = $args['year'];
15
+ $long_events = $args['long_events'];
16
+
17
+ $week_starts_on_sunday = get_option('dbem_week_starts_sunday');
18
+ $start_of_week = get_option('start_of_week');
19
+
20
+ if( !(is_numeric($month) && $month <= 12 && $month > 0) ) {
21
+ $month = date('m');
22
+ }
23
+ if( !( is_numeric($year) ) ){
24
+ $year = date('Y');
25
+ }
26
+
27
+ // Get the first day of the month
28
+ $month_start = mktime(0,0,0,$month, 1, $year);
29
+ // Get friendly month name
30
+ $month_name = date('M',$month_start);
31
+ // Figure out which day of the week
32
+ // the month starts on.
33
+ $month_start_day = date('D', $month_start);
34
+
35
+ switch($month_start_day){
36
+ case "Sun": $offset = 0; break;
37
+ case "Mon": $offset = 1; break;
38
+ case "Tue": $offset = 2; break;
39
+ case "Wed": $offset = 3; break;
40
+ case "Thu": $offset = 4; break;
41
+ case "Fri": $offset = 5; break;
42
+ case "Sat": $offset = 6; break;
43
+ }
44
+ //We need to go back to the WP defined day when the week started, in case the event day is near the end
45
+ $offset -= $start_of_week;
46
+ if($offset<0)
47
+ $offset += 7;
48
+
49
+ // determine how many days are in the last month.
50
+ $month_last = $month-1;
51
+ $month_next = $month+1;
52
+ $year_last = $year;
53
+ $year_next = $year;
54
+ if($month == 1) {
55
+ $month_last = 12;
56
+ $year_last = $year -1;
57
+ }
58
+ $num_days_last = self::days_in_month($month_last, $year_last);
59
+
60
+ // determine how many days are in the current month.
61
+ $num_days_current = self::days_in_month($month, $year);
62
+ // Build an array for the current days
63
+ // in the month
64
+ for($i = 1; $i <= $num_days_current; $i++){
65
+ $num_days_array[] = mktime(0,0,0,$month, $i, $year);
66
+ }
67
+ // Build an array for the number of days
68
+ // in last month
69
+ for($i = 1; $i <= $num_days_last; $i++){
70
+ $num_days_last_array[] = mktime(0,0,0,$month_last, $i, $year_last);
71
+ }
72
+ // If the $offset from the starting day of the
73
+ // week happens to be Sunday, $offset would be 0,
74
+ // so don't need an offset correction.
75
+
76
+ if($offset > 0){
77
+ $offset_correction = array_slice($num_days_last_array, -$offset, $offset);
78
+ $new_count = array_merge($offset_correction, $num_days_array);
79
+ $offset_count = count($offset_correction);
80
+ } else { // The else statement is to prevent building the $offset array.
81
+ $offset_count = 0;
82
+ $new_count = $num_days_array;
83
+ }
84
+ // count how many days we have with the two
85
+ // previous arrays merged together
86
+ $current_num = count($new_count);
87
+
88
+ // Since we will have 5 HTML table rows (TR)
89
+ // with 7 table data entries (TD)
90
+ // we need to fill in 35 TDs
91
+ // so, we will have to figure out
92
+ // how many days to appened to the end
93
+ // of the final array to make it 35 days.
94
+
95
+
96
+ if($current_num > 35){
97
+ $num_weeks = 6;
98
+ $outset = (42 - $current_num);
99
+ } elseif($current_num < 35){
100
+ $num_weeks = 5;
101
+ $outset = (35 - $current_num);
102
+ }
103
+ if($current_num == 35){
104
+ $num_weeks = 5;
105
+ $outset = 0;
106
+ }
107
+ // Outset Correction
108
+ for($i = 1; $i <= $outset; $i++){
109
+ $new_count[] = mktime(0,0,0,$month_next, $i, $year_next);
110
+ }
111
+ // Now let's "chunk" the $all_days array
112
+ // into weeks. Each week has 7 days
113
+ // so we will array_chunk it into 7 days.
114
+ $weeks = array_chunk($new_count, 7);
115
+
116
+
117
+
118
+ // Build Previous and Next Links
119
+ $base_link = "?".$_SERVER['QUERY_STRING']."&amp;";
120
+
121
+ $full ? $link_extra_class = "full-link" : $link_extra_class = '';
122
+ //Get an array of arguments that don't include default valued args
123
+ $link_args = self::get_link_args($args);
124
+
125
+ //Get the previous link
126
+ if($month == 1){
127
+ $back_month = 12;
128
+ $back_year = $year-1;
129
+ } else {
130
+ $back_month = $month -1;
131
+ $back_year = $year;
132
+ }
133
+ $previous_link = "<a class='em-calnav $link_extra_class' href='?ajaxCalendar=1&amp;month={$back_month}&amp;year={$back_year}&amp;{$link_args}'>&lt;&lt;</a>";
134
+
135
+ //Now the next
136
+ if($month == 12){
137
+ $next_month = 1;
138
+ $next_year = $year+1;
139
+ } else {
140
+ $next_month = $month + 1;
141
+ $next_year = $year;
142
+ }
143
+ $next_link = "<a class='em-calnav $link_extra_class' href='?ajaxCalendar=1&amp;month={$next_month}&amp;year={$next_year}&amp;{$link_args}'>&gt;&gt;</a>";
144
+
145
+
146
+ $class = ($full) ? 'dbem-calendar-full' : 'dbem-calendar';
147
+ $calendar="<div class='$class'><div style='display:none' class='month_n'>$month</div><div class='year_n' style='display:none' >$year</div>";
148
+
149
+ $weekdays = array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
150
+ $n = 0 ;
151
+ while( $n < $start_of_week ) {
152
+ $last_day = array_shift($weekdays);
153
+ $weekdays[]= $last_day;
154
+ $n++;
155
+ }
156
+
157
+ $days_initials = "";
158
+ foreach($weekdays as $weekday) {
159
+ $days_initials .= "<td>".self::translate_and_trim($weekday)."</td>";
160
+ }
161
+ $full ? $fullclass = 'fullcalendar' : $fullclass='';
162
+ // Build the heading portion of the calendar table
163
+ $calendar .= "<table class='dbem-calendar-table $fullclass'>\n".
164
+ "<thead>\n<tr>\n".
165
+ "<td>$previous_link</td><td class='month_name' colspan='5'>". apply_filters('dbem_calendar_output_month', ucfirst(date_i18n('M', $month_start)), $month_start, $args)." $year</td><td>$next_link</td>\n".
166
+ "</tr>\n</thead>\n".
167
+ "<tr class='days-names'>\n".
168
+ $days_initials.
169
+ "</tr>\n";
170
+
171
+ // Now we break each key of the array
172
+ // into a week and create a new table row for each
173
+ // week with the days of that week in the table data
174
+
175
+ $i = 0;
176
+ $current_date = date('Y-m-d', current_time('timestamp'));
177
+ foreach ( $weeks as $week ) {
178
+ $calendar .= "<tr>\n";
179
+ foreach ( $week as $d ) {
180
+ if ($i < $offset_count) { //if it is PREVIOUS month
181
+ $calendar .= "<td class='eventless-pre'>" . date ( 'j', $d ) . "</td>\n";
182
+ }
183
+ if (($i >= $offset_count) && ($i < ($num_weeks * 7) - $outset)) { // if it is THIS month
184
+ $fullday = $d;
185
+ $d = date ( 'j', $d );
186
+ $day_string = ($d < 10) ? '0'.$d : $d;
187
+ $month_string = ($month < 10) ? '0'.$month : $month;
188
+ if ( $current_date == "$year-". $month_string ."-$day_string" ) {
189
+ $calendar .= "<td class='eventless-today'>$d</td>\n";
190
+ } else {
191
+ $calendar .= "<td class='eventless'>$d</td>\n";
192
+ }
193
+ } elseif (($outset > 0)) { //if it is NEXT month
194
+ if (($i >= ($num_weeks * 7) - $outset)) {
195
+ $calendar .= "<td class='eventless-post'>" . date ( 'j', $d ) . "</td>\n";
196
+ }
197
+ }
198
+ $i ++;
199
+ }
200
+ $calendar .= "</tr>\n";
201
+ }
202
+
203
+ $calendar .= " </table>\n</div>";
204
+
205
+ // query the database for events in this time span
206
+ if ($month == 1) {
207
+ $month_pre=12;
208
+ $month_post=2;
209
+ $year_pre=$year-1;
210
+ $year_post=$year;
211
+ } elseif($month == 12) {
212
+ $month_pre=11;
213
+ $month_post=1;
214
+ $year_pre=$year;
215
+ $year_post=$year+1;
216
+ } else {
217
+ $month_pre=$month-1;
218
+ $month_post=$month+1;
219
+ $year_pre=$year;
220
+ $year_post=$year;
221
+ }
222
+ $args['year'] = array($year_pre, $year_post);
223
+ $args['month'] = array($month_pre, $month_post);
224
+ $events = EM_Events::get($args);
225
+
226
+ $eventful_days= array();
227
+ if($events){
228
+ //Go through the events and slot them into the right d-m index
229
+ foreach($events as $event) {
230
+ $event = apply_filters('em_calendar_output_loop_start', $event);
231
+ if( $long_events ){
232
+ //If $long_events is set then show a date as eventful if there is an multi-day event which runs during that day
233
+ $event_start_date = mktime(0,0,0,$month_pre,1,$year_pre);
234
+ $event_end_date = mktime(0,0,0,$month_post,date('t', $event_start_date),$year_post );
235
+ if( $event_end_date == '' ) $event_end_date = $event_start_date;
236
+ while( $event_start_date <= $event->end ){
237
+ //Ensure date is within event dates, if so add to eventful days array
238
+ if( $event_start_date > $event->start - (86400) ){ //subtract a day since start may be later in day
239
+ $event_eventful_date = date('Y-m-d', $event_start_date);
240
+ if( array_key_exists($event_eventful_date, $eventful_days) && is_array($eventful_days[$event_eventful_date]) ){
241
+ $eventful_days[$event_eventful_date][] = $event;
242
+ } else {
243
+ $eventful_days[$event_eventful_date] = array($event);
244
+ }
245
+ }
246
+ $event_start_date += (86400); //add a day
247
+ }
248
+ }else{
249
+ //Only show events on the day that they start
250
+ if( isset($eventful_days[$event->start_date]) && is_array($eventful_days[$event->start_date]) ){
251
+ $eventful_days[$event->start_date][] = $event;
252
+ } else {
253
+ $eventful_days[$event->start_date] = array($event);
254
+ }
255
+ }
256
+ $event = apply_filters('em_calendar_output_loop_end', $event);
257
+ }
258
+ }
259
+
260
+ $event_format = get_option('dbem_full_calendar_event_format');
261
+ $event_title_format = get_option('dbem_small_calendar_event_title_format');
262
+ $event_title_separator_format = get_option('dbem_small_calendar_event_title_separator');
263
+ $cells = array() ;
264
+ foreach($eventful_days as $day_key => $events) {
265
+ //Set the date into the key
266
+ $event_start_date = explode('-', $day_key);
267
+ $cells[$day_key]['day'] = ltrim($event_start_date[2],'0');
268
+ $cells[$day_key]['month'] = $event_start_date[1];
269
+ $cells[$day_key]['year'] = $event_start_date[0];
270
+ $events_titles = array();
271
+ foreach($events as $event) {
272
+ $events_titles[] = $event->output($event_title_format);
273
+ }
274
+ $link_title = implode( $event_title_separator_format, $events_titles);
275
+
276
+ $events_page_id = get_option('dbem_events_page');
277
+ $event_page_link = get_permalink($events_page_id);
278
+ if (stristr($event_page_link, "?"))
279
+ $joiner = "&amp;";
280
+ else
281
+ $joiner = "?";
282
+
283
+
284
+ $cells[$day_key]['cell'] = "<a title='$link_title' href='".$event_page_link.$joiner."calendar_day={$day_key}'>{$cells[$day_key]['day']}</a>";
285
+ if ($full) {
286
+ $cells[$day_key]['cell'] .= "<ul>";
287
+
288
+ foreach($events as $event) {
289
+ $cells[$day_key]['cell'] .= $event->output($event_format);
290
+ }
291
+ $cells[$day_key]['cell'] .= "</ul>";
292
+ }
293
+ }
294
+
295
+ if($events){
296
+ foreach($cells as $cell) {
297
+ if ($cell['month'] == $month_pre) {
298
+ $calendar = str_replace("<td class='eventless-pre'>".$cell['day']."</td>","<td class='eventful-pre'>".$cell['cell']."</td>",$calendar);
299
+ } elseif($cell['month'] == $month_post) {
300
+ $calendar = str_replace("<td class='eventless-post'>".$cell['day']."</td>","<td class='eventful-post'>".$cell['cell']."</td>",$calendar);
301
+ } elseif( date('Y-m-d', current_time('timestamp')) == $cell['year']."-".$cell['month']."-".$cell['day'] ) {
302
+ $calendar = str_replace("<td class='eventless-today'>".$cell['day']."</td>","<td class='eventful-today'>".$cell['cell']."</td>",$calendar);
303
+ } elseif( $cell['month'] == $month && $cell['year'] == $year){
304
+ $calendar = str_replace("<td class='eventless'>".$cell['day']."</td>","<td class='eventful'>".$cell['cell']."</td>",$calendar);
305
+ }
306
+ }
307
+ }
308
+ return apply_filters('em_calendar_output', '<div id="em-calendar-'.rand(100,200).'" class="em-calendar-wrapper">'.$calendar.'</div>');
309
+ }
310
+
311
+ /**
312
+ * Echoes the calendar external JS contents directly into the head of the document
313
+ * @return unknown_type
314
+ */
315
+ function insert_js() {
316
+ ?>
317
+ <script type='text/javascript'>
318
+ <?php include(WP_PLUGIN_DIR.'/events-manager/includes/js/em_calendar_ajax.js'); ?>
319
+ </script>
320
+ <?php
321
+ }
322
+
323
+
324
+ function days_in_month($month, $year) {
325
+ return date('t', mktime(0,0,0,$month,1,$year));
326
+ }
327
+
328
+ function translate_and_trim($string, $length = 1) {
329
+ return substr(__($string), 0, $length);
330
+ }
331
+
332
+ /**
333
+ * Helper function to create a link querystring from array which contains arguments with only values that aren't defuaults.
334
+ */
335
+ function get_link_args($args = array(), $html_entities=true){
336
+ unset($args['month']); unset($args['year']);
337
+ $default_args = self::get_default_search(array());
338
+ foreach($default_args as $arg_key => $arg_value){
339
+ if( !isset($args[$arg_key]) || $args[$arg_key] == $arg_value ){
340
+ unset($args[$arg_key]);
341
+ }
342
+ }
343
+ $qs_array = array();
344
+ foreach($args as $key => $value){
345
+ if(is_array($value)){
346
+ $value = implode(',',$value);
347
+ }
348
+ $qs_array[] = "$key=".urlencode($value);
349
+ }
350
+ return ($html_entities) ? implode('&amp;', $qs_array) : implode('&', $qs_array);
351
+ }
352
+
353
+
354
+ function get_default_search($array=array()){
355
+ //These defaults aren't for db queries, but flags for what to display in calendar output
356
+ $defaults = array(
357
+ 'full' => 0, //Will display a full calendar with event names
358
+ 'long_events' => 0, //Events that last longer than a day
359
+ 'scope' => 'future',
360
+ 'owner' => false
361
+ );
362
+ $atts = parent::get_default_search($defaults, $array);
363
+ $atts['full'] = ($atts['full']==true) ? 1:0;
364
+ $atts['long_events'] = ($atts['long_events']==true) ? 1:0;
365
+ return apply_filters('em_calendar_get_default_search', $atts, $array, $defaults);
366
+ }
367
+ }
368
+ add_action('init', array('EM_Calendar', 'init'));
369
+ ?>
classes/em-event.php CHANGED
@@ -65,12 +65,21 @@ class EM_Event extends EM_Object{
65
  * @var int
66
  */
67
  var $start;
68
-
69
  /**
70
  * Timestamp of end date/time
71
  * @var int
72
  */
73
  var $end;
 
 
 
 
 
 
 
 
 
 
74
 
75
  /**
76
  * @var EM_Location
@@ -151,6 +160,8 @@ class EM_Event extends EM_Object{
151
  //Start/End times should be available as timestamp
152
  $this->start = strtotime($this->start_date." ".$this->start_time);
153
  $this->end = strtotime($this->end_date." ".$this->end_time);
 
 
154
 
155
  //Add Contact Person
156
  if($this->contactperson_id){
@@ -508,7 +519,7 @@ class EM_Event extends EM_Object{
508
  switch( $result ){
509
  //Event Details
510
  case '#_EVENTID':
511
- $replace = $this->name;
512
  break;
513
  case '#_NAME':
514
  $replace = $this->name;
65
  * @var int
66
  */
67
  var $start;
 
68
  /**
69
  * Timestamp of end date/time
70
  * @var int
71
  */
72
  var $end;
73
+ /**
74
+ * Created on timestamp, taken from DB, converted to TS
75
+ * @var int
76
+ */
77
+ var $created;
78
+ /**
79
+ * Created on timestamp, taken from DB, converted to TS
80
+ * @var int
81
+ */
82
+ var $modified;
83
 
84
  /**
85
  * @var EM_Location
160
  //Start/End times should be available as timestamp
161
  $this->start = strtotime($this->start_date." ".$this->start_time);
162
  $this->end = strtotime($this->end_date." ".$this->end_time);
163
+ $this->modified = strtotime($event['event_date_modified']);
164
+ $this->created = strtotime($event['event_date_created']);
165
 
166
  //Add Contact Person
167
  if($this->contactperson_id){
519
  switch( $result ){
520
  //Event Details
521
  case '#_EVENTID':
522
+ $replace = $this->id;
523
  break;
524
  case '#_NAME':
525
  $replace = $this->name;
em-functions.php CHANGED
@@ -7,9 +7,15 @@
7
  * @return boolean
8
  */
9
  function em_verify_admin( $user_id = false ){
10
- return is_super_admin($user_id);
 
 
 
 
 
11
  }
12
 
 
13
  /**
14
  * Intro paragraph to new users.
15
  */
7
  * @return boolean
8
  */
9
  function em_verify_admin( $user_id = false ){
10
+ if(function_exists('is_super_admin')){
11
+ return is_super_admin($user_id);
12
+ }elseif( current_user_can('delete_posts') ){
13
+ return true;
14
+ }
15
+ return false;
16
  }
17
 
18
+
19
  /**
20
  * Intro paragraph to new users.
21
  */
em-ical.php ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * generates an ical feed on init if url is correct
4
+ */
5
+ function em_ical( $regenerate = false ){
6
+ $cal_file_request = preg_match('/calendar.ics/', $_SERVER['REQUEST_URI']); //are we askig for the ics file directly but doesn't exist?
7
+ if ( !empty( $_REQUEST['em_ical']) || $cal_file_request || $regenerate ) {
8
+
9
+ //send headers
10
+ if( $_REQUEST['em_ical'] != '2' && !$regenerate ){
11
+ header('Content-type: text/calendar; charset=utf-8');
12
+ header('Content-Disposition: inline; filename="calendar.ics"');
13
+ }
14
+
15
+ ob_start();
16
+ $description_format = str_replace ( ">", "&gt;", str_replace ( "<", "&lt;", get_option ( 'dbem_ical_description_format' ) ) );
17
+ $events = EM_Events::get( array( get_option('dbem_ical_limit'), 'owner'=>false, 'orderby'=>'event_start_date' ) );
18
+
19
+ $blog_desc = ent2ncr(convert_chars(strip_tags(get_bloginfo()))) . " - " . __('Calendar','dbem');
20
+
21
+ echo "BEGIN:VCALENDAR
22
+ METHOD:PUBLISH
23
+ CALSCALE:GREGORIAN
24
+ VERSION:2.0
25
+ PRODID:-//Events Manager//1.0//EN
26
+ X-WR-CALNAME:{$blog_desc}";
27
+ /* @var EM_Event $EM_Event */
28
+ foreach ( $events as $EM_Event ) {
29
+
30
+ $description = $EM_Event->output($description_format);
31
+ $description = ent2ncr(convert_chars(strip_tags($description)));
32
+
33
+ $dateStart = date('Ymd\THis\Z',$EM_Event->start);
34
+ $dateEnd = date('Ymd\THis\Z',$EM_Event->end);
35
+ $dateModified = date('Ymd\THis\Z', $EM_Event->modified);
36
+
37
+ $location = $EM_Event->output('#_LOCATION');
38
+ $location = ent2ncr(convert_chars(strip_tags($location)));
39
+
40
+ $categories = $EM_Event->category->name;
41
+
42
+ //FIXME we need a modified date for events
43
+ echo "
44
+ BEGIN:VEVENT
45
+ UID:{$EM_Event->id}
46
+ DTSTART:{$dateStart}
47
+ DTEND:{$dateEnd}
48
+ DTSTAMP:{$dateModified}
49
+ ORGANIZER:MAILTO:{$EM_Event->contact->user_email}
50
+ CATEGORIES:{$categories}
51
+ LOCATION:{$location}
52
+ SUMMARY:{$description}
53
+ END:VEVENT";
54
+ }
55
+ echo "\r\n"."END:VCALENDAR";
56
+
57
+ $calendar = ob_get_clean(); //get the contents to output
58
+
59
+ //let's create a cache file
60
+ if($regenerate || $cal_file_request){
61
+ $file = fopen( ABSPATH . "/caleadar.ics", 'w');
62
+ if($file){
63
+ fwrite($file, $calendar, strlen($calendar));
64
+ fclose($file);
65
+ }
66
+ }
67
+ if($regenerate){
68
+ return ($file == true);
69
+ }
70
+ echo $calendar;
71
+ die ();
72
+ }
73
+ }
74
+ add_action ( 'init', 'em_ical' );
75
+
76
+ function em_update_ical($result, $EM_Event){
77
+ em_ical(true);
78
+ }
79
+ add_filter('em_event_save','em_update_ical', 1, 2);
80
+ ?>
em-install.php CHANGED
@@ -58,6 +58,8 @@ function em_create_events_table() {
58
  recurrence_id bigint(20) unsigned NULL,
59
  event_category_id bigint(20) unsigned NULL DEFAULT NULL,
60
  event_attributes text NULL,
 
 
61
  recurrence bool NOT NULL DEFAULT 0,
62
  recurrence_interval int(4) NULL DEFAULT NULL,
63
  recurrence_freq tinytext NULL DEFAULT NULL,
@@ -81,6 +83,9 @@ function em_create_events_table() {
81
  }else{
82
  dbDelta($sql);
83
  }
 
 
 
84
  }
85
 
86
  function em_create_events_meta_table(){
@@ -205,7 +210,7 @@ function em_add_options() {
205
  $contact_person_email_body_localizable = __("#_BOOKINGNAME (#_BOOKINGEMAIL) will attend #_NAME on #F #j, #Y. He wants to reserve #_BOOKINGSPACES spaces.<br/> Now there are #_BOOKEDSPACES spaces reserved, #_AVAILABLESPACES are still available.<br/>Yours faithfully,<br/>Events Manager - http://wp-events-plugin.com",'dbem').__('<br/><br/>-------------------------------<br/>Powered by Events Manager - http://wp-events-plugin.com','dbem');
206
  $contact_person_email_cancelled_body_localizable = __("#_BOOKINGNAME (#_BOOKINGEMAIL) cancelled his booking at #_NAME on #F #j, #Y. He wanted to reserve #_BOOKINGSPACES spaces.<br/> Now there are #_BOOKEDSPACES spaces reserved, #_AVAILABLESPACES are still available.<br/>Yours faithfully,<br/>Events Manager - http://wp-events-plugin.com",'dbem').__('<br/><br/>-------------------------------<br/>Powered by Events Manager - http://wp-events-plugin.com','dbem');
207
  $respondent_email_body_localizable = __("Dear #_BOOKINGNAME, <br/>you have successfully reserved #_BOOKINGSPACES space/spaces for #_NAME.<br/>Yours faithfully,<br/>#_CONTACTNAME",'dbem').__('<br/><br/>-------------------------------<br/>Powered by Events Manager - http://wp-events-plugin.com','dbem');
208
- $respondent_email_pending_body_localizable = __("Dear #_BOOKINGNAME, <br/>You have requested #_BOOKEDSPACES space/spaces for #_NAME.<br/>Your booking is currently pending approval by our administrators. Once approved you will receive an automatic confrimation.<br/>Yours faithfully,<br/>#_CONTACTNAME",'dbem').__('<br/><br/>-------------------------------<br/>Powered by Events Manager - http://wp-events-plugin.com','dbem');
209
  $respondent_email_rejected_body_localizable = __("Dear #_BOOKINGNAME, <br/>Your requested booking for #_BOOKINGSPACES spaces at #_NAME on #F #j, #Y has been rejected.<br/>Yours faithfully,<br/>#_CONTACTNAME",'dbem').__('<br/><br/>-------------------------------<br/>Powered by Events Manager - http://wp-events-plugin.com','dbem');
210
  $respondent_email_cancelled_body_localizable = __("Dear #_BOOKINGNAME, <br/>Your requested booking for #_BOOKINGSPACES spaces at #_NAME on #F #j, #Y has been cancelled.<br/>Yours faithfully,<br/>#_CONTACTNAME",'dbem').__('<br/><br/>-------------------------------<br/>Powered by Events Manager - http://wp-events-plugin.com','dbem');
211
 
@@ -234,10 +239,19 @@ function em_add_options() {
234
  'dbem_location_no_events_message' => __('<li>No events in this location</li>', 'dbem'),
235
  'dbem_single_location_format' => '<p>#_LOCATIONADDRESS</p><p>#_LOCATIONTOWN</p>',
236
  //RSS Stuff
 
 
237
  'dbem_rss_main_title' => get_bloginfo('title')." - ".__('Events'),
238
  'dbem_rss_main_description' => get_bloginfo('description')." - ".__('Events'),
239
  'dbem_rss_description_format' => "#j #M #y - #H:#i <br/>#_LOCATION <br/>#_LOCATIONADDRESS <br/>#_LOCATIONTOWN",
240
  'dbem_rss_title_format' => "#_NAME",
 
 
 
 
 
 
 
241
  //Google Maps
242
  'dbem_gmap_is_active'=> 1,
243
  'dbem_location_baloon_format' => "<strong>#_LOCATIONNAME</strong><br/>#_LOCATIONADDRESS - #_LOCATIONTOWN<br/><a href='#_LOCATIONPAGEURL'>Details</a>",
@@ -273,17 +287,17 @@ function em_add_options() {
273
  'dbem_disable_title_rewrites'=> false,
274
  'dbem_title_html' => '<h2>#_PAGETITLE</h2>',
275
  //Bookings
276
- 'dbem_bookings_approval' => 1,
 
277
  'dbem_bookings_notify_admin' => 0,
278
- 'dbem_default_contact_person' => 1,
279
  'dbem_bookings_contact_email' => 1,
280
- 'dbem_contactperson_email_subject' => __("New booking",'dbem'),
281
- 'dbem_contactperson_email_body' => str_replace("<br/>", "\n\r", $contact_person_email_body_localizable),
282
  'dbem_contactperson_email_cancelled_subject' => __("Booking Cancelled",'dbem'),
283
  'dbem_contactperson_email_cancelled_body' => str_replace("<br/>", "\n\r", $contact_person_email_cancelled_body_localizable),
284
- 'dbem_bookings_email_pending_subject' => __("Reservation Pending",'dbem'),
285
  'dbem_bookings_email_pending_body' => str_replace("<br/>", "\n\r", $respondent_email_pending_body_localizable),
286
- 'dbem_bookings_email_rejected_subject' => __("Reservation Rejected",'dbem'),
287
  'dbem_bookings_email_rejected_body' => str_replace("<br/>", "\n\r", $respondent_email_rejected_body_localizable),
288
  'dbem_bookings_email_confirmed_subject' => __('Booking Confirmed','dbem'),
289
  'dbem_bookings_email_confirmed_body' => str_replace("<br/>", "\n\r", $respondent_email_body_localizable),
@@ -311,14 +325,9 @@ function em_add_options() {
311
  if( get_option('dbem_respondent_email_body') != '' ){
312
  update_option('dbem_bookings_email_confirmed_body', get_option('dbem_respondent_email_body'));
313
  }
 
314
  update_option('dbem_bookings_contact_email_subject', get_option('dbem_contactperson_email_subject'));
315
  update_option('dbem_bookings_contact_email_body', get_option('dbem_contactperson_email_body'));
316
- /* deleted options (won't do this in case some need to revert)
317
- delete_option('dbem_rsvp_notify_contact');
318
- delete_option('dbem_contactperson_email_subject');
319
- delete_option('dbem_contactperson_email_body');
320
- delete_option('dbem_respondent_email_body');
321
- */
322
  }
323
  }
324
 
58
  recurrence_id bigint(20) unsigned NULL,
59
  event_category_id bigint(20) unsigned NULL DEFAULT NULL,
60
  event_attributes text NULL,
61
+ event_date_created datetime NULL,
62
+ event_date_modified datetime NULL,
63
  recurrence bool NOT NULL DEFAULT 0,
64
  recurrence_interval int(4) NULL DEFAULT NULL,
65
  recurrence_freq tinytext NULL DEFAULT NULL,
83
  }else{
84
  dbDelta($sql);
85
  }
86
+ if( get_option('dbem_version') != '' && get_option('dbem_version') <= 3.092){
87
+ $wpdb->query("UPDATE $table_name SET event_date_created='".current_time('mysql')."', event_date_modified='".current_time('mysql')."'");
88
+ }
89
  }
90
 
91
  function em_create_events_meta_table(){
210
  $contact_person_email_body_localizable = __("#_BOOKINGNAME (#_BOOKINGEMAIL) will attend #_NAME on #F #j, #Y. He wants to reserve #_BOOKINGSPACES spaces.<br/> Now there are #_BOOKEDSPACES spaces reserved, #_AVAILABLESPACES are still available.<br/>Yours faithfully,<br/>Events Manager - http://wp-events-plugin.com",'dbem').__('<br/><br/>-------------------------------<br/>Powered by Events Manager - http://wp-events-plugin.com','dbem');
211
  $contact_person_email_cancelled_body_localizable = __("#_BOOKINGNAME (#_BOOKINGEMAIL) cancelled his booking at #_NAME on #F #j, #Y. He wanted to reserve #_BOOKINGSPACES spaces.<br/> Now there are #_BOOKEDSPACES spaces reserved, #_AVAILABLESPACES are still available.<br/>Yours faithfully,<br/>Events Manager - http://wp-events-plugin.com",'dbem').__('<br/><br/>-------------------------------<br/>Powered by Events Manager - http://wp-events-plugin.com','dbem');
212
  $respondent_email_body_localizable = __("Dear #_BOOKINGNAME, <br/>you have successfully reserved #_BOOKINGSPACES space/spaces for #_NAME.<br/>Yours faithfully,<br/>#_CONTACTNAME",'dbem').__('<br/><br/>-------------------------------<br/>Powered by Events Manager - http://wp-events-plugin.com','dbem');
213
+ $respondent_email_pending_body_localizable = __("Dear #_BOOKINGNAME, <br/>You have requested #_BOOKEDSPACES space/spaces for #_NAME.<br/>Your booking is currently pending approval by our administrators. Once approved you will receive an automatic confirmation.<br/>Yours faithfully,<br/>#_CONTACTNAME",'dbem').__('<br/><br/>-------------------------------<br/>Powered by Events Manager - http://wp-events-plugin.com','dbem');
214
  $respondent_email_rejected_body_localizable = __("Dear #_BOOKINGNAME, <br/>Your requested booking for #_BOOKINGSPACES spaces at #_NAME on #F #j, #Y has been rejected.<br/>Yours faithfully,<br/>#_CONTACTNAME",'dbem').__('<br/><br/>-------------------------------<br/>Powered by Events Manager - http://wp-events-plugin.com','dbem');
215
  $respondent_email_cancelled_body_localizable = __("Dear #_BOOKINGNAME, <br/>Your requested booking for #_BOOKINGSPACES spaces at #_NAME on #F #j, #Y has been cancelled.<br/>Yours faithfully,<br/>#_CONTACTNAME",'dbem').__('<br/><br/>-------------------------------<br/>Powered by Events Manager - http://wp-events-plugin.com','dbem');
216
 
239
  'dbem_location_no_events_message' => __('<li>No events in this location</li>', 'dbem'),
240
  'dbem_single_location_format' => '<p>#_LOCATIONADDRESS</p><p>#_LOCATIONTOWN</p>',
241
  //RSS Stuff
242
+ 'dbem_rss_limit' => 10,
243
+ 'dbem_rss_scope' => 'future',
244
  'dbem_rss_main_title' => get_bloginfo('title')." - ".__('Events'),
245
  'dbem_rss_main_description' => get_bloginfo('description')." - ".__('Events'),
246
  'dbem_rss_description_format' => "#j #M #y - #H:#i <br/>#_LOCATION <br/>#_LOCATIONADDRESS <br/>#_LOCATIONTOWN",
247
  'dbem_rss_title_format' => "#_NAME",
248
+ //iCal Stuff
249
+ 'dbem_ical_limit' => 10,
250
+ 'dbem_ical_scope' => 'future',
251
+ 'dbem_ical_main_title' => get_bloginfo('title')." - ".__('Events'),
252
+ 'dbem_ical_main_description' => get_bloginfo('description'),
253
+ 'dbem_ical_description_format' => "#_NAME - #_LOCATIONNAME - #j #M #y #H:#i",
254
+ 'dbem_ical_title_format' => "#_NAME",
255
  //Google Maps
256
  'dbem_gmap_is_active'=> 1,
257
  'dbem_location_baloon_format' => "<strong>#_LOCATIONNAME</strong><br/>#_LOCATIONADDRESS - #_LOCATIONTOWN<br/><a href='#_LOCATIONPAGEURL'>Details</a>",
287
  'dbem_disable_title_rewrites'=> false,
288
  'dbem_title_html' => '<h2>#_PAGETITLE</h2>',
289
  //Bookings
290
+ 'dbem_default_contact_person' => 1, //admin
291
+ 'dbem_bookings_approval' => 1, //approval is on by default
292
  'dbem_bookings_notify_admin' => 0,
 
293
  'dbem_bookings_contact_email' => 1,
294
+ 'dbem_bookings_contact_email_subject' => __("New booking",'dbem'),
295
+ 'dbem_bookings_contact_email_body' => str_replace("<br/>", "\n\r", $contact_person_email_body_localizable),
296
  'dbem_contactperson_email_cancelled_subject' => __("Booking Cancelled",'dbem'),
297
  'dbem_contactperson_email_cancelled_body' => str_replace("<br/>", "\n\r", $contact_person_email_cancelled_body_localizable),
298
+ 'dbem_bookings_email_pending_subject' => __("Booking Pending",'dbem'),
299
  'dbem_bookings_email_pending_body' => str_replace("<br/>", "\n\r", $respondent_email_pending_body_localizable),
300
+ 'dbem_bookings_email_rejected_subject' => __("Booking Rejected",'dbem'),
301
  'dbem_bookings_email_rejected_body' => str_replace("<br/>", "\n\r", $respondent_email_rejected_body_localizable),
302
  'dbem_bookings_email_confirmed_subject' => __('Booking Confirmed','dbem'),
303
  'dbem_bookings_email_confirmed_body' => str_replace("<br/>", "\n\r", $respondent_email_body_localizable),
325
  if( get_option('dbem_respondent_email_body') != '' ){
326
  update_option('dbem_bookings_email_confirmed_body', get_option('dbem_respondent_email_body'));
327
  }
328
+ }elseif( get_option('dbem_version') != '' && get_option('dbem_version') <= 3.092 ){
329
  update_option('dbem_bookings_contact_email_subject', get_option('dbem_contactperson_email_subject'));
330
  update_option('dbem_bookings_contact_email_body', get_option('dbem_contactperson_email_body'));
 
 
 
 
 
 
331
  }
332
  }
333
 
em-rss.php CHANGED
@@ -14,7 +14,7 @@ function em_rss() {
14
 
15
  <?php
16
  $description_format = str_replace ( ">", "&gt;", str_replace ( "<", "&lt;", get_option ( 'dbem_rss_description_format' ) ) );
17
- $events = EM_Events::get( array('limit'=>5) );
18
  foreach ( $events as $event ) {
19
  $description = $event->output( get_option ( 'dbem_rss_description_format' ), "rss");
20
  $description = ent2ncr(convert_chars(strip_tags($description))); //Some RSS filtering
14
 
15
  <?php
16
  $description_format = str_replace ( ">", "&gt;", str_replace ( "<", "&lt;", get_option ( 'dbem_rss_description_format' ) ) );
17
+ $events = EM_Events::get( array('limit'=>5, 'owner'=>false) );
18
  foreach ( $events as $event ) {
19
  $description = $event->output( get_option ( 'dbem_rss_description_format' ), "rss");
20
  $description = ent2ncr(convert_chars(strip_tags($description))); //Some RSS filtering
events-manager.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  Plugin Name: Events Manager
4
- Version: 3.0.92
5
  Plugin URI: http://wp-events-plugin.com
6
  Description: Manage events specifying precise spatial data (Location, Town, Province, etc).
7
  Author: Davide Benini, Marcus Sykes
@@ -94,7 +94,7 @@ if( is_admin() ){
94
 
95
 
96
  // Setting constants
97
- define('EM_VERSION', 3.091); //self expanatory
98
  define('EM_CATEGORIES_TABLE', 'em_categories'); //TABLE NAME
99
  define('EM_EVENTS_TABLE','em_events'); //TABLE NAME
100
  define('EM_META_TABLE','em_meta'); //TABLE NAME
1
  <?php
2
  /*
3
  Plugin Name: Events Manager
4
+ Version: 3.0.93
5
  Plugin URI: http://wp-events-plugin.com
6
  Description: Manage events specifying precise spatial data (Location, Town, Province, etc).
7
  Author: Davide Benini, Marcus Sykes
94
 
95
 
96
  // Setting constants
97
+ define('EM_VERSION', 3.093); //self expanatory
98
  define('EM_CATEGORIES_TABLE', 'em_categories'); //TABLE NAME
99
  define('EM_EVENTS_TABLE','em_events'); //TABLE NAME
100
  define('EM_META_TABLE','em_meta'); //TABLE NAME
readme.txt CHANGED
@@ -4,23 +4,38 @@ Donate link: http://wp-events-plugin.com
4
  Tags: events, manager, calendar, gigs, concert, maps, geotagging, rsvp
5
  Requires at least: 2.9
6
  Tested up to: 3.0.4
7
- Stable tag: 3.0.92
8
 
9
- Manage events and display them in your blog. Includes recurring events, location management, calendar, Google map integration, RSVP.
10
 
11
  == Description ==
12
 
13
- Events Manager 3.0 is a full-featured event management solution for Wordpress. Events Manager supports recurring events, venues data, RSVP and maps. With Events Manager you can plan and publish your tour, or let people reserve spaces for your weekly meetings. You can then add events list, calendars and description to your blog using a sidebar widget or shortcodes; if you’re web designer you can simply employ the template tags provided by Events Manager.
14
-
15
- Events Manager integrates with Google Maps; thanks the geocoding, Events Manager can find the location of your events, and accordingly display a map. Now there's no need for Google Maps API keys, as we are now using their new v3 API.
16
-
17
- Events Manager provides also a RSS feed, to keep your subscribers updated about the events you're organising.
18
-
19
- Events manager is fully customisable; you can customise the amount of data displayed and their format in events lists, pages and in the RSS feed. You can choose to show or hide the events page, and change its title.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
 
21
  Events Manager is fully localisable and already localised in Italian, Spanish, German and Swedish.
22
 
23
- For more information visit the [Documentation Page](http://wp-events-plugin.com/documentation/) and [Support Forum](http://wp-events-plugin.com/forums/).
24
 
25
  == Installation ==
26
 
@@ -107,6 +122,17 @@ At this stage, Events Manager is only available in English and Italian. Yet, the
107
 
108
  == Change Log ==
109
 
 
 
 
 
 
 
 
 
 
 
 
110
  = 3.0.92 =
111
  * Fixed permission issue
112
  * Fixed category not saving
4
  Tags: events, manager, calendar, gigs, concert, maps, geotagging, rsvp
5
  Requires at least: 2.9
6
  Tested up to: 3.0.4
7
+ Stable tag: 3.0.93
8
 
9
+ Fully featured events management. Includes recurring events, location management, calendar, Google map integration, booking management, and more.
10
 
11
  == Description ==
12
 
13
+ Events Manager 3.0 is a full-featured event management solution for Wordpress based on the principles of flexibility, reliability and powerful features!
14
+
15
+ Main Features
16
+
17
+ * Easy event creation (single day with start/end times)
18
+ * Recurring and long (multi-day) events
19
+ * Assign event locations and view events by location
20
+ * Event categories
21
+ * Easily create custom event attributes (e.g. dress code)
22
+ * Bookings Management (including approval/rejections, export CVS, and more!)
23
+ * Google Map integration straight out the box!
24
+ * Advanced permissions - restrict user management of events.
25
+ * Sidebars to display your events and locations
26
+ * Calendaring widgets show your events in an AJAX calendar format
27
+ * Fine grained control of how every aspect of your events are shown on your site, easily modify templates from the settings page
28
+ * RSS Feeds
29
+ * Plenty of template tags and shortcodes for use in your posts and pages
30
+ * Actively maintained and supported
31
+ * Fully localizable, translations already available in German, Spanish, Czech, Italian, Dutch, Portuguese and Swedish
32
+ * And much more!
33
+
34
+ Events Manager 3.0 was written from the ground up with flexibility in mind. Through use of object oriented programming and exposing hooks and filters throughout the site, you can modify Events Manager just like you would Wordpress!
35
 
36
  Events Manager is fully localisable and already localised in Italian, Spanish, German and Swedish.
37
 
38
+ For more information and support please visit the [Documentation Page](http://wp-events-plugin.com/documentation/) and [Support Forum](http://wp-events-plugin.com/forums/).
39
 
40
  == Installation ==
41
 
122
 
123
  == Change Log ==
124
 
125
+ = 3.0.93 =
126
+ * Fixed bug with ownership and widgets
127
+ * Resolved 2.9 incompatability
128
+ * Fixed rss ownership bug
129
+ * Fixed calendar bug where pre/post dates don't show events
130
+ * Fixed calendar, now showing today correctly
131
+ * Categories blank page fix
132
+ * fixed page nav conflicts with role scoper
133
+ * added shortcut to manage bookings on event list
134
+
135
+
136
  = 3.0.92 =
137
  * Fixed permission issue
138
  * Fixed category not saving
widgets/em-events.php CHANGED
@@ -16,12 +16,10 @@ class EM_Widget extends WP_Widget {
16
  echo $args['before_title'];
17
  echo $instance['title'];
18
  echo $args['after_title'];
19
-
20
- /*Compute event range*/
21
  if ( is_numeric($instance['time_limit']) && $instance['time_limit'] > 0 ){
22
  $instance['scope'] = date('Y-m-d').",".date('Y-m-t', strtotime('+'.($instance['time_limit']-1).' month'));
23
- }
24
- /*END*/
25
 
26
  $events = EM_Events::get($instance);
27
  echo "<ul>";
16
  echo $args['before_title'];
17
  echo $instance['title'];
18
  echo $args['after_title'];
 
 
19
  if ( is_numeric($instance['time_limit']) && $instance['time_limit'] > 0 ){
20
  $instance['scope'] = date('Y-m-d').",".date('Y-m-t', strtotime('+'.($instance['time_limit']-1).' month'));
21
+ }
22
+ $instance['owner'] = false;
23
 
24
  $events = EM_Events::get($instance);
25
  echo "<ul>";
widgets/em-locations.php CHANGED
@@ -16,7 +16,8 @@ class EM_Locations_Widget extends WP_Widget {
16
  echo $args['before_title'];
17
  echo $instance['title'];
18
  echo $args['after_title'];
19
-
 
20
  $locations = EM_Locations::get($instance);
21
  echo "<ul>";
22
  $li_wrap = !preg_match('/^<li>/i', trim($instance['format']));
16
  echo $args['before_title'];
17
  echo $instance['title'];
18
  echo $args['after_title'];
19
+
20
+ $instance['owner'] = false;
21
  $locations = EM_Locations::get($instance);
22
  echo "<ul>";
23
  $li_wrap = !preg_match('/^<li>/i', trim($instance['format']));