Version Description
- Fixed missing events, locations etc. due to permissions
- Fixed location widget bug
- fixed broken global map js
Download this release
Release Info
Developer | netweblogic |
Plugin | Events Manager |
Version | 3.0.94 |
Comparing to | |
See all releases |
Code changes from version 3.0.93 to 3.0.94
- classes/em-bookings.php +13 -1
- classes/em-calendar.php.bak +0 -369
- classes/em-categories.php +19 -17
- classes/em-events.php +11 -9
- classes/em-locations.php +18 -17
- classes/em-map.php +1 -1
- classes/em-people.php +113 -0
- em-ical.php +0 -80
- events-manager.php +2 -2
- readme.txt +48 -57
classes/em-bookings.php
CHANGED
@@ -472,7 +472,19 @@ class EM_Bookings extends EM_Object{
|
|
472 |
$defaults = array(
|
473 |
'status' => false,
|
474 |
'person' => true //to add later, search by person's bookings...
|
475 |
-
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
476 |
return apply_filters('em_bookings_get_default_search', parent::get_default_search($defaults,$array), $array, $defaults);
|
477 |
}
|
478 |
}
|
472 |
$defaults = array(
|
473 |
'status' => false,
|
474 |
'person' => true //to add later, search by person's bookings...
|
475 |
+
);
|
476 |
+
if( true || is_admin() ){
|
477 |
+
//figure out default owning permissions
|
478 |
+
switch( get_option('dbem_permissions_events') ){
|
479 |
+
case 0:
|
480 |
+
$defaults['owner'] = get_current_user_id();
|
481 |
+
break;
|
482 |
+
case 1:
|
483 |
+
$defaults['owner'] = false;
|
484 |
+
break;
|
485 |
+
}
|
486 |
+
$defaults['owner'] = ( em_verify_admin() ) ? false:$defaults['owner'];
|
487 |
+
}
|
488 |
return apply_filters('em_bookings_get_default_search', parent::get_default_search($defaults,$array), $array, $defaults);
|
489 |
}
|
490 |
}
|
classes/em-calendar.php.bak
DELETED
@@ -1,369 +0,0 @@
|
|
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']."&";
|
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&month={$back_month}&year={$back_year}&{$link_args}'><<</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&month={$next_month}&year={$next_year}&{$link_args}'>>></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 = "&";
|
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('&', $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-categories.php
CHANGED
@@ -13,7 +13,7 @@ class EM_Categories extends EM_Object {
|
|
13 |
$results = $wpdb->get_results(apply_filters('em_categories_get_sql',$sql),ARRAY_A);
|
14 |
$categories = array();
|
15 |
foreach($results as $result){
|
16 |
-
$categories[$result['category_id']] = new
|
17 |
}
|
18 |
return $categories; //We return all the categories matched as an EM_Event array.
|
19 |
}
|
@@ -132,23 +132,25 @@ class EM_Categories extends EM_Object {
|
|
132 |
'eventful' => false, //cats that have an event (scope will also play a part here
|
133 |
'eventless' => false, //cats WITHOUT events, eventful takes precedence
|
134 |
);
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
|
|
|
|
|
|
150 |
}
|
151 |
-
$defaults['owner'] = ( em_verify_admin() ) ? false:$defaults['owner'];
|
152 |
return apply_filters('em_categories_get_default_search', parent::get_default_search($defaults,$array), $array, $defaults);
|
153 |
}
|
154 |
|
13 |
$results = $wpdb->get_results(apply_filters('em_categories_get_sql',$sql),ARRAY_A);
|
14 |
$categories = array();
|
15 |
foreach($results as $result){
|
16 |
+
$categories[$result['category_id']] = new EM_Category($result);
|
17 |
}
|
18 |
return $categories; //We return all the categories matched as an EM_Event array.
|
19 |
}
|
132 |
'eventful' => false, //cats that have an event (scope will also play a part here
|
133 |
'eventless' => false, //cats WITHOUT events, eventful takes precedence
|
134 |
);
|
135 |
+
if( is_admin() ){
|
136 |
+
//by default, we only get categories the owner can manage
|
137 |
+
switch( get_option('dbem_permissions_categories') ){
|
138 |
+
case 0:
|
139 |
+
$defaults['owner'] = get_current_user_id();
|
140 |
+
break;
|
141 |
+
case 1:
|
142 |
+
$wp_user_search = new WP_User_Search(null, null, 'administrator');
|
143 |
+
$users = $wp_user_search->get_results();
|
144 |
+
$users[] = get_current_user_id();
|
145 |
+
$users[] = 0;
|
146 |
+
$defaults['owner'] = implode(',', $users);
|
147 |
+
break;
|
148 |
+
case 2:
|
149 |
+
$defaults['owner'] = false;
|
150 |
+
break;
|
151 |
+
}
|
152 |
+
$defaults['owner'] = ( em_verify_admin() ) ? false:$defaults['owner'];
|
153 |
}
|
|
|
154 |
return apply_filters('em_categories_get_default_search', parent::get_default_search($defaults,$array), $array, $defaults);
|
155 |
}
|
156 |
|
classes/em-events.php
CHANGED
@@ -236,16 +236,18 @@ class EM_Events extends EM_Object {
|
|
236 |
'order' => get_option('dbem_events_default_order'),
|
237 |
'rsvp' => false //if set to true, only events with bookings enabled are returned
|
238 |
);
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
|
|
|
|
|
|
247 |
}
|
248 |
-
$defaults['owner'] = ( em_verify_admin() ) ? false:$defaults['owner'];
|
249 |
return apply_filters('em_events_get_default_search', parent::get_default_search($defaults,$array), $array, $defaults);
|
250 |
}
|
251 |
}
|
236 |
'order' => get_option('dbem_events_default_order'),
|
237 |
'rsvp' => false //if set to true, only events with bookings enabled are returned
|
238 |
);
|
239 |
+
if( is_admin() ){
|
240 |
+
//figure out default owning permissions
|
241 |
+
switch( get_option('dbem_permissions_events') ){
|
242 |
+
case 0:
|
243 |
+
$defaults['owner'] = get_current_user_id();
|
244 |
+
break;
|
245 |
+
case 1:
|
246 |
+
$defaults['owner'] = false;
|
247 |
+
break;
|
248 |
+
}
|
249 |
+
$defaults['owner'] = ( em_verify_admin() ) ? false:$defaults['owner'];
|
250 |
}
|
|
|
251 |
return apply_filters('em_events_get_default_search', parent::get_default_search($defaults,$array), $array, $defaults);
|
252 |
}
|
253 |
}
|
classes/em-locations.php
CHANGED
@@ -187,24 +187,25 @@ class EM_Locations extends EM_Object {
|
|
187 |
);
|
188 |
$array['eventful'] = ( !empty($array['eventful']) && $array['eventful'] == true );
|
189 |
$array['eventless'] = ( !empty($array['eventless']) && $array['eventless'] == true );
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
|
|
|
|
206 |
}
|
207 |
-
$defaults['owner'] = ( em_verify_admin() ) ? false:$defaults['owner'];
|
208 |
return apply_filters('em_locations_get_default_search', parent::get_default_search($defaults, $array), $array, $defaults);
|
209 |
}
|
210 |
//TODO for all the static plural classes like this one, we might benefit from bulk actions like delete/add/save etc.... just a random thought.
|
187 |
);
|
188 |
$array['eventful'] = ( !empty($array['eventful']) && $array['eventful'] == true );
|
189 |
$array['eventless'] = ( !empty($array['eventless']) && $array['eventless'] == true );
|
190 |
+
if( is_admin() ){
|
191 |
+
//by default, we only get categories the owner can manage
|
192 |
+
switch( get_option('dbem_permissions_locations') ){
|
193 |
+
case 0:
|
194 |
+
$defaults['owner'] = get_current_user_id();
|
195 |
+
break;
|
196 |
+
case 1:
|
197 |
+
$wp_user_search = new WP_User_Search(null, null, 'administrator');
|
198 |
+
$users = $wp_user_search->get_results();
|
199 |
+
$users[] = get_current_user_id();
|
200 |
+
$users[] = 0;
|
201 |
+
$defaults['owner'] = implode(',', $users);
|
202 |
+
break;
|
203 |
+
case 2:
|
204 |
+
$defaults['owner'] = false;
|
205 |
+
break;
|
206 |
+
}
|
207 |
+
$defaults['owner'] = ( em_verify_admin() ) ? false:$defaults['owner'];
|
208 |
}
|
|
|
209 |
return apply_filters('em_locations_get_default_search', parent::get_default_search($defaults, $array), $array, $defaults);
|
210 |
}
|
211 |
//TODO for all the static plural classes like this one, we might benefit from bulk actions like delete/add/save etc.... just a random thought.
|
classes/em-map.php
CHANGED
@@ -13,7 +13,7 @@ class EM_Map extends EM_Object {
|
|
13 |
//TODO Finish and document this feature, need to add balloons here
|
14 |
if (get_option('dbem_gmap_is_active') == '1') {
|
15 |
ob_start();
|
16 |
-
$atts['
|
17 |
$atts['query'] = 'GlobalMapData';
|
18 |
$rand = substr(md5(rand().rand()),0,5);
|
19 |
//build js array of arguments to send to event query
|
13 |
//TODO Finish and document this feature, need to add balloons here
|
14 |
if (get_option('dbem_gmap_is_active') == '1') {
|
15 |
ob_start();
|
16 |
+
$atts['em_ajax'] = true;
|
17 |
$atts['query'] = 'GlobalMapData';
|
18 |
$rand = substr(md5(rand().rand()),0,5);
|
19 |
//build js array of arguments to send to event query
|
classes/em-people.php
CHANGED
@@ -21,5 +21,118 @@ class EM_People extends EM_Object {
|
|
21 |
return $result;
|
22 |
}
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
}
|
25 |
?>
|
21 |
return $result;
|
22 |
}
|
23 |
|
24 |
+
function get_new( $args = array() ) {
|
25 |
+
global $wpdb;
|
26 |
+
$people_table = $wpdb->prefix.EM_PEOPLE_TABLE;
|
27 |
+
$bookings_table = $wpdb->prefix.EM_BOOKINGS_TABLE;
|
28 |
+
|
29 |
+
//Quick version, we can accept an array of IDs, which is easy to retrieve
|
30 |
+
if( self::array_is_numeric($args) ){ //Array of numbers, assume they are event IDs to retreive
|
31 |
+
//We can just get all the events here and return them
|
32 |
+
$sql = "SELECT * FROM $people_table WHERE person_id=".implode(" OR person_id=", $args);
|
33 |
+
$results = $wpdb->get_results(apply_filters('em_people_get_sql',$sql),ARRAY_A);
|
34 |
+
$people = array();
|
35 |
+
foreach($results as $result){
|
36 |
+
$people[$result['person_id']] = new EM_Person($result);
|
37 |
+
}
|
38 |
+
return $people; //We return all the people matched as an EM_Event array.
|
39 |
+
}
|
40 |
+
|
41 |
+
//We assume it's either an empty array or array of search arguments to merge with defaults
|
42 |
+
$args = self::get_default_search($args);
|
43 |
+
$limit = ( $args['limit'] && is_numeric($args['limit'])) ? "LIMIT {$args['limit']}" : '';
|
44 |
+
$offset = ( $limit != "" && is_numeric($args['offset']) ) ? "OFFSET {$args['offset']}" : '';
|
45 |
+
|
46 |
+
//Get the default conditions
|
47 |
+
$conditions = self::build_sql_conditions($args);
|
48 |
+
//Put it all together
|
49 |
+
$where = ( count($conditions) > 0 ) ? " WHERE " . implode ( " AND ", $conditions ):'';
|
50 |
+
|
51 |
+
//Get ordering instructions
|
52 |
+
$EM_Person = new EM_Person();
|
53 |
+
$accepted_fields = $EM_Person->get_fields(true);
|
54 |
+
$orderby = self::build_sql_orderby($args, $accepted_fields, get_option('dbem_people_default_order'));
|
55 |
+
//Now, build orderby sql
|
56 |
+
$orderby_sql = ( count($orderby) > 0 ) ? 'ORDER BY '. implode(', ', $orderby) : '';
|
57 |
+
|
58 |
+
//Create the SQL statement and execute
|
59 |
+
$sql = "
|
60 |
+
SELECT * FROM $people_table
|
61 |
+
LEFT JOIN $bookings_table ON {$bookings_table}.person_id={$people_table}.person_id
|
62 |
+
$where
|
63 |
+
GROUP BY person_id
|
64 |
+
$orderby_sql
|
65 |
+
$limit $offset
|
66 |
+
";
|
67 |
+
$results = $wpdb->get_results( apply_filters('em_people_get_sql',$sql, $args), ARRAY_A);
|
68 |
+
//If we want results directly in an array, why not have a shortcut here?
|
69 |
+
if( $args['array'] == true ){
|
70 |
+
return $results;
|
71 |
+
}
|
72 |
+
|
73 |
+
//Make returned results EM_Event objects
|
74 |
+
$results = (is_array($results)) ? $results:array();
|
75 |
+
$people = array();
|
76 |
+
foreach ( $results as $person_array ){
|
77 |
+
$people[$person_array['person_id']] = new EM_Person($person_array);
|
78 |
+
}
|
79 |
+
|
80 |
+
return apply_filters('em_people_get', $people);
|
81 |
+
}
|
82 |
+
|
83 |
+
/* Overrides EM_Object method to apply a filter to result
|
84 |
+
* @see wp-content/plugins/events-manager/classes/EM_Object#build_sql_conditions()
|
85 |
+
*/
|
86 |
+
function build_sql_conditions( $args = array() ){
|
87 |
+
global $wpdb;
|
88 |
+
//FIXME EM_People doesn't build sql conditions in EM_Object
|
89 |
+
$conditions = array();
|
90 |
+
|
91 |
+
//owner lookup
|
92 |
+
//FIXME permissions need tweaking for people, not owned by event owner, but site.
|
93 |
+
/*
|
94 |
+
if( is_numeric($args['owner']) ){
|
95 |
+
$conditions['owner'] = "person_owner=".get_current_user_id();
|
96 |
+
}elseif( preg_match('/^([0-9],?)+$/', $args['owner']) ){
|
97 |
+
$conditions['owner'] = "person_owner IN (".explode(',', $args['owner']).")";
|
98 |
+
}
|
99 |
+
*/
|
100 |
+
return apply_filters( 'em_people_build_sql_conditions', $conditions, $args );
|
101 |
+
}
|
102 |
+
|
103 |
+
/* Overrides EM_Object method to apply a filter to result
|
104 |
+
* @see wp-content/plugins/people-manager/classes/EM_Object#build_sql_orderby()
|
105 |
+
*/
|
106 |
+
function build_sql_orderby( $args, $accepted_fields, $default_order = 'ASC' ){
|
107 |
+
return apply_filters( 'em_people_build_sql_orderby', parent::build_sql_orderby($args, $accepted_fields, get_option('dbem_people_default_order')), $args, $accepted_fields, $default_order );
|
108 |
+
}
|
109 |
+
|
110 |
+
/*
|
111 |
+
* Adds custom people search defaults
|
112 |
+
* @param array $array
|
113 |
+
* @return array
|
114 |
+
* @uses EM_Object#get_default_search()
|
115 |
+
*/
|
116 |
+
function get_default_search( $array = array() ){
|
117 |
+
$defaults = array(
|
118 |
+
'scope'=>false,
|
119 |
+
'eventful' => false, //cats that have an event (scope will also play a part here
|
120 |
+
'eventless' => false, //cats WITHOUT events, eventful takes precedence
|
121 |
+
);
|
122 |
+
//figure out default owning permissions, but since public is for viewing events, only impose limitations in admin area
|
123 |
+
if( is_admin() ){
|
124 |
+
switch( get_option('dbem_permissions_events') ){
|
125 |
+
case 0:
|
126 |
+
$defaults['owner'] = get_current_user_id();
|
127 |
+
break;
|
128 |
+
case 1:
|
129 |
+
$defaults['owner'] = false;
|
130 |
+
break;
|
131 |
+
}
|
132 |
+
$defaults['owner'] = ( em_verify_admin() ) ? false:$defaults['owner'];
|
133 |
+
}
|
134 |
+
return apply_filters('em_people_get_default_search', parent::get_default_search($defaults,$array), $array, $defaults);
|
135 |
+
}
|
136 |
+
|
137 |
}
|
138 |
?>
|
em-ical.php
DELETED
@@ -1,80 +0,0 @@
|
|
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 ( ">", ">", str_replace ( "<", "<", 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 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
events-manager.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Events Manager
|
4 |
-
Version: 3.0.
|
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.
|
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.94
|
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.094); //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
@@ -1,17 +1,19 @@
|
|
1 |
=== Events Manager ===
|
2 |
Contributors: nutsmuggler, netweblogic
|
3 |
Donate link: http://wp-events-plugin.com
|
4 |
-
Tags: events,
|
5 |
Requires at least: 2.9
|
6 |
Tested up to: 3.0.4
|
7 |
-
Stable tag: 3.0.
|
8 |
|
9 |
-
Fully featured events management
|
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)
|
@@ -35,71 +37,56 @@ Events Manager 3.0 was written from the ground up with flexibility in mind. Thro
|
|
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 |
|
42 |
-
|
43 |
-
1. Go to Plugins > Add New in the admin area, and search for events manager
|
44 |
-
2. Click install
|
45 |
-
3. Activate it
|
46 |
-
4. Done! You can start adding events straight away, although you may want to visit the [Documentation Pages](http://wp-events-plugin.com/documentation/) and unleash the full power of Events Manager.
|
47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
|
49 |
-
|
50 |
|
51 |
-
|
52 |
-
2. Upload the `events-manager` folder to the `/wp-content/plugins/` directory
|
53 |
-
3. Activate the plugin through the 'Plugins' menu in WordPress
|
54 |
-
4. Add events list or calendars following the instructions in the Usage section.
|
55 |
-
|
56 |
-
== Usage ==
|
57 |
|
58 |
-
|
|
|
59 |
|
60 |
-
|
61 |
-
In the event edit page you can specify the number of spaces available for your event. Yuo just need to turn on RSVP for the event and specify the spaces available in the right sidebar box.
|
62 |
-
When a visitor responds to your events, the box sill show you his reservation. You can remoe reservation by clicking on the *x* button or view the respondents data in a printable page.
|
63 |
-
* The *Locations* page lets you add, delete and edit locations directly. Locations are automatically added with events if not present, but this interface lets you customise your locations data and add a picture.
|
64 |
-
* The *People* page serves as a gathering point for the information about the people who reserved a space in your events.
|
65 |
-
* The *Settings* page allows a fine-grained control over the plugin. Here you can set the [format](#formatting-events) of events in the Events page.
|
66 |
-
* The *Help* page will provide you with information on troubleshooting and where to ask for support.
|
67 |
|
68 |
-
|
69 |
|
70 |
== Frequently Asked Questions ==
|
71 |
|
72 |
-
|
73 |
|
74 |
-
|
75 |
|
76 |
-
|
77 |
|
78 |
-
|
79 |
-
For curiosity's sake, `<?php wp_head(); ?>` is an action hook, that is a function call allowing plugins to insert their stuff in Wordpress pages; if you're a theme maker, you should make sure to include `<?php wp_head(); ?> ` and all the necessary hooks in your theme.
|
80 |
-
|
81 |
-
= How do I resize the map? =
|
82 |
|
83 |
Insert some code similar to this in your css:
|
84 |
|
85 |
-
|
86 |
-
width: 300px !important;
|
87 |
-
height: 200px !important;
|
88 |
-
}
|
89 |
|
90 |
Do not leave out the `!important` directive; it is, needless to say, important.
|
91 |
|
92 |
-
= Can I customise the event page? =
|
93 |
-
|
94 |
-
Sure, you can do that by editing the page and changing its [template](http://codex.wordpress.org/Pages#Page_Templates). For heavy customisation, you can use the some of the plugin's own conditional tags, described in the *Template Tags* section.
|
95 |
|
96 |
-
|
97 |
|
98 |
-
|
|
|
|
|
|
|
99 |
|
100 |
-
= How does Events Manager work? =
|
101 |
|
102 |
-
When installed, events Manager creates a special
|
103 |
|
104 |
= Are events posts? =
|
105 |
|
@@ -107,12 +94,11 @@ Events aren't posts. They are stored in a different table and have no relationsh
|
|
107 |
|
108 |
= Why aren't events posts? =
|
109 |
|
110 |
-
|
111 |
-
If you need to treat events like posts, you should use one of the other excellent events plugin.
|
112 |
|
113 |
-
= Is Events Manager available in my language? =
|
114 |
|
115 |
-
At this stage, Events Manager is
|
116 |
|
117 |
== Screenshots ==
|
118 |
|
@@ -120,11 +106,16 @@ At this stage, Events Manager is only available in English and Italian. Yet, the
|
|
120 |
2. The events management page.
|
121 |
3. The Events Manager Options page.
|
122 |
|
123 |
-
==
|
|
|
|
|
|
|
|
|
|
|
124 |
|
125 |
= 3.0.93 =
|
126 |
* Fixed bug with ownership and widgets
|
127 |
-
* Resolved 2.9
|
128 |
* Fixed rss ownership bug
|
129 |
* Fixed calendar bug where pre/post dates don't show events
|
130 |
* Fixed calendar, now showing today correctly
|
@@ -158,7 +149,7 @@ At this stage, Events Manager is only available in English and Italian. Yet, the
|
|
158 |
* fixed location gui editor
|
159 |
|
160 |
= 3.0.9 =
|
161 |
-
* Fixed small calendar
|
162 |
* added event and location single shortcodes
|
163 |
* shortcodes now accept html within format attribute or within the shortcode tags [like]<p>this</p>[/like]
|
164 |
* fixed pagination functionality (or lack thereof) in shortcodes
|
@@ -182,8 +173,8 @@ At this stage, Events Manager is only available in English and Italian. Yet, the
|
|
182 |
|
183 |
= 3.0.8 =
|
184 |
* Event lists now have pagination links for both admin and public areas!
|
185 |
-
* Fixed
|
186 |
-
* Added option to show long events if showing a calendar
|
187 |
* Multiple maps on one page will now show up.
|
188 |
* Modified styling of map balloons to not use #content (if you modded your theme, look at the CSS to override).
|
189 |
* Media uploads in GUI now working as expected
|
@@ -200,7 +191,7 @@ At this stage, Events Manager is only available in English and Italian. Yet, the
|
|
200 |
* Added revised German translation
|
201 |
* Fixed ordering issue
|
202 |
* Fixed old template tag attributes not being read
|
203 |
-
* Changed map
|
204 |
|
205 |
= 3.0.5 =
|
206 |
* Fixed 12pm bug
|
@@ -214,7 +205,7 @@ At this stage, Events Manager is only available in English and Italian. Yet, the
|
|
214 |
= 3.0.4 =
|
215 |
* Title rewriting workaround for themes where main menus are broken on events pages
|
216 |
* Added option to show lists on calendar days regardless of whether there is only one event on that day.
|
217 |
-
* added
|
218 |
* fixed rsvp deletion issue
|
219 |
* fixed potential phpmailer conflicts
|
220 |
* CSS issue with maps fixed
|
@@ -240,7 +231,7 @@ At this stage, Events Manager is only available in English and Italian. Yet, the
|
|
240 |
* Fixed error for #_EXCERPT not showing
|
241 |
|
242 |
= 3.0 =
|
243 |
-
* Refactored all the underlying
|
244 |
* Merged the events and recurrences tables
|
245 |
* Tables migration from dbem to em (to provide a fallback in case the previous merge goes wrong)
|
246 |
* Bugfix: 127 limit increased (got rid of tinyint types)
|
@@ -250,4 +241,4 @@ At this stage, Events Manager is only available in English and Italian. Yet, the
|
|
250 |
* Added a setting to revert to 2.2
|
251 |
* optimizing EM_Locations and removing redundant code across objects
|
252 |
|
253 |
-
For changelog of 2.x and lower, see the readme.txt file of version 2.2.2
|
1 |
=== Events Manager ===
|
2 |
Contributors: nutsmuggler, netweblogic
|
3 |
Donate link: http://wp-events-plugin.com
|
4 |
+
Tags: events, booking, calendar, locations, maps, geotagging, admin, dashboard, plugin, template, theme, widget
|
5 |
Requires at least: 2.9
|
6 |
Tested up to: 3.0.4
|
7 |
+
Stable tag: 3.0.94
|
8 |
|
9 |
+
Fully featured events management including 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 |
+
For more documentation and support please visit the [plugin website](http://wp-events-plugin.com/).
|
16 |
+
|
17 |
Main Features
|
18 |
|
19 |
* Easy event creation (single day with start/end times)
|
37 |
|
38 |
Events Manager is fully localisable and already localised in Italian, Spanish, German and Swedish.
|
39 |
|
|
|
|
|
40 |
== Installation ==
|
41 |
|
42 |
+
Events Manager works like any standard Wordpress plugin, and requires little configuration to start managing events. If you get stuck, visit the our documentation and support forums.
|
|
|
|
|
|
|
|
|
43 |
|
44 |
+
Whenever installing or upgrading any plugin, or even Wordpress itself, it is always recommended you back up your database first!
|
45 |
+
|
46 |
+
= Installing =
|
47 |
+
|
48 |
+
1. If installing, go to Plugins > Add New in the admin area, and search for events manager.
|
49 |
+
2. Click install, once installed, activate and you're done!
|
50 |
|
51 |
+
Once installed, you can start adding events straight away, although you may want to visit the plugin site documentation and learn how to unleash the full power of Events Manager.
|
52 |
|
53 |
+
= Upgrading =
|
|
|
|
|
|
|
|
|
|
|
54 |
|
55 |
+
1. When upgrading, visit the plugins page in your admin area, scroll down to events manager and click upgrade.
|
56 |
+
2. Wordpress will help you upgrade automatically.
|
57 |
|
58 |
+
= Upgrading from 2.x to 3.x =
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
|
60 |
+
Version 3.x uses different tables than 2.x. Events should be migrated automatically without any action needed from you. However, in the event something does go wrong (very rare, we've done it many times), you can downgrade immediately without losing any settings, or you can click on the help page and try re-importing your events. If you run into any issues, let us know in the forums and we'll be happy to help you through the upgrade.
|
61 |
|
62 |
== Frequently Asked Questions ==
|
63 |
|
64 |
+
See our [FAQ](http://wp-events-plugin.com/documentation/faq/) page, which is updated regularly.
|
65 |
|
66 |
+
= This plugin is *almost* right for me, but there's this feature I *desperately* need. Can you add it? =
|
67 |
|
68 |
+
We have a pretty big to-do list and we intend on implementing many cool new features over time. If you really really need this feature you can offer to sponsor the feature for the plugin and we may be able to accommodate you. Sponsored features will also be made available to other users, so you're also giving back to the community and help us make this plugin better, faster!
|
69 |
|
70 |
+
= How do I resize the map? =
|
|
|
|
|
|
|
71 |
|
72 |
Insert some code similar to this in your css:
|
73 |
|
74 |
+
`.em-location-map, .em-locations-map { width: 300px !important; height: 200px !important; }`
|
|
|
|
|
|
|
75 |
|
76 |
Do not leave out the `!important` directive; it is, needless to say, important.
|
77 |
|
78 |
+
= Can I further customise the event page? =
|
|
|
|
|
79 |
|
80 |
+
Sure, there are a few ways to do this:
|
81 |
|
82 |
+
* If you want to simply change what event info is displayed, you can do this in the settings page by providing a combination of html and placeholders (see plugin settings page).
|
83 |
+
* Add to your theme's CSS files to further style the page.
|
84 |
+
* Edit the wordpress event page (via Pages in the admin area) and changing its [template](http://codex.wordpress.org/Pages#Page_Templates).
|
85 |
+
* For heavy customisation, you can use the some of the plugins own conditional tags, described in the template tags section of our documentation.
|
86 |
|
87 |
+
= How does Events Manager work? =
|
88 |
|
89 |
+
When installed, events Manager creates a special “Events” page. This page is used for the dynamic content of the events. All the events link actually link to this page, which gets rendered differently for each event.
|
90 |
|
91 |
= Are events posts? =
|
92 |
|
94 |
|
95 |
= Why aren't events posts? =
|
96 |
|
97 |
+
We wanted our users to have a simple, straightforward way of inserting the events, without confusing them with posts. EM was also created before custom posts were available. If you need to treat events like posts, there may be other events plugins that do this.
|
|
|
98 |
|
99 |
+
= Is Events Manager available in my language? =
|
100 |
|
101 |
+
At this stage, Events Manager is available in German, Spanish, Czech, Italian, Dutch, Portuguese and Swedish. Yet, the plugin is fully localisable; I will welcome any translator willing to add a translation of Events Manager into their mother tongue for this plugin.
|
102 |
|
103 |
== Screenshots ==
|
104 |
|
106 |
2. The events management page.
|
107 |
3. The Events Manager Options page.
|
108 |
|
109 |
+
== Changelog ==
|
110 |
+
|
111 |
+
= 3.0.94 =
|
112 |
+
* Fixed missing events, locations etc. due to permissions
|
113 |
+
* Fixed location widget bug
|
114 |
+
* fixed broken global map js
|
115 |
|
116 |
= 3.0.93 =
|
117 |
* Fixed bug with ownership and widgets
|
118 |
+
* Resolved 2.9 incompatibility
|
119 |
* Fixed rss ownership bug
|
120 |
* Fixed calendar bug where pre/post dates don't show events
|
121 |
* Fixed calendar, now showing today correctly
|
149 |
* fixed location gui editor
|
150 |
|
151 |
= 3.0.9 =
|
152 |
+
* Fixed small calendar discrepancies
|
153 |
* added event and location single shortcodes
|
154 |
* shortcodes now accept html within format attribute or within the shortcode tags [like]<p>this</p>[/like]
|
155 |
* fixed pagination functionality (or lack thereof) in shortcodes
|
173 |
|
174 |
= 3.0.8 =
|
175 |
* Event lists now have pagination links for both admin and public areas!
|
176 |
+
* Fixed time zone issue with calendars, now taking time from WP settings, not server
|
177 |
+
* Added option to show long events if showing a calendar of events page.
|
178 |
* Multiple maps on one page will now show up.
|
179 |
* Modified styling of map balloons to not use #content (if you modded your theme, look at the CSS to override).
|
180 |
* Media uploads in GUI now working as expected
|
191 |
* Added revised German translation
|
192 |
* Fixed ordering issue
|
193 |
* Fixed old template tag attributes not being read
|
194 |
+
* Changed map balloon wrapper id to class
|
195 |
|
196 |
= 3.0.5 =
|
197 |
* Fixed 12pm bug
|
205 |
= 3.0.4 =
|
206 |
* Title rewriting workaround for themes where main menus are broken on events pages
|
207 |
* Added option to show lists on calendar days regardless of whether there is only one event on that day.
|
208 |
+
* added Spanish translation
|
209 |
* fixed rsvp deletion issue
|
210 |
* fixed potential phpmailer conflicts
|
211 |
* CSS issue with maps fixed
|
231 |
* Fixed error for #_EXCERPT not showing
|
232 |
|
233 |
= 3.0 =
|
234 |
+
* Refactored all the underlying architecture, to make it object oriented. Now classes and templates are separate.
|
235 |
* Merged the events and recurrences tables
|
236 |
* Tables migration from dbem to em (to provide a fallback in case the previous merge goes wrong)
|
237 |
* Bugfix: 127 limit increased (got rid of tinyint types)
|
241 |
* Added a setting to revert to 2.2
|
242 |
* optimizing EM_Locations and removing redundant code across objects
|
243 |
|
244 |
+
For changelog of 2.x and lower, see the readme.txt file of version 2.2.2
|