Events Manager - Version 2.1

Version Description

Download this release

Release Info

Developer nutsmuggler
Plugin Icon 128x128 Events Manager
Version 2.1
Comparing to
See all releases

Code changes from version 2.0rc2 to 2.1

dbem.js CHANGED
@@ -29,4 +29,58 @@ function update_booking_data () {
29
  $j(document).ready( function() {
30
  // Managing bookings delete operations
31
  $j('a.bookingdelbutton').click(remove_booking);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  });
29
  $j(document).ready( function() {
30
  // Managing bookings delete operations
31
  $j('a.bookingdelbutton').click(remove_booking);
32
+ });
33
+
34
+ jQuery(document).ready( function($) {
35
+ jQuery('#mtm_add_tag').click( function(event){
36
+ event.preventDefault();
37
+ //Get All meta rows
38
+ var metas = jQuery('#mtm_body').children();
39
+ //Copy first row and change values
40
+ var metaCopy = jQuery(metas[0]).clone(true);
41
+ newId = metas.length + 1;
42
+ metaCopy.attr('id', 'mtm_'+newId);
43
+ metaCopy.find('a').attr('rel', newId);
44
+ metaCopy.find('[name=mtm_1_ref]').attr({
45
+ name:'mtm_'+newId+'_ref' ,
46
+ value:''
47
+ });
48
+ metaCopy.find('[name=mtm_1_content]').attr({
49
+ name:'mtm_'+newId+'_content' ,
50
+ value:''
51
+ });
52
+ metaCopy.find('[name=mtm_1_name]').attr({
53
+ name:'mtm_'+newId+'_name' ,
54
+ value:''
55
+ });
56
+ //Insert into end of file
57
+ jQuery('#mtm_body').append(metaCopy);
58
+ //Duplicate the last entry, remove values and rename id
59
+ });
60
+
61
+ jQuery('#mtm_body a').click( function(event){
62
+ event.preventDefault();
63
+ //Only remove if there's more than 1 meta tag
64
+ if(jQuery('#mtm_body').children().length > 1){
65
+ //Remove the item
66
+ jQuery(jQuery(this).parent().parent().get(0)).remove();
67
+ //Renumber all the items
68
+ jQuery('#mtm_body').children().each( function(i){
69
+ metaCopy = jQuery(this);
70
+ oldId = metaCopy.attr('id').replace('mtm_','');
71
+ newId = i+1;
72
+ metaCopy.attr('id', 'mtm_'+newId);
73
+ metaCopy.find('a').attr('rel', newId);
74
+ metaCopy.find('[name=mtm_'+ oldId +'_ref]').attr('name', 'mtm_'+newId+'_ref');
75
+ metaCopy.find('[name=mtm_'+ oldId +'_content]').attr('name', 'mtm_'+newId+'_content');
76
+ metaCopy.find('[name=mtm_'+ oldId +'_name]').attr( 'name', 'mtm_'+newId+'_name');
77
+ });
78
+ }else{
79
+ metaCopy = jQuery(jQuery(this).parent().parent().get(0));
80
+ metaCopy.find('[name=mtm_1_ref]').attr('value', '');
81
+ metaCopy.find('[name=mtm_1_content]').attr('value', '');
82
+ metaCopy.find('[name=mtm_1_name]').attr( 'value', '');
83
+ alert("If you don't want any meta tags, just leave the text boxes blank and submit");
84
+ }
85
+ });
86
  });
dbem_UI_helpers.php CHANGED
@@ -31,7 +31,7 @@ function dbem_options_input_text($title, $name, $description) {
31
  <tr valign="top" id='<?php echo $name;?>_row'>
32
  <th scope="row"><?php _e($title, 'dbem') ?></th>
33
  <td>
34
- <input name="<?php echo $name ?>" type="text" id="<?php echo $title ?>" style="width: 95%" value="<?php echo get_option($name); ?>" size="45" /><br />
35
  <?php _e($description, 'dbem') ?>
36
  </td>
37
  </tr>
31
  <tr valign="top" id='<?php echo $name;?>_row'>
32
  <th scope="row"><?php _e($title, 'dbem') ?></th>
33
  <td>
34
+ <input name="<?php echo $name ?>" type="text" id="<?php echo $title ?>" style="width: 95%" value="<?php echo htmlspecialchars(get_option($name)); ?>" size="45" /><br />
35
  <?php _e($description, 'dbem') ?>
36
  </td>
37
  </tr>
dbem_calendar.php CHANGED
@@ -1,34 +1,41 @@
1
  <?php
2
-
3
  function dbem_get_calendar_shortcode($atts) {
4
  extract(shortcode_atts(array(
 
5
  'month' => '',
6
  'year' => '',
 
7
  ), $atts));
8
- $result = dbem_get_calendar("month={$month}&year={$year}&echo=0");
9
  return $result;
10
  }
11
  add_shortcode('events_calendar', 'dbem_get_calendar_shortcode');
12
 
13
  function dbem_get_calendar($args="") {
14
- $defaults = array(
 
15
  'month' => '',
16
- 'echo' => 1
17
- );
18
- $r = wp_parse_args( $args, $defaults );
19
- extract( $r, EXTR_SKIP );
 
 
20
  $month = $r['month'];
21
  $echo = $r['echo'];
22
 
 
 
 
23
  global $wpdb;
24
  if(isset($_GET['calmonth']) && $_GET['calmonth'] != '') {
25
- $month = $_GET['calmonth'] ;
26
  } else {
27
  if ($month == '')
28
  $month = date('m');
29
  }
30
  if(isset($_GET['calyear']) && $_GET['calyear'] != '') {
31
- $year = $_GET['calyear'] ;
32
  } else {
33
  if ($year == '')
34
  $year = date('Y');
@@ -45,15 +52,20 @@ function dbem_get_calendar($args="") {
45
  // Figure out which day of the week
46
  // the month starts on.
47
  $month_start_day = date('D', $month_start);
48
- switch($month_start_day){
49
- case "Sun": $offset = 6; break;
50
- case "Mon": $offset = 0; break;
51
- case "Tue": $offset = 1; break;
52
- case "Wed": $offset = 2; break;
53
- case "Thu": $offset = 3; break;
54
- case "Fri": $offset = 4; break;
55
- case "Sat": $offset = 5; break;
56
- }
 
 
 
 
 
57
 
58
  // determine how many days are in the last month.
59
  if($month == 1) {
@@ -66,7 +78,7 @@ function dbem_get_calendar($args="") {
66
  // Build an array for the current days
67
  // in the month
68
  for($i = 1; $i <= $num_days_current; $i++){
69
- $num_days_array[] = mktime(0,0,0,date('m'), $i, date('Y'));
70
  }
71
  // Build an array for the number of days
72
  // in last month
@@ -131,8 +143,9 @@ function dbem_get_calendar($args="") {
131
  } else {
132
  $back_month = $month -1;
133
  $back_year = $year;
134
- }
135
- $previous_link = "<a class='prev-month' href=\"".$base_link."calmonth={$back_month}&amp;calyear={$back_year} \">&lt;&lt;</a>";
 
136
 
137
  if($month == 12){
138
  $next_month = 1;
@@ -141,14 +154,26 @@ function dbem_get_calendar($args="") {
141
  $next_month = $month + 1;
142
  $next_year = $year;
143
  }
144
- $next_link = "<a class='next-month' href=\"".$base_link."calmonth={$next_month}&amp;calyear={$next_year} \">&gt;&gt;</a>";
145
- $random = (rand(100,200));
146
- $calendar="<div class='dbem-calendar' id='dbem-calendar-$random'><div style='display:none' class='month_n'>$month</div><div class='year_n' style='display:none' >$year</div>";
147
-
148
- $days_initials = "<td>".dbem_translate_and_trim("Monday")."</td><td>".dbem_translate_and_trim("Tuesday")."</td><td>".dbem_translate_and_trim("Wednesday")."</td><td>".dbem_translate_and_trim("Thursday")."</td><td>".dbem_translate_and_trim("Friday")."</td><td>".dbem_translate_and_trim("Saturday")."</td><td>".dbem_translate_and_trim("Sunday")."</td>\n";
149
 
 
 
 
 
 
 
 
 
 
 
 
 
 
150
  // Build the heading portion of the calendar table
151
- $calendar .= "<table class='dbem-calendar-table'>\n".
152
  "<thead>\n<tr>\n".
153
  "<td>$previous_link</td><td class='month_name' colspan='5'>$month_name $year</td><td>$next_link</td>\n".
154
  "</tr>\n</thead>\n".
@@ -159,38 +184,41 @@ function dbem_get_calendar($args="") {
159
  // Now we break each key of the array
160
  // into a week and create a new table row for each
161
  // week with the days of that week in the table data
162
-
163
  $i = 0;
164
  foreach($weeks as $week){
165
- $calendar .= "<tr>\n";
166
- foreach($week as $d){
167
- if($i < $offset_count){ //if it is PREVIOUS month
168
- $calendar .= "<td class='eventless-pre'>$d</td>\n";
169
- }
170
- if(($i >= $offset_count) && ($i < ($num_weeks * 7) - $outset)){ // if it is THIS month
171
- $fullday=$d;
172
  $d=date('j', $d);
173
  $day_link = "$d";
174
- // Apllying this patch http://davidebenini.it/events-manager-forum/topic.php?id=73; was
175
- //if($date == mktime(0,0,0,$month,$d,$year)){
176
- if(($date == mktime(0,0,0,$month,$d,$year)) && (date('F') == $month_name)) {
177
- $calendar .= "<td class='eventless-today'>$d</td>\n";
178
- } else {
179
- $calendar .= "<td class='eventless'>$day_link</td>\n";
 
 
 
 
 
 
 
180
  }
181
- } elseif(($outset > 0)) { //if it is NEXT month
182
- if(($i >= ($num_weeks * 7) - $outset)){
183
- $calendar .= "<td class='eventless-post'>$d</td>\n";
184
- }
185
- }
186
- $i++;
187
  }
188
  $calendar .= "</tr>\n";
189
- }
190
 
191
  $calendar .= " </table>\n</div>";
192
 
193
- // query the database for events in this time span
194
  if ($month == 1) {
195
  $month_pre=12;
196
  $month_post=2;
@@ -211,68 +239,106 @@ function dbem_get_calendar($args="") {
211
  $limit_post=date("Y-m-d", mktime(0,0,0,$month_post, 30 , $year_post));
212
  $events_table = $wpdb->prefix.EVENTS_TBNAME;
213
  $sql = "SELECT event_id,
214
- event_name,
215
- event_start_date,
216
- DATE_FORMAT(event_start_date, '%w') AS 'event_weekday_n',
217
- DATE_FORMAT(event_start_date, '%e') AS 'event_day',
218
- DATE_FORMAT(event_start_date, '%c') AS 'event_month_n',
219
- DATE_FORMAT(event_start_time, '%Y') AS 'event_year',
220
- DATE_FORMAT(event_start_time, '%k') AS 'event_hh',
221
- DATE_FORMAT(event_start_time, '%i') AS 'event_mm'
222
- FROM $events_table WHERE event_start_date BETWEEN '$limit_pre' AND '$limit_post' ORDER BY event_start_date";
 
 
 
223
 
224
- $events=$wpdb->get_results($sql);
225
 
226
  //----- DEBUG ------------
227
  //foreach($events as $event) { //DEBUG
228
  // $calendar .= ("$event->event_day / $event->event_month_n - $event->event_name<br/>");
229
  //}
230
  // ------------------
231
- // inserts the events
232
- // $eventful_months= array();
233
- // if($events){
234
- // foreach($events as $event) {
235
- // if($eventful_months[$event->event_month_n]){
236
- // $eventful_months[$event->event_month_n][] = $event;
237
- // } else {
238
- // $eventful_months[$event->event_month_n] = array($event);
239
- // }
240
- // }
241
- // $eventful_days = array();
242
- // foreach($eventful_months as $month) {
243
- // print_r($month);
244
- // $eventful_days[$month] = array();
245
- //
246
- // foreach($month as $event) {
247
- // // if($eventful_days[$month][$event->event_day]){
248
- // // $eventful_days[$month][$event->event_day][] = $event;
249
- // // } else {
250
- // // $eventful_days[$month][$event->event_day] = array($event);
251
- // // }
252
- //
253
- // }
254
- // }
255
- //
256
- //
257
- //
258
- // }
259
- // print_r("ECCO: <br/><pre>");
260
- // print_r($eventful_days);
261
- // print_r("</pre>");
262
- $events_page = get_option('dbem_events_page');
263
- if($events){
264
- foreach($events as $event) {
265
- if ($event->event_month_n == $month_pre) {
266
- $calendar=str_replace("<td class='eventless-pre'>$event->event_day</td>","<td class='eventful-pre'><a href='?page_id=$events_page&amp;calendar_day="."$event->event_start_date'>$event->event_day</a></td>",$calendar);
267
- } elseif($event->event_month_n == $month_post) {
268
- $calendar=str_replace("<td class='eventless-post'>$event->event_day</td>","<td class='eventful-post'><a href='?page_id=$events_page&amp;calendar_day="."$event->event_start_date'>$event->event_day</a></td>",$calendar);
269
- } elseif($event->event_day == $day) {
270
- $calendar=str_replace("<td class='eventless-today'>$event->event_day</td>","<td class='eventful-today'><a href='?page_id=$events_page&amp;calendar_day="."$event->event_start_date'>$event->event_day</a></td>",$calendar);
271
- } else{
272
- $calendar=str_replace("<td class='eventless'>$event->event_day</td>","<td class='eventful'><a href='?page_id=$events_page&amp;calendar_day="."$event->event_start_date'>$event->event_day</a></td>",$calendar);
273
  }
274
  }
275
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
276
  $output=$calendar;
277
  if ($echo)
278
  echo $output;
@@ -334,7 +400,7 @@ function dbem_calendar_style() {
334
  </style>
335
  <?php
336
  }
337
- add_action('wp_head', 'dbem_calendar_style');
338
 
339
  function dbem_translate_and_trim($string, $length = 1) {
340
  return substr(__($string), 0, $length);
@@ -353,33 +419,41 @@ function dbem_ajaxize_calendar()
353
  function initCalendar() {
354
  $j('a.prev-month').click(function(e){
355
  e.preventDefault();
356
- tableDiv = $j(this).parents('table').parent();
357
- prevMonthCalendar(tableDiv);
 
358
  } );
359
  $j('a.next-month').click(function(e){
360
  e.preventDefault();
361
- tableDiv = $j(this).parents('table').parent();
362
- nextMonthCalendar(tableDiv);
 
363
  } );
364
  }
365
- function prevMonthCalendar(tableDiv) {
 
 
 
366
  month_n = tableDiv.children('div.month_n').html();
367
  year_n = tableDiv.children('div.year_n').html();
368
- parseInt(month_n) == 1 ? prevMonth = 12 : prevMonth = parseInt(month_n) - 1 ;
369
- if (parseInt(month_n) == 1)
370
- year_n = parseInt(year_n) -1;
371
- $j.get("<?php bloginfo('url'); ?>", {ajaxCalendar: 'true', calmonth: prevMonth, calyear: year_n}, function(data){
372
  tableDiv.html(data);
373
  initCalendar();
374
  });
375
  }
376
- function nextMonthCalendar(tableDiv) {
 
 
 
377
  month_n = tableDiv.children('div.month_n').html();
378
  year_n = tableDiv.children('div.year_n').html();
379
- parseInt(month_n) == 12 ? nextMonth = 1 : nextMonth = parseInt(month_n) + 1 ;
380
- if (parseInt(month_n) == 12)
381
- year_n = parseInt(year_n) + 1;
382
- $j.get("<?php bloginfo('url'); ?>", {ajaxCalendar: 'true', calmonth: nextMonth, calyear: year_n}, function(data){
383
  tableDiv.html(data);
384
  initCalendar();
385
  });
@@ -388,7 +462,7 @@ function dbem_ajaxize_calendar()
388
  // function reloadCalendar(e) {
389
  // // e.preventDefault();
390
  // console.log($j(this).parents('table'));
391
- // $j.get("<?php bloginfo('url'); ?>", {ajax: 'true'}, function(data){
392
  // tableDiv = table.parent();
393
  // tableDiv.html(data);
394
  // });
@@ -403,9 +477,10 @@ add_action('wp_head', 'dbem_ajaxize_calendar');
403
 
404
  function dbem_filter_calendar_ajax() {
405
  if(isset($_GET['ajaxCalendar']) && $_GET['ajaxCalendar'] == true) {
406
- $month = $_GET['month'];
407
- $year = $_GET['year'];
408
- dbem_get_calendar('echo=1');
 
409
  die();
410
  }
411
  }
@@ -414,7 +489,7 @@ add_action('init','dbem_filter_calendar_ajax');
414
  function dbem_full_calendar() {
415
  echo "<p>Demo di <code>dbem_full_calendar</code></p>" ;
416
  echo '<div id="jMonthCalendar"></div>';
417
- dbem_get_calendar();
418
  }
419
 
420
 
1
  <?php
 
2
  function dbem_get_calendar_shortcode($atts) {
3
  extract(shortcode_atts(array(
4
+ 'full' => 0,
5
  'month' => '',
6
  'year' => '',
7
+ 'long_events' => 0
8
  ), $atts));
9
+ $result = dbem_get_calendar("full={$full}&month={$month}&year={$year}&echo=0&long_events={$long_events}");
10
  return $result;
11
  }
12
  add_shortcode('events_calendar', 'dbem_get_calendar_shortcode');
13
 
14
  function dbem_get_calendar($args="") {
15
+ $defaults = array(
16
+ 'full' => 0,
17
  'month' => '',
18
+ 'echo' => 1,
19
+ 'long_events' => 0
20
+ );
21
+ $r = wp_parse_args( $args, $defaults );
22
+ extract( $r, EXTR_SKIP );
23
+ $full = $r['full'];
24
  $month = $r['month'];
25
  $echo = $r['echo'];
26
 
27
+ $week_starts_on_sunday = get_option('dbem_week_starts_sunday');
28
+ $start_of_week = get_option('start_of_week');
29
+
30
  global $wpdb;
31
  if(isset($_GET['calmonth']) && $_GET['calmonth'] != '') {
32
+ $month = dbem_sanitize_request($_GET['calmonth']) ;
33
  } else {
34
  if ($month == '')
35
  $month = date('m');
36
  }
37
  if(isset($_GET['calyear']) && $_GET['calyear'] != '') {
38
+ $year = dbem_sanitize_request($_GET['calyear']) ;
39
  } else {
40
  if ($year == '')
41
  $year = date('Y');
52
  // Figure out which day of the week
53
  // the month starts on.
54
  $month_start_day = date('D', $month_start);
55
+
56
+ switch($month_start_day){
57
+ case "Sun": $offset = 0; break;
58
+ case "Mon": $offset = 1; break;
59
+ case "Tue": $offset = 2; break;
60
+ case "Wed": $offset = 3; break;
61
+ case "Thu": $offset = 4; break;
62
+ case "Fri": $offset = 5; break;
63
+ case "Sat": $offset = 6; break;
64
+ }
65
+
66
+ $offset -= $start_of_week;
67
+ if($offset<0)
68
+ $offset += 7;
69
 
70
  // determine how many days are in the last month.
71
  if($month == 1) {
78
  // Build an array for the current days
79
  // in the month
80
  for($i = 1; $i <= $num_days_current; $i++){
81
+ $num_days_array[] = mktime(0,0,0,$month, $i, $year);
82
  }
83
  // Build an array for the number of days
84
  // in last month
143
  } else {
144
  $back_month = $month -1;
145
  $back_year = $year;
146
+ }
147
+ $full ? $link_extra_class = "full-link" : $link_extra_class = '';
148
+ $previous_link = "<a class='prev-month $link_extra_class' href=\"".$base_link."calmonth={$back_month}&amp;calyear={$back_year} \">&lt;&lt;</a>";
149
 
150
  if($month == 12){
151
  $next_month = 1;
154
  $next_month = $month + 1;
155
  $next_year = $year;
156
  }
157
+ $next_link = "<a class='next-month $link_extra_class' href=\"".$base_link."calmonth={$next_month}&amp;calyear={$next_year} \">&gt;&gt;</a>";
158
+ $random = (rand(100,200));
159
+ $full ? $class = 'dbem-calendar-full' : $class='dbem-calendar';
160
+ $calendar="<div class='$class' id='dbem-calendar-$random'><div style='display:none' class='month_n'>$month</div><div class='year_n' style='display:none' >$year</div>";
 
161
 
162
+ $weekdays = array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
163
+ $n = 0 ;
164
+ while( $n < $start_of_week ) {
165
+ $last_day = array_shift($weekdays);
166
+ $weekdays[]= $last_day;
167
+ $n++;
168
+ }
169
+
170
+ $days_initials = "";
171
+ foreach($weekdays as $weekday) {
172
+ $days_initials .= "<td>".dbem_translate_and_trim($weekday)."</td>";
173
+ }
174
+ $full ? $fullclass = 'fullcalendar' : $fullclass='';
175
  // Build the heading portion of the calendar table
176
+ $calendar .= "<table class='dbem-calendar-table $fullclass'>\n".
177
  "<thead>\n<tr>\n".
178
  "<td>$previous_link</td><td class='month_name' colspan='5'>$month_name $year</td><td>$next_link</td>\n".
179
  "</tr>\n</thead>\n".
184
  // Now we break each key of the array
185
  // into a week and create a new table row for each
186
  // week with the days of that week in the table data
187
+
188
  $i = 0;
189
  foreach($weeks as $week){
190
+ $calendar .= "<tr>\n";
191
+ foreach($week as $d){
192
+ if($i < $offset_count){ //if it is PREVIOUS month
193
+ $calendar .= "<td class='eventless-pre'>$d</td>\n";
194
+ }
195
+ if(($i >= $offset_count) && ($i < ($num_weeks * 7) - $outset)){ // if it is THIS month
196
+ $fullday=$d;
197
  $d=date('j', $d);
198
  $day_link = "$d";
199
+ // original :
200
+ //if($date == mktime(0,0,0,$month,$d,$year)){
201
+ // proposed patch (http://davidebenini.it/events-manager-forum/topic.php?id=73 )
202
+ // if(($date == mktime(0,0,0,$month,$d,$year)) && (date('F') == $month_name)) {
203
+ // my solution:
204
+ if($d == date('j') && $month == date('m') && $year == date('Y')) {
205
+ $calendar .= "<td class='eventless-today'>$d</td>\n";
206
+ } else {
207
+ $calendar .= "<td class='eventless'>$day_link</td>\n";
208
+ }
209
+ } elseif(($outset > 0)) { //if it is NEXT month
210
+ if(($i >= ($num_weeks * 7) - $outset)){
211
+ $calendar .= "<td class='eventless-post'>$d</td>\n";
212
  }
213
+ }
214
+ $i++;
 
 
 
 
215
  }
216
  $calendar .= "</tr>\n";
217
+ }
218
 
219
  $calendar .= " </table>\n</div>";
220
 
221
+ // query the database for events in this time span
222
  if ($month == 1) {
223
  $month_pre=12;
224
  $month_post=2;
239
  $limit_post=date("Y-m-d", mktime(0,0,0,$month_post, 30 , $year_post));
240
  $events_table = $wpdb->prefix.EVENTS_TBNAME;
241
  $sql = "SELECT event_id,
242
+ event_name,
243
+ event_start_date,
244
+ event_start_time,
245
+ event_end_date,
246
+ DATE_FORMAT(event_start_date, '%w') AS 'event_weekday_n',
247
+ DATE_FORMAT(event_start_date, '%e') AS 'event_day',
248
+ DATE_FORMAT(event_start_date, '%c') AS 'event_month_n',
249
+ DATE_FORMAT(event_start_time, '%Y') AS 'event_year',
250
+ DATE_FORMAT(event_start_time, '%k') AS 'event_hh',
251
+ DATE_FORMAT(event_start_time, '%i') AS 'event_mm'
252
+ FROM $events_table
253
+ WHERE (event_start_date BETWEEN '$limit_pre' AND '$limit_post') OR (event_end_date BETWEEN '$limit_pre' AND '$limit_post') ORDER BY event_start_date";
254
 
255
+ $events=$wpdb->get_results($sql, ARRAY_A);
256
 
257
  //----- DEBUG ------------
258
  //foreach($events as $event) { //DEBUG
259
  // $calendar .= ("$event->event_day / $event->event_month_n - $event->event_name<br/>");
260
  //}
261
  // ------------------
262
+
263
+ $eventful_days= array();
264
+ if($events){
265
+ //Go through the events and slot them into the right d-m index
266
+ foreach($events as $event) {
267
+ if( $long_events ){
268
+ //If $long_events is set then show a date as eventful if there is an multi-day event which runs during that day
269
+ $event_start_date = strtotime($event['event_start_date']);
270
+ $event_end_date = strtotime($event['event_end_date']);
271
+ while( $event_start_date <= $event_end_date ){
272
+ $event_eventful_date = date('Y-m-d', $event_start_date);
273
+ //Only show events on the day that they start
274
+ if( is_array($eventful_days[$event_eventful_date]) ){
275
+ $eventful_days[$event_eventful_date][] = $event;
276
+ } else {
277
+ $eventful_days[$event_eventful_date] = array($event);
278
+ }
279
+ $event_start_date += (60*60*24);
280
+ }
281
+ }else{
282
+ //Only show events on the day that they start
283
+ if( is_array($eventful_days[$event['event_start_date']]) ){
284
+ $eventful_days[$event['event_start_date']][] = $event;
285
+ } else {
286
+ $eventful_days[$event['event_start_date']] = array($event);
287
+ }
288
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
289
  }
290
  }
291
+
292
+ $event_format = get_option('dbem_full_calendar_event_format');
293
+ $event_title_format = get_option('dbem_small_calendar_event_title_format');
294
+ $event_title_separator_format = get_option('dbem_small_calendar_event_title_separator');
295
+ $cells = array() ;
296
+ foreach($eventful_days as $day_key => $events) {
297
+ //Set the date into the key
298
+ $event_date = explode('-', $day_key);
299
+ $cells[$day_key]['day'] = ltrim($event_date[2],'0');
300
+ $cells[$day_key]['month'] = $event_date[1];
301
+ $events_titles = array();
302
+ foreach($events as $event) {
303
+ $events_titles[] = dbem_replace_placeholders($event_title_format, $event);
304
+ }
305
+ $link_title = implode($event_title_separator_format,$events_titles);
306
+
307
+ $events_page_id = get_option('dbem_events_page');
308
+ $event_page_link = get_permalink($events_page_id);
309
+ if (stristr($event_page_link, "?"))
310
+ $joiner = "&amp;";
311
+ else
312
+ $joiner = "?";
313
+
314
+
315
+ $cells[$day_key]['cell'] = "<a title='$link_title' href='".$event_page_link.$joiner."calendar_day={$day_key}'>{$cells[$day_key]['day']}</a>";
316
+ if ($full) {
317
+ $cells[$day_key]['cell'] .= "<ul>";
318
+
319
+ foreach($events as $event) {
320
+ $cells[$day_key]['cell'] .= dbem_replace_placeholders($event_format, $event);
321
+ }
322
+ $cells[$day_key]['cell'] .= "</ul>";
323
+ }
324
+ }
325
+
326
+ // print_r($cells);
327
+
328
+ if($events){
329
+ foreach($cells as $cell) {
330
+ if ($cell['month'] == $month_pre) {
331
+ $calendar=str_replace("<td class='eventless-pre'>".$cell['day']."</td>","<td class='eventful-pre'>".$cell['cell']."</td>",$calendar);
332
+ } elseif($cell['month'] == $month_post) {
333
+ $calendar=str_replace("<td class='eventless-post'>".$cell['day']."</td>","<td class='eventful-post'>".$cell['cell']."</td>",$calendar);
334
+ } elseif($cell['day'] == $day && $cell['month'] == date('m')) {
335
+ $calendar=str_replace("<td class='eventless-today'>".$cell['day']."</td>","<td class='eventful-today'>".$cell['cell']."</td>",$calendar);
336
+ } elseif( $cell['month'] == $month ){
337
+ $calendar=str_replace("<td class='eventless'>".$cell['day']."</td>","<td class='eventful'>".$cell['cell']."</td>",$calendar);
338
+ }
339
+ }
340
+ }
341
+
342
  $output=$calendar;
343
  if ($echo)
344
  echo $output;
400
  </style>
401
  <?php
402
  }
403
+ //add_action('wp_head', 'dbem_calendar_style');
404
 
405
  function dbem_translate_and_trim($string, $length = 1) {
406
  return substr(__($string), 0, $length);
419
  function initCalendar() {
420
  $j('a.prev-month').click(function(e){
421
  e.preventDefault();
422
+ tableDiv = $j(this).parents('table').parent();
423
+ ($j(this).hasClass('full-link')) ? fullcalendar = 1 : fullcalendar = 0;
424
+ prevMonthCalendar(tableDiv, fullcalendar);
425
  } );
426
  $j('a.next-month').click(function(e){
427
  e.preventDefault();
428
+ tableDiv = $j(this).parents('table').parent();
429
+ ($j(this).hasClass('full-link')) ? fullcalendar = 1 : fullcalendar = 0;
430
+ nextMonthCalendar(tableDiv, fullcalendar);
431
  } );
432
  }
433
+ function prevMonthCalendar(tableDiv, fullcalendar) {
434
+ if (fullcalendar === undefined) {
435
+ fullcalendar = 0;
436
+ }
437
  month_n = tableDiv.children('div.month_n').html();
438
  year_n = tableDiv.children('div.year_n').html();
439
+ parseInt(month_n) == 1 ? prevMonth = 12 : prevMonth = parseInt(month_n,10) - 1 ;
440
+ if (parseInt(month_n,10) == 1)
441
+ year_n = parseInt(year_n,10) -1;
442
+ $j.get("<?php bloginfo('wpurl'); ?>", {ajaxCalendar: 'true', calmonth: prevMonth, calyear: year_n, full: fullcalendar}, function(data){
443
  tableDiv.html(data);
444
  initCalendar();
445
  });
446
  }
447
+ function nextMonthCalendar(tableDiv, fullcalendar) {
448
+ if (fullcalendar === undefined) {
449
+ fullcalendar = 0;
450
+ }
451
  month_n = tableDiv.children('div.month_n').html();
452
  year_n = tableDiv.children('div.year_n').html();
453
+ parseInt(month_n,10) == 12 ? nextMonth = 1 : nextMonth = parseInt(month_n,10) + 1 ;
454
+ if (parseInt(month_n,10) == 12)
455
+ year_n = parseInt(year_n,10) + 1;
456
+ $j.get("<?php bloginfo('wpurl'); ?>", {ajaxCalendar: 'true', calmonth: nextMonth, calyear: year_n, full : fullcalendar}, function(data){
457
  tableDiv.html(data);
458
  initCalendar();
459
  });
462
  // function reloadCalendar(e) {
463
  // // e.preventDefault();
464
  // console.log($j(this).parents('table'));
465
+ // $j.get("<?php bloginfo('wpurl'); ?>", {ajax: 'true'}, function(data){
466
  // tableDiv = table.parent();
467
  // tableDiv.html(data);
468
  // });
477
 
478
  function dbem_filter_calendar_ajax() {
479
  if(isset($_GET['ajaxCalendar']) && $_GET['ajaxCalendar'] == true) {
480
+ (isset($_GET['full']) && $_GET['full'] == 1) ? $full = 1 : $full = 0;
481
+ $month = dbem_sanitize_request($_GET['month']);
482
+ $year = dbem_sanitize_request($_GET['year']);
483
+ dbem_get_calendar('echo=1&full='.$full);
484
  die();
485
  }
486
  }
489
  function dbem_full_calendar() {
490
  echo "<p>Demo di <code>dbem_full_calendar</code></p>" ;
491
  echo '<div id="jMonthCalendar"></div>';
492
+ dbem_get_calendar("full=1");
493
  }
494
 
495
 
dbem_events.php CHANGED
@@ -1,2214 +1,2288 @@
1
- <?php
2
-
3
- function dbem_new_event_page() {
4
-
5
- $title = __ ( "Insert New Event", 'dbem' );
6
- dbem_event_form ( $event, $title, $element );
7
-
8
- }
9
-
10
- function dbem_events_subpanel() {
11
- global $wpdb;
12
- $action = $_GET ['action'];
13
- $action2 = $_GET ['action2'];
14
- $event_ID = $_GET ['event_id'];
15
- $recurrence_ID = $_GET ['recurrence_id'];
16
- $scope = $_GET ['scope'];
17
- $offset = $_GET ['offset'];
18
- $order = $_GET ['order'];
19
- $selectedEvents = $_GET ['events'];
20
-
21
- // Disable Hello to new user if requested
22
- if (isset ( $_GET ['disable_hello_to_user'] ) && $_GET ['disable_hello_to_user'] == 'true')
23
- update_option ( 'dbem_hello_to_user', 0 );
24
-
25
- if ($order == "")
26
- $order = "ASC";
27
- if ($offset == "")
28
- $offset = "0";
29
- $event_table_name = $wpdb->prefix . EVENTS_TBNAME;
30
- // Debug code, to make sure I get the correct page
31
-
32
-
33
- // DELETE action
34
- if ($action == 'deleteEvents') {
35
- // $sql="DELETE FROM ".$event_table_name." WHERE event_id='"."$event_ID"."'";
36
-
37
-
38
- // TODO eventual error if ID in non-existant
39
- //$wpdb->query($sql);
40
- foreach ( $selectedEvents as $event_ID ) {
41
- dbem_delete_event ( $event_ID );
42
- }
43
-
44
- $events = dbem_get_events ( "", "future" );
45
- dbem_events_table ( $events, 10, "Future events" );
46
- }
47
- // UPDATE or CREATE action
48
- if ($action == 'update_event' || $action == 'update_recurrence') {
49
-
50
- $event = array ();
51
- $location = array ();
52
-
53
- $event ['event_name'] = stripslashes ( $_POST [event_name] );
54
- // Set event end time to event time if not valid
55
- // if (!_dbem_is_date_valid($event['event_end_date']))
56
- // $event['event_end_date'] = $event['event-date'];
57
- $event ['event_start_date'] = $_POST [event_date];
58
- $event ['event_end_date'] = $_POST [event_end_date];
59
- //$event['event_start_time'] = $_POST[event_hh].":".$_POST[event_mm].":00";
60
- //$event['event_end_time'] = $_POST[event_end_hh].":".$_POST[event_end_mm].":00";
61
- $event ['event_start_time'] = date ( "G:i:00", strtotime ( $_POST ['event_start_time'] ) );
62
- $event ['event_end_time'] = date ( "G:i:00", strtotime ( $_POST ['event_end_time'] ) );
63
- $recurrence ['recurrence_name'] = $event ['event_name'];
64
- $recurrence ['recurrence_start_date'] = $event ['event_start_date'];
65
- $recurrence ['recurrence_end_date'] = $event ['event_end_date'];
66
- $recurrence ['recurrence_start_time'] = $event ['event_start_time'];
67
- $recurrence ['recurrence_end_time'] = $event ['event_end_time'];
68
- $recurrence ['recurrence_id'] = $_POST [recurrence_id];
69
- $recurrence ['recurrence_freq'] = $_POST [recurrence_freq];
70
- $recurrence ['recurrence_freq'] == 'weekly' ? $recurrence [recurrence_byday] = implode ( ",", $_POST ['recurrence_bydays'] ) : $recurrence ['recurrence_byday'] = $_POST [recurrence_byday];
71
- $_POST ['recurrence_interval'] == "" ? $recurrence ['recurrence_interval'] = 1 : $recurrence ['recurrence_interval'] = $_POST ['recurrence_interval'];
72
- $recurrence ['recurrence_byweekno'] = $_POST [recurrence_byweekno];
73
-
74
- $event ['event_rsvp'] = $_POST ['event_rsvp'];
75
- $event ['event_seats'] = $_POST ['event_seats'];
76
-
77
- if (isset ( $_POST ['event_contactperson_id'] ) && $_POST ['event_contactperson_id'] != '' && $_POST ['event_contactperson_id'] != '-1') {
78
-
79
- $event ['event_contactperson_id'] = $_POST ['event_contactperson_id'];
80
- $recurrence ['event_contactperson_id'] = $_POST ['event_contactperson_id'];
81
- }
82
-
83
- if (! _dbem_is_time_valid ( $event_end_time ))
84
- $event_end_time = $event_time;
85
-
86
- $location ['location_name'] = $_POST [location_name];
87
- $location ['location_address'] = $_POST [location_address];
88
- $location ['location_town'] = $_POST [location_town];
89
- $location ['location_latitude'] = $_POST [location_latitude];
90
- $location ['location_longitude'] = $_POST [location_longitude];
91
- $location ['location_description'] = "";
92
- /* Marcus Begin Edit */
93
- //switched to WP TinyMCE field
94
- //$event ['event_notes'] = stripslashes ( $_POST [event_notes] );
95
- $event ['event_notes'] = stripslashes ( $_POST ['content'] );
96
- /* Marcus End Edit */
97
- $recurrence ['recurrence_notes'] = $event ['event_notes'];
98
- $validation_result = dbem_validate_event ( $event );
99
-
100
- if ($validation_result == "OK") {
101
- // validation successful
102
-
103
- $related_location = dbem_get_identical_location ( $location );
104
- // print_r($related_location);
105
- if ($related_location) {
106
- $event ['location_id'] = $related_location ['location_id'];
107
- $recurrence ['location_id'] = $related_location ['location_id'];
108
- } else {
109
-
110
- $new_location = dbem_insert_location ( $location );
111
- $event ['location_id'] = $new_location ['location_id'];
112
- $recurrence ['location_id'] = $new_location ['location_id'];
113
- //print_r($new_location);
114
-
115
-
116
- }
117
-
118
- if (! $event_ID && ! $recurrence_ID) {
119
- // there isn't anything
120
- if ($_POST ['repeated_event']) {
121
-
122
- //insert new recurrence
123
- dbem_insert_recurrent_event ( $event, $recurrence );
124
- $feedback_message = __ ( 'New recurrent event inserted!', 'dbem' );
125
- } else {
126
- // INSERT new event
127
- $wpdb->insert ( $event_table_name, $event );
128
- $feedback_message = __ ( 'New event successfully inserted!', 'dbem' );
129
- }
130
- } else {
131
- // something exists
132
- if ($recurrence_ID) {
133
- // UPDATE old recurrence
134
- $recurrence ['recurrence_id'] = $recurrence_ID;
135
- //print_r($recurrence);
136
- if (dbem_update_recurrence ( $recurrence ))
137
- $feedback_message = __ ( 'Recurrence updated!', 'dbem' );
138
- else
139
- $feedback_message = __ ( 'Something went wrong with the recurrence update...', 'dbem' );
140
-
141
- } else {
142
- // UPDATE old event
143
- // unlink from recurrence in case it was generated by one
144
- $event ['recurrence_id'] = null;
145
- $where ['event_id'] = $event_ID;
146
- $wpdb->update ( $event_table_name, $event, $where );
147
- $feedback_message = "'" . $event ['event_name'] . "' " . __ ( 'updated', 'dbem' ) . "!";
148
- }
149
- }
150
-
151
- /* Marcus Begin Edit */
152
- //Save the category if selected
153
- if( is_numeric($_POST['event_category_id']) ){
154
- $insert_id = (! $event_ID && ! $recurrence_ID) ? $wpdb->insert_id : $event_ID;
155
- $wpdb->update ( $event_table_name, array("event_category_id" => $_POST['event_category_id']), array('event_id' => $insert_id) );
156
- }
157
- /* Marcus End Edit */
158
-
159
- //$wpdb->query($sql);
160
- echo "<div id='message' class='updated fade'>
161
- <p>$feedback_message</p>
162
- </div>";
163
- $events = dbem_get_events ( "", "future" );
164
- dbem_events_table ( $events, 10, "Future events" );
165
- } else {
166
- // validation unsuccessful
167
-
168
- echo "<div id='message' class='error '>
169
- <p>" . __ ( "Ach, there's a problem here:", "dbem" ) . " $validation_result</p>
170
- </div>";
171
- dbem_event_form ( $event, "Edit event $event_ID", $event_ID );
172
-
173
- }
174
- }
175
- if ($action == 'edit_event') {
176
- if (! $event_ID) {
177
- $title = __ ( "Insert New Event", 'dbem' );
178
- } else {
179
- $event = dbem_get_event ( $event_ID );
180
- $title = __ ( "Edit Event", 'dbem' ) . " '" . $event ['event_name'] . "'";
181
- }
182
-
183
- //$event=$wpdb->get_row($sql, ARRAY_A);
184
- // Enter new events and updates old ones
185
- // DEBUG: echo"Nome: $event->event_name";
186
-
187
-
188
- dbem_event_form ( $event, $title, $event_ID );
189
-
190
- }
191
- /* Marcus Begin Edit */
192
- //Add duplicate event if requested
193
- if ($action == 'duplicate_event') {
194
- dbem_duplicate_event ( $event_ID );
195
- }
196
- /* Marcus End Edit */
197
- if ($action == 'edit_recurrence') {
198
-
199
- $event_ID = $_GET ['recurrence_id'];
200
- $recurrence = dbem_get_recurrence ( $event_ID );
201
- $title = __ ( "Reschedule", 'dbem' ) . " '" . $recurrence ['recurrence_name'] . "'";
202
- dbem_event_form ( $recurrence, $title, $event_ID );
203
-
204
- }
205
-
206
- if ($action == 'update_recurrence') {
207
- //print_r($recurrence);
208
- //die('update recurrence!');
209
- }
210
-
211
- if ($action == "-1" || $action == "") {
212
- // No action, only showing the events list
213
-
214
-
215
- switch ($scope) {
216
- case "past" :
217
- $title = __ ( 'Past Events', 'dbem' );
218
- break;
219
- case "all" :
220
- $title = __ ( 'All Events', 'dbem' );
221
- break;
222
- default :
223
- $title = __ ( 'Future Events', 'dbem' );
224
- $scope = "future";
225
- }
226
- $limit = 20;
227
- $events = dbem_get_events ( $limit, $scope, $order, $offset );
228
-
229
- dbem_events_table ( $events, $limit, $title );
230
-
231
- }
232
-
233
- }
234
- // array of all pages, bypasses the filter I set up :)
235
- function dbem_get_all_pages() {
236
- global $wpdb;
237
- $query = "SELECT id, post_title FROM " . $wpdb->prefix . "posts WHERE post_type = 'page';";
238
- $pages = $wpdb->get_results ( $query, ARRAY_A );
239
- $output = array ();
240
- foreach ( $pages as $page ) {
241
- $output [$page ['id']] = $page ['post_title'];
242
- }
243
- return $output;
244
- }
245
-
246
- // Function composing the options subpanel
247
- function dbem_options_subpanel() {
248
- // dbem_options_register();
249
-
250
-
251
- ?>
252
- <div class="wrap">
253
- <div id='icon-options-general' class='icon32'><br />
254
- </div>
255
- <h2><?php
256
- _e ( 'Event Manager Options', 'dbem' );
257
- ?></h2>
258
- <form id="dbem_options_form" method="post" action="options.php">
259
- <h3><?php
260
- _e ( 'Events page', 'dbem' );
261
- ?></h3>
262
- <table class="form-table">
263
- <?php
264
- dbem_options_select ( __ ( 'Events page' ), 'dbem_events_page', dbem_get_all_pages (), __ ( 'This option allows you to select which page to use as an events page' ) );
265
- dbem_options_radio_binary ( __ ( 'Display calendar in events page?', 'dbem' ), 'dbem_display_calendar_in_events_page', __ ( 'This options allows to display the calendar in the events page, instead of the default list. It is recommended not to display both the calendar widget and a calendar page.' ) )?>
266
- </table>
267
- <h3><?php
268
- _e ( 'Events format', 'dbem' );
269
- ?></h3>
270
- <table class="form-table">
271
- <?php
272
- /* Marcus Begin Edit */
273
- dbem_options_textarea ( __ ( 'Default event list format', 'dbem' ), 'dbem_event_list_item_format', __ ( 'The format of any events in a list.<br/>Insert one or more of the following placeholders: <code>#_NAME</code>, <code>#_LOCATION</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, <code>#_NOTES</code>.<br/> Use <code>#_LINKEDNAME</code> for the event name with a link to the given event page.<br/> Use <code>#_EVENTPAGEURL</code> to print the event page URL and make your own customised links.<br/> Use <code>#_LOCATIONPAGEURL</code> to print the location page URL and make your own customised links.<br/>To insert date and time values, use <a href="http://www.php.net/manual/en/function.date.php">PHP time format characters</a> with a <code>#</code> symbol before them, i.e. <code>#m</code>, <code>#M</code>, <code>#j</code>, etc.<br/> For the end time, put <code>#@</code> in front of the character, ie. <code>#@h</code>, <code>#@i</code>, etc.<br/> You can also create a date format without prepending <code>#</code> by wrapping it in #_{} or #@_{} (e.g. <code>#_{d/m/Y}</code>). If there is no end date, the value is not shown.<br/> Feel free to use HTML tags as <code>li</code>, <code>br</code> and so on.', 'dbem' ) );
274
- /* Marcus End Edit */
275
- dbem_options_input_text ( __ ( 'Single event page title format', 'dbem' ), 'dbem_event_page_title_format', __ ( 'The format of a single event page title. Follow the previous formatting instructions.', 'dbem' ) );
276
- dbem_options_textarea ( __ ( 'Default single event format', 'dbem' ), 'dbem_single_event_format', __ ( 'The format of a single event page.<br/>Follow the previous formatting instructions. <br/>Use <code>#_MAP</code> to insert a map.<br/>Use <code>#_CONTACTNAME</code>, <code>#_CONTACTEMAIL</code>, <code>#_CONTACTPHONE</code> to insert respectively the name, e-mail address and phone number of the designated contact person. <br/>Use <code>#_ADDBOOKINGFORM</code> to insert a form to allow the user to respond to your events reserving one or more places (RSVP).<br/> Use <code>#_REMOVEBOOKINGFORM</code> to insert a form where users, inserting their name and e-mail address, can remove their bookings.', 'dbem' ) );
277
- dbem_options_radio_binary ( __ ( 'Show events page in lists?', 'dbem' ), 'dbem_list_events_page', __ ( 'Check this option if you want the events page to appear together with other pages in pages lists.', 'dbem' ) );
278
- dbem_options_input_text ( __ ( 'Events page title', 'dbem' ), 'dbem_events_page_title', __ ( 'The title on the multiple events page.', 'dbem' ) );
279
- dbem_options_input_text ( __ ( 'No events message', 'dbem' ), 'dbem_no_events_message', __ ( 'The message displayed when no events are available.', 'dbem' ) );
280
- dbem_options_textarea ( __ ( 'Map text format', 'dbem' ), 'dbem_map_text_format', __ ( 'The format the text appearing in the event page map cloud.<br/>Follow the previous formatting instructions.', 'dbem' ) );
281
- ?>
282
- </table>
283
-
284
- <h3><?php
285
- _e ( 'Locations format', 'dbem' );
286
- ?></h3>
287
- <table class="form-table"><?php
288
- dbem_options_input_text ( __ ( 'Single location page title format', 'dbem' ), 'dbem_location_page_title_format', __ ( 'The format of a single location page title.<br/>Follow the previous formatting instructions.', 'dbem' ) );
289
- dbem_options_textarea ( __ ( 'Default single location page format', 'dbem' ), 'dbem_single_location_format', __ ( 'The format of a single location page.<br/>Insert one or more of the following placeholders: <code>#_NAME</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, <code>#_DESCRIPTION</code>.<br/> Use <code>#_MAP</code> to display a map of the event location, and <code>#_IMAGE</code> to display an image of the location.<br/> Use <code>#_NEXTEVENTS</code> to insert a list of the upcoming events, <code>#_PASTEVENTS</code> for a list of past events, <code>#_ALLEVENTS</code> for a list of all events taking place in this location.', 'dbem' ) );
290
- dbem_options_textarea ( __ ( 'Default location baloon format', 'dbem' ), 'dbem_location_baloon_format', __ ( 'The format of of the text appearing in the baloon describing the location in the map.<br/>Insert one or more of the following placeholders: <code>#_NAME</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, <code>#_DESCRIPTION</code> or <code>#_IMAGE</code>.', 'dbem' ) );
291
- dbem_options_textarea ( __ ( 'Default location event list format', 'dbem' ), 'dbem_location_event_list_item_format', __ ( 'The format of the events the list inserted in the location page through the <code>#_NEXTEVENTS</code>, <code>#_PASTEVENTS</code> and <code>#_ALLEVENTS</code> element. <br/> Follow the events formatting instructions', 'dbem' ) );
292
- dbem_options_textarea ( __ ( 'Default no events message', 'dbem' ), 'dbem_location_no_events_message', __ ( 'The message to be displayed in the list generated by <code>#_NEXTEVENTS</code>, <code>#_PASTEVENTS</code> and <code>#_ALLEVENTS</code> when no events are available.', 'dbem' ) );
293
-
294
- ?>
295
- </table>
296
-
297
- <h3><?php
298
- _e ( 'RSS feed format', 'dbem' );
299
- ?></h3>
300
- <table class="form-table"><?php
301
-
302
- dbem_options_input_text ( __ ( 'RSS main title', 'dbem' ), 'dbem_rss_main_title', __ ( 'The main title of your RSS events feed.', 'dbem' ) );
303
- dbem_options_input_text ( __ ( 'RSS main description', 'dbem' ), 'dbem_rss_main_description', __ ( 'The main description of your RSS events feed.', 'dbem' ) );
304
- dbem_options_input_text ( __ ( 'RSS title format', 'dbem' ), 'dbem_rss_title_format', __ ( 'The format of the title of each item in the events RSS feed.', 'dbem' ) );
305
- dbem_options_input_text ( __ ( 'RSS description format', 'dbem' ), 'dbem_rss_description_format', __ ( 'The format of the description of each item in the events RSS feed. Follow the previous formatting instructions.', 'dbem' ) );
306
- ?>
307
- </table>
308
-
309
- <h3><?php
310
- _e ( 'Maps and geotagging', 'dbem' );
311
- ?></h3>
312
- <table class='form-table'>
313
- <?php
314
- $gmap_is_active = get_option ( 'dbem_gmap_is_active' );
315
- ?>
316
-
317
- <tr valign="top">
318
- <th scope="row"><?php
319
- _e ( 'Enable Google Maps integration?', 'dbem' );
320
- ?></th>
321
- <td><input id="dbem_gmap_is_active_yes" name="dbem_gmap_is_active"
322
- type="radio" value="1"
323
- <?php
324
- if ($gmap_is_active)
325
- echo "checked='checked'";
326
- ?> /><?php
327
- _e ( 'Yes' );
328
- ?> <br />
329
- <input name="dbem_gmap_is_active" type="radio" value="0"
330
- <?php
331
- if (! $gmap_is_active)
332
- echo "checked='checked'";
333
- ?> /> <?php
334
- _e ( 'No' );
335
- ?> <br />
336
- <?php
337
- _e ( 'Check this option to enable Goggle Map integration.', 'dbem' )?>
338
- </td>
339
- </tr>
340
- <?php
341
- dbem_options_input_text ( __ ( 'Google Maps API Key', 'dbem' ), 'dbem_gmap_key', sprintf ( __ ( "To display Google Maps you need a Google Maps API key. Don't worry, it's free, you can get one <a href='%s'>here</a>.", 'dbem' ), 'http://code.google.com/apis/maps/signup.html' ) );
342
- ?>
343
- </table>
344
-
345
- <h3><?php
346
- _e ( 'RSVP and bookings', 'dbem' );
347
- ?></h3>
348
- <table class='form-table'>
349
- <?php
350
- dbem_options_select ( __ ( 'Default contact person', 'dbem' ), 'dbem_default_contact_person', dbem_get_indexed_users (), __ ( 'Select the default contact person. This user will be employed whenever a contact person is not explicitly specified for an event', 'dbem' ) );
351
- dbem_options_radio_binary ( __ ( 'Enable the RSVP e-mail notifications?', 'dbem' ), 'dbem_rsvp_mail_notify_is_active', __ ( 'Check this option if you want to receive an email when someone books places for your events.', 'dbem' ) );
352
- dbem_options_textarea ( __ ( 'Contact person email format', 'dbem' ), 'dbem_contactperson_email_body', __ ( 'The format or the email which will be sent to the contact person. Follow the events formatting instructions. <br/>Use <code>#_RESPNAME</code>, <code>#_RESPEMAIL</code> and <code>#_RESPPHONE</code> to display respectively the name, e-mail, address and phone of the respondent.<br/>Use <code>#_SPACES</code> to display the number of spaces reserved by the respondent.<br/> Use <code>#_BOOKEDSEATS</code> and <code>#_AVAILABLESEATS</code> to display respectively the number of booked and available seats.', 'dbem' ) );
353
- dbem_options_textarea ( __ ( 'Contact person email format', 'dbem' ), 'dbem_respondent_email_body', __ ( 'The format or the email which will be sent to reposdent. Follow the events formatting instructions. <br/>Use <code>#_RESPNAME</code> to display the name of the respondent.<br/>Use <code>#_CONTACTNAME</code> and <code>#_CONTACTMAIL</code> a to display respectively the name and e-mail of the contact person.<br/>Use <code>#_SPACES</code> to display the number of spaces reserved by the respondent.', 'dbem' ) );
354
- dbem_options_input_text ( __ ( 'Notification sender name', 'dbem' ), 'dbem_mail_sender_name', __ ( "Insert the display name of the notification sender.", 'dbem' ) );
355
- dbem_options_input_text ( __ ( 'Notification sender address', 'dbem' ), 'dbem_mail_sender_address', __ ( "Insert the address of the notification sender. It must corresponds with your gmail account user", 'dbem' ) );
356
- dbem_options_input_text ( __ ( 'Default notification receiver address', 'dbem' ), 'dbem_mail_receiver_address', __ ( "Insert the address of the receiver of your notifications", 'dbem' ) );
357
- dbem_options_input_text ( 'Mail sending port', 'dbem_rsvp_mail_port', __ ( "The port through which you e-mail notifications will be sent. Make sure the firewall doesn't block this port", 'dbem' ) );
358
- dbem_options_select ( __ ( 'Mail sending method', 'dbem' ), 'dbem_rsvp_mail_send_method', array ('smtp' => 'SMTP', 'mail' => __ ( 'PHP mail function', 'dbem' ), 'sendmail' => 'Sendmail', 'qmail' => 'Qmail' ), __ ( 'Select the method to send email notification.', 'dbem' ) );
359
- dbem_options_radio_binary ( __ ( 'Use SMTP authentication?', 'dbem' ), 'dbem_rsvp_mail_SMTPAuth', __ ( 'SMTP authenticatio is often needed. If you use GMail, make sure to set this parameter to Yes', 'dbem' ) );
360
- dbem_options_input_text ( 'SMTP host', 'dbem_smtp_host', __ ( "The SMTP host. Usually it corresponds to 'localhost'. If you use GMail, set this value to 'ssl://smtp.gmail.com:465'.", 'dbem' ) );
361
- dbem_options_input_text ( __ ( 'SMTP username', 'dbem' ), 'dbem_smtp_username', __ ( "Insert the username to be used to access your SMTP server.", 'dbem' ) );
362
- dbem_options_input_password ( __ ( 'SMTP password', 'dbem' ), "dbem_smtp_password", __ ( "Insert the password to be used to access your SMTP server", 'dbem' ) );
363
- ?>
364
-
365
-
366
-
367
- </table>
368
-
369
- <h3><?php
370
- _e ( 'Images size', 'dbem' );
371
- ?></h3>
372
- <table class='form-table'> <?php
373
- dbem_options_input_text ( __ ( 'Maximum width (px)', 'dbem' ), 'dbem_image_max_width', __ ( 'The maximum allowed width for images uploades', 'dbem' ) );
374
- dbem_options_input_text ( __ ( 'Maximum height (px)', 'dbem' ), 'dbem_image_max_height', __ ( "The maximum allowed width for images uploaded, in pixels", 'dbem' ) );
375
- dbem_options_input_text ( __ ( 'Maximum size (bytes)', 'dbem' ), 'dbem_image_max_size', __ ( "The maximum allowed size for images uploaded, in pixels", 'dbem' ) );
376
- ?>
377
- </table>
378
-
379
-
380
-
381
- <p class="submit"><input type="submit" id="dbem_options_submit"
382
- name="Submit" value="<?php
383
- _e ( 'Save Changes' )?>" /></p>
384
-
385
-
386
- <?php
387
- settings_fields ( 'dbem-options' );
388
- ?>
389
- </form>
390
- </div>
391
- <?php
392
-
393
- }
394
-
395
- //This is the content of the event page
396
- function dbem_events_page_content() {
397
- global $wpdb;
398
- if (isset ( $_REQUEST ['location_id'] ) && $_REQUEST ['location_id'] |= '') {
399
-
400
- $location = dbem_get_location ( $_REQUEST ['location_id'] );
401
- $single_location_format = get_option ( 'dbem_single_location_format' );
402
- $page_body = dbem_replace_locations_placeholders ( $single_location_format, $location );
403
- return $page_body;
404
-
405
- }
406
- if (isset ( $_REQUEST ['event_id'] ) && $_REQUEST ['event_id'] != '') {
407
- // single event page
408
- $event_ID = $_REQUEST ['event_id'];
409
- $event = dbem_get_event ( $event_ID );
410
- $single_event_format = get_option ( 'dbem_single_event_format' );
411
- $page_body = dbem_replace_placeholders ( $single_event_format, $event );
412
- return $page_body;
413
- } elseif (isset ( $_REQUEST ['calendar_day'] ) && $_REQUEST ['calendar_day'] != '') {
414
-
415
- $date = $_REQUEST ['calendar_day'];
416
- $events_N = dbem_events_count_for ( $date );
417
- // $_GET['scope'] ? $scope = $_GET['scope']: $scope = "future";
418
- // $stored_format = get_option('dbem_event_list_item_format');
419
- // $events_body = dbem_get_events_list(10, $scope, "ASC", $stored_format, $false);
420
- if ($events_N > 1) {
421
- $_GET ['calendar_day'] ? $scope = $_GET ['calendar_day'] : $scope = "future";
422
- $stored_format = get_option ( 'dbem_event_list_item_format' );
423
- $events_body = "<ul class='dbem_events_list'>" . dbem_get_events_list ( 10, $scope, "ASC", $stored_format, $false ) . "</ul>";
424
- return $events_body;
425
- } else {
426
- $events = dbem_get_events ( "", $_REQUEST ['calendar_day'] );
427
- $event = $events [0];
428
- $single_event_format = get_option ( 'dbem_single_event_format' );
429
- $page_body = dbem_replace_placeholders ( $single_event_format, $event );
430
- return $page_body;
431
- }
432
- return $events_body;
433
- } else {
434
- // Multiple events page
435
- $_GET ['scope'] ? $scope = $_GET ['scope'] : $scope = "future";
436
- $stored_format = get_option ( 'dbem_event_list_item_format' );
437
- if (get_option ( 'dbem_display_calendar_in_events_page' ))
438
- $events_body = dbem_get_calendar ();
439
- else
440
- $events_body = $events_body = "<ul class='dbem_events_list'>" . dbem_get_events_list ( 10, $scope, "ASC", $stored_format, $false ) . "</ul>";
441
- return $events_body;
442
-
443
- }
444
- }
445
- function dbem_events_count_for($date) {
446
- global $wpdb;
447
- $table_name = $wpdb->prefix . EVENTS_TBNAME;
448
- $sql = "SELECT COUNT(*) FROM $table_name WHERE event_start_date like '$date';";
449
- return $wpdb->get_var ( $sql );
450
- }
451
-
452
- // filter function to call the event page when appropriate
453
- function dbem_filter_events_page($data) {
454
-
455
- // $table_name = $wpdb->prefix .EVENTS_TBNAME;
456
- // $start = strpos($data, DBEM_PAGE);
457
-
458
-
459
- $is_events_post = (get_the_ID () == get_option ( 'dbem_events_page' ));
460
- $events_page_id = get_option ( 'dbem_events_page' );
461
- if (is_page ( $events_page_id ) && $is_events_post) {
462
- return dbem_events_page_content ();
463
- } else {
464
- return $data;
465
- }
466
- }
467
- add_filter ( 'the_content', 'dbem_filter_events_page' );
468
-
469
- function dbem_events_page_title($data) {
470
- $events_page_id = get_option ( 'dbem_events_page' );
471
- $events_page = get_page ( $events_page_id );
472
- $events_page_title = $events_page->post_title;
473
-
474
- if (($data == $events_page_title) && (is_page ( $events_page_id ))) {
475
- if (isset ( $_REQUEST ['calendar_day'] ) && $_REQUEST ['calendar_day'] != '') {
476
-
477
- $date = $_REQUEST ['calendar_day'];
478
- $events_N = dbem_events_count_for ( $date );
479
-
480
- if ($events_N == 1) {
481
- $events = dbem_get_events ( "", $_REQUEST ['calendar_day'] );
482
- $event = $events [0];
483
- $stored_page_title_format = get_option ( 'dbem_event_page_title_format' );
484
- $page_title = dbem_replace_placeholders ( $stored_page_title_format, $event );
485
- return $page_title;
486
- }
487
-
488
- }
489
-
490
- if (isset ( $_REQUEST ['location_id'] ) && $_REQUEST ['location_id'] |= '') {
491
- $location = dbem_get_location ( $_REQUEST ['location_id'] );
492
- $stored_page_title_format = get_option ( 'dbem_location_page_title_format' );
493
- $page_title = dbem_replace_locations_placeholders ( $stored_page_title_format, $location );
494
- return $page_title;
495
- }
496
- if (isset ( $_REQUEST ['event_id'] ) && $_REQUEST ['event_id'] != '') {
497
- // single event page
498
- $event_ID = $_REQUEST ['event_id'];
499
- $event = dbem_get_event ( $event_ID );
500
- $stored_page_title_format = get_option ( 'dbem_event_page_title_format' );
501
- $page_title = dbem_replace_placeholders ( $stored_page_title_format, $event );
502
- return $page_title;
503
- } else {
504
- // Multiple events page
505
- $page_title = get_option ( 'dbem_events_page_title' );
506
- return $page_title;
507
-
508
- }
509
-
510
- } else {
511
- return $data;
512
- }
513
-
514
- }
515
- // to make sure that in pages lists the title is dbem_events_page_title, and not overwritten by the previous filter
516
- add_filter ( 'the_title', 'dbem_events_page_title' );
517
- add_filter ( 'single_post_title', 'dbem_events_page_title' );
518
-
519
- function dbem_filter_get_pages($data) {
520
- $output = array ();
521
- $events_page_id = get_option ( 'dbem_events_page' );
522
- for($i = 0; $i < count ( $data ); ++ $i) {
523
- if ($data [$i]->ID == $events_page_id) {
524
- $list_events_page = get_option ( 'dbem_list_events_page' );
525
- if ($list_events_page) {
526
- $data [$i]->post_title = get_option ( 'dbem_events_page_title' ) . "&nbsp;";
527
- $output [] = $data [$i];
528
- }
529
- } else {
530
- $output [] = $data [$i];
531
- }
532
- }
533
- return $output;
534
- }
535
- add_filter ( 'get_pages', 'dbem_filter_get_pages' );
536
-
537
- //
538
- // TODO: ROBA NUOVA DA RIORDINARE
539
- // ADMIN CSS for debug
540
- function dbem_admin_css() {
541
- $css = "
542
- <style type='text/css'>
543
- .debug{
544
- color: green;
545
- background: #B7F98C;
546
- margin: 15px;
547
- padding: 10px;
548
- border: 1px solid #629948;
549
- }
550
- .switch-tab {
551
- background: #aaa;
552
- width: 100px;
553
- float: right;
554
- text-align: center;
555
- margin: 3px 1px 0 5px;
556
- padding: 2px;
557
- }
558
- .switch-tab a {
559
- color: #fff;
560
- text-decoration: none;
561
- }
562
- .switch-tab a:hover {
563
- color: #D54E21;
564
-
565
- }
566
- #events-pagination {
567
- text-align: center;
568
-
569
- }
570
- #events-pagination a {
571
- margin: 0 20px 0 20px;
572
- text-decoration: none;
573
- width: 80px;
574
- padding: 3px 0;
575
- background: #FAF4B7;
576
- border: 1px solid #ccc;
577
- border-top: none;
578
- }
579
- #new-event {
580
- float: left;
581
-
582
- }
583
- </style>";
584
- echo $css;
585
- }
586
-
587
- add_action ( 'admin_print_scripts', 'dbem_admin_css' );
588
-
589
- // TEMPLATE TAGS
590
-
591
-
592
- // exposed function, for theme makers
593
- /* Marcus Begin Edit */
594
- //Added a category option to the get events list method and shortcode
595
- function dbem_get_events_list($limit = "3", $scope = "future", $order = "ASC", $format = '', $echo = 1, $category = '') {
596
- if (strpos ( $limit, "=" )) {
597
- // allows the use of arguments without breaking the legacy code
598
- $defaults = array ('limit' => 3, 'scope' => 'future', 'order' => 'ASC', 'format' => '', 'echo' => 1 , 'category' => '');
599
-
600
- $r = wp_parse_args ( $limit, $defaults );
601
- extract ( $r, EXTR_SKIP );
602
- $limit = $r ['limit'];
603
- $scope = $r ['scope'];
604
- $order = $r ['order'];
605
- $format = $r ['format'];
606
- $echo = $r ['echo'];
607
- $category = (is_numeric($r ['category'])) ? $r ['category'] : '' ;
608
- }
609
- if ($scope == "")
610
- $scope = "future";
611
- if ($order != "DESC")
612
- $order = "ASC";
613
- if ($format == '')
614
- $format = get_option ( 'dbem_event_list_item_format' );
615
- $events = dbem_get_events ( $limit, $scope, $order, '', '', $category );
616
- $output = "";
617
- if (! empty ( $events )) {
618
- foreach ( $events as $event ) {
619
- // $localised_date = mysql2date("j M Y", $event->event_time);
620
-
621
-
622
- $output .= dbem_replace_placeholders ( $format, $event );
623
- }
624
- } else {
625
- $output = "<li class='dbem-no-events'>" . get_option ( 'dbem_no_events_message' ) . "</li>";
626
- }
627
- if ($echo)
628
- echo $output;
629
- else
630
- return $output;
631
- }
632
-
633
- function dbem_get_events_list_shortcode($atts) {
634
- extract ( shortcode_atts ( array ('limit' => 3, 'scope' => 'future', 'order' => 'ASC', 'format' => '', 'category' => '' ), $atts ) );
635
- $result = dbem_get_events_list ( "limit=$limit&scope=$scope&order=$order&format=$format&echo=0&category=$category" );
636
- return $result;
637
- }
638
- add_shortcode ( 'events_list', 'dbem_get_events_list_shortcode' );
639
- /* Marcus End Edit*/
640
-
641
- function dbem_get_events_page($justurl = 0, $echo = 1, $text = '') {
642
- if (strpos ( $justurl, "=" )) {
643
- // allows the use of arguments without breaking the legacy code
644
- $defaults = array ('justurl' => 0, 'text' => '', 'echo' => 1 );
645
-
646
- $r = wp_parse_args ( $justurl, $defaults );
647
- extract ( $r, EXTR_SKIP );
648
- $justurl = $r ['justurl'];
649
- $text = $r ['text'];
650
- $echo = $r ['echo'];
651
- }
652
-
653
- $page_link = get_permalink ( get_option ( "dbem_events_page" ) );
654
- if ($justurl) {
655
- $result = $page_link;
656
- } else {
657
- if ($text == '')
658
- $text = get_option ( "dbem_events_page_title" );
659
- $result = "<a href='$page_link' title='$text'>$text</a>";
660
- }
661
- if ($echo)
662
- echo $result;
663
- else
664
- return $result;
665
-
666
- }
667
- function dbem_get_events_page_shortcode($atts) {
668
- extract ( shortcode_atts ( array ('justurl' => 0, 'text' => '' ), $atts ) );
669
- $result = dbem_get_events_page ( "justurl=$justurl&text=$text&echo=0" );
670
- return $result;
671
- }
672
- add_shortcode ( 'events_page', 'dbem_get_events_page_shortcode' );
673
-
674
- function dbem_are_events_available($scope = "future") {
675
- if ($scope == "")
676
- $scope = "future";
677
- $events = dbem_get_events ( 1, $scope );
678
-
679
- if (empty ( $events ))
680
- return FALSE;
681
- else
682
- return TRUE;
683
- }
684
-
685
- // Returns true if the page in question is the events page
686
- function dbem_is_events_page() {
687
- $events_page_id = get_option ( 'dbem_events_page' );
688
- return is_page ( $events_page_id );
689
- }
690
-
691
- function dbem_is_single_event_page() {
692
- return (dbem_is_events_page () && (isset ( $_REQUEST ['event_id'] ) && $_REQUEST ['event_id'] != ''));
693
- }
694
-
695
- function dbem_is_multiple_events_page() {
696
- return (dbem_is_events_page () && ! (isset ( $_REQUEST ['event_id'] ) && $_REQUEST ['event_id'] != ''));
697
- }
698
-
699
- // main function querying the database event table
700
- /* Marcus Begin Edit */
701
- //Added extra method option for cateogry
702
- function dbem_get_events($limit = "", $scope = "future", $order = "ASC", $offset = "", $location_id = "", $category = '') {
703
- /* Marcus End Edit */
704
- global $wpdb;
705
-
706
- $events_table = $wpdb->prefix . EVENTS_TBNAME;
707
- if ($limit != "")
708
- $limit = "LIMIT $limit";
709
- if ($offset != "")
710
- $offset = "OFFSET $offset";
711
- if ($order = "")
712
- $order = "ASC";
713
-
714
- $timestamp = time ();
715
- $date_time_array = getdate ( $timestamp );
716
- $hours = $date_time_array ['hours'];
717
- $minutes = $date_time_array ['minutes'];
718
- $seconds = $date_time_array ['seconds'];
719
- $month = $date_time_array ['mon'];
720
- $day = $date_time_array ['mday'];
721
- $year = $date_time_array ['year'];
722
- $today = strftime ( '%Y-%m-%d', mktime ( $hours, $minutes, $seconds, $month, $day, $year ) );
723
-
724
- $conditions = array ();
725
- if (preg_match ( "/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/", $scope )) {
726
- $conditions [] = " event_start_date like '$scope'";
727
- } else {
728
- if (($scope != "past") && ($scope != "all"))
729
- $scope = "future";
730
- if ($scope == "future")
731
- /* Marcus Begin Edit */
732
- //This is so events with future dates are counted too
733
- $conditions [] = " event_start_date >= '$today' OR (event_end_date >= '$today' AND event_end_date != '0000-00-00' AND event_end_date IS NOT NULL)";
734
- /* Marcus End Edit */
735
- if ($scope == "past")
736
- $conditions [] = " event_start_date < '$today'";
737
- }
738
-
739
- if ($location_id != "")
740
- $conditions [] = " location_id = $location_id";
741
-
742
- /* Marcus Begin Edit */
743
- if ($category != '' && is_numeric($category)){
744
- $conditions [] = " event_category_id = $category";
745
- }
746
- /* Marcus End Edit */
747
-
748
- $where = implode ( " AND ", $conditions );
749
- if ($where != "")
750
- $where = " WHERE " . $where;
751
-
752
- $sql = "SELECT event_id,
753
- event_name,
754
- DATE_FORMAT(event_start_time, '%e') AS 'event_day',
755
- DATE_FORMAT(event_start_time, '%Y') AS 'event_year',
756
- DATE_FORMAT(event_start_time, '%k') AS 'event_hh',
757
- DATE_FORMAT(event_start_time, '%i') AS 'event_mm',
758
- DATE_FORMAT(event_end_time, '%e') AS 'event_end_day',
759
- DATE_FORMAT(event_end_time, '%Y') AS 'event_end_year',
760
- DATE_FORMAT(event_end_time, '%k') AS 'event_end_hh',
761
- DATE_FORMAT(event_end_time, '%i') AS 'event_end_mm',
762
- event_start_date,
763
- event_end_date,
764
- event_start_time,
765
- event_end_time,
766
- event_notes,
767
- event_rsvp,
768
- recurrence_id,
769
- location_id,
770
- event_contactperson_id
771
- FROM $events_table
772
- $where
773
- ORDER BY event_start_date $order
774
- $limit
775
- $offset";
776
-
777
- $wpdb->show_errors = true;
778
- $events = $wpdb->get_results ( $sql, ARRAY_A );
779
- if (! empty ( $events )) {
780
- //$wpdb->print_error();
781
- $inflated_events = array ();
782
- foreach ( $events as $this_event ) {
783
-
784
- $this_location = dbem_get_location ( $this_event ['location_id'] );
785
- $this_event ['location_name'] = $this_location ['location_name'];
786
- $this_event ['location_address'] = $this_location ['location_address'];
787
- $this_event ['location_town'] = $this_location ['location_town'];
788
- array_push ( $inflated_events, $this_event );
789
- }
790
-
791
- return $inflated_events;
792
- } else {
793
- return null;
794
- }
795
- }
796
-
797
- function dbem_get_event($event_id) {
798
- global $wpdb;
799
- $events_table = $wpdb->prefix . EVENTS_TBNAME;
800
- $sql = "SELECT event_id,
801
- event_name,
802
- DATE_FORMAT(event_start_date, '%Y-%m-%e') AS 'event_date',
803
- DATE_FORMAT(event_start_date, '%e') AS 'event_day',
804
- DATE_FORMAT(event_start_date, '%m') AS 'event_month',
805
- DATE_FORMAT(event_start_date, '%Y') AS 'event_year',
806
- DATE_FORMAT(event_start_time, '%k') AS 'event_hh',
807
- DATE_FORMAT(event_start_time, '%i') AS 'event_mm',
808
- DATE_FORMAT(event_start_time, '%h:%i%p') AS 'event_start_12h_time',
809
- DATE_FORMAT(event_start_time, '%H:%i') AS 'event_start_24h_time',
810
- DATE_FORMAT(event_end_time, '%Y-%m-%e') AS 'event_end_date',
811
- DATE_FORMAT(event_end_time, '%e') AS 'event_end_day',
812
- DATE_FORMAT(event_end_time, '%m') AS 'event_end_month',
813
- DATE_FORMAT(event_end_time, '%Y') AS 'event_end_year',
814
- DATE_FORMAT(event_end_time, '%k') AS 'event_end_hh',
815
- DATE_FORMAT(event_end_time, '%i') AS 'event_end_mm',
816
- DATE_FORMAT(event_end_time, '%h:%i%p') AS 'event_end_12h_time',
817
- DATE_FORMAT(event_end_time, '%H:%i') AS 'event_end_24h_time',
818
- event_start_date,
819
- event_end_date,
820
- event_start_time,
821
- event_end_time,
822
- event_notes,
823
- event_rsvp,
824
- event_seats,
825
- recurrence_id,
826
- location_id,
827
- event_contactperson_id
828
- FROM $events_table
829
- WHERE event_id = $event_id";
830
-
831
- //$wpdb->show_errors(true);
832
- $event = $wpdb->get_row ( $sql, ARRAY_A );
833
- //$wpdb->print_error();
834
- $location = dbem_get_location ( $event ['location_id'] );
835
- $event ['location_name'] = $location ['location_name'];
836
- $event ['location_address'] = $location ['location_address'];
837
- $event ['location_town'] = $location ['location_town'];
838
- $event ['location_latitude'] = $location ['location_latitude'];
839
- $event ['location_longitude'] = $location ['location_longitude'];
840
- $event ['location_image_url'] = $location ['location_image_url'];
841
- return $event;
842
- }
843
-
844
- function dbem_hello_to_new_user() {
845
- $current_user = wp_get_current_user ();
846
- $advice = sprintf ( __ ( "<p>Hey, <strong>%s</strong>, welcome to <strong>Events Manager</strong>! We hope you like it around here.</p>
847
- <p>Now it's time to insert events lists through <a href='%s' title='Widgets page'>widgets</a>, <a href='%s' title='Template tags documentation'>template tags</a> or <a href='%s' title='Shortcodes documentation'>shortcodes</a>.</p>
848
- <p>By the way, have you taken a look at the <a href='%s' title='Change settings'>Settings page</a>? That's where you customize the way events and locations are displayed.</p>
849
- <p>What? Tired of seeing this advice? I hear you, <a href='%s' title='Don't show this advice again'>click here</a> and you won't see this again!</p>", 'dbem' ), $current_user->display_name, get_bloginfo ( 'url' ) . '/wp-admin/widgets.php', 'http://davidebenini.it/wordpress-plugins/events-manager#template-tags', 'http://davidebenini.it/wordpress-plugins/events-manager#shortcodes', get_bloginfo ( 'url' ) . '/wp-admin/admin.php?page=events-manager-options', get_bloginfo ( 'url' ) . '/wp-admin/admin.php?page=events-manager/events-manager.php&disable_hello_to_user=true' );
850
- ?>
851
- <div id="message" class="updated">
852
- <?php
853
- echo $advice;
854
- ?>
855
- </div>
856
- <?php
857
- }
858
-
859
- function dbem_events_table($events, $limit, $title) {
860
- if (isset ( $_GET ['scope'] ))
861
- $scope = $_GET ['scope'];
862
- else
863
- $scope = "future";
864
- if (($scope != "past") && ($scope != "all"))
865
- $scope = "future";
866
- $events_count = count ( dbem_get_events ( "", $scope ) );
867
-
868
- if (isset ( $_GET ['offset'] ))
869
- $offset = $_GET ['offset'];
870
-
871
- $use_events_end = get_option ( 'dbem_use_event_end' );
872
-
873
- ?>
874
-
875
- <div class="wrap">
876
- <div id="icon-events" class="icon32"><br />
877
- </div>
878
- <h2><?php
879
- echo $title;
880
- ?></h2>
881
-
882
- <?php
883
- $say_hello = get_option ( 'dbem_hello_to_user' );
884
- if ($say_hello == 1)
885
- dbem_hello_to_new_user ();
886
-
887
- ?>
888
- <!--<div id='new-event' class='switch-tab'><a href="<?php
889
- bloginfo ( 'wpurl' )?>/wp-admin/edit.php?page=events-manager/events-manager.php&amp;action=edit_event"><?php
890
- _e ( 'New Event ...', 'dbem' );
891
- ?></a></div>-->
892
- <?php
893
-
894
- $link = array ();
895
- $link ['past'] = "<a href='" . get_bloginfo ( 'url' ) . "/wp-admin/edit.php?page=events-manager/events-manager.php&amp;scope=past&amp;order=desc'>" . __ ( 'Past events', 'dbem' ) . "</a>";
896
- $link ['all'] = " <a href='" . get_bloginfo ( 'url' ) . "/wp-admin/edit.php?page=events-manager/events-manager.php&amp;scope=all&amp;order=desc'>" . __ ( 'All events', 'dbem' ) . "</a>";
897
- $link ['future'] = " <a href='" . get_bloginfo ( 'url' ) . "/wp-admin/edit.php?page=events-manager/events-manager.php&amp;scope=future'>" . __ ( 'Future events', 'dbem' ) . "</a>";
898
-
899
- $scope_names = array ();
900
- $scope_names ['past'] = __ ( 'Past events', 'dbem' );
901
- $scope_names ['all'] = __ ( 'All events', 'dbem' );
902
- $scope_names ['future'] = __ ( 'Future events', 'dbem' );
903
-
904
- ?>
905
-
906
- <form id="posts-filter" action="" method="get"><input type='hidden'
907
- name='page' value='events-manager/events-manager.php' />
908
- <ul class="subsubsub">
909
- <li><a href='edit.php' class="current"><?php
910
- _e ( 'Total', 'dbem' );
911
- ?> <span
912
- class="count">(<?php
913
- echo (count ( $events ));
914
- ?>)</span></a></li>
915
- </ul>
916
-
917
-
918
- <div class="tablenav">
919
-
920
- <div class="alignleft actions"><select name="action">
921
- <option value="-1" selected="selected"><?php
922
- _e ( 'Bulk Actions' );
923
- ?></option>
924
- <option value="deleteEvents"><?php
925
- _e ( 'Delete selected' );
926
- ?></option>
927
-
928
- </select> <input type="submit" value="<?php
929
- _e ( 'Apply' );
930
- ?>"
931
- name="doaction2" id="doaction2" class="button-secondary action" /> <select
932
- name="scope">
933
-
934
- <?php
935
- foreach ( $scope_names as $key => $value ) {
936
- $selected = "";
937
- if ($key == $scope)
938
- $selected = "selected='selected'";
939
- echo "<option value='$key' $selected>$value</option> ";
940
- }
941
- ?>
942
- </select> <input id="post-query-submit" class="button-secondary"
943
- type="submit" value="<?php
944
- _e ( 'Filter' )?>" /></div>
945
- <div class="clear"></div>
946
- <?php
947
- if (empty ( $events )) {
948
- // TODO localize
949
- echo "no events";
950
- } else {
951
- ?>
952
-
953
- <table class="widefat">
954
- <thead>
955
- <tr>
956
- <th class='manage-column column-cb check-column' scope='col'><input
957
- class='select-all' type="checkbox" value='1' /></th>
958
- <th><?php
959
- _e ( 'Name', 'dbem' );
960
- ?></th>
961
- <?php /* Marcus Begin Edit */ ?>
962
- <th></th>
963
- <?php /* Marcus End Edit */ ?>
964
- <th><?php
965
- _e ( 'Location', 'dbem' );
966
- ?></th>
967
- <th colspan="2"><?php
968
- _e ( 'Date and time', 'dbem' );
969
- ?></th>
970
- </tr>
971
- </thead>
972
- <tbody>
973
- <?php
974
- $i = 1;
975
- foreach ( $events as $event ) {
976
- $class = ($i % 2) ? ' class="alternate"' : '';
977
- // FIXME set to american
978
- $localised_date = mysql2date ( __ ( 'D d M Y' ), $event ['event_start_date'] );
979
- $style = "";
980
- $today = date ( "Y-m-d" );
981
-
982
- $location_summary = "<b>" . $event ['location_name'] . "</b><br/>" . $event ['location_address'] . " - " . $event ['location_town'];
983
-
984
- if ($event ['event_start_date'] < $today)
985
- $style = "style ='background-color: #FADDB7;'";
986
- ?>
987
- <tr <?php
988
- echo "$class $style";
989
- ?>>
990
-
991
- <td><input type='checkbox' class='row-selector'
992
- value='<?php
993
- echo $event ['event_id'];
994
- ?>' name='events[]' /></td>
995
- <td><strong><a class="row-title"
996
- href="<?php
997
- bloginfo ( 'wpurl' )?>/wp-admin/edit.php?page=events-manager/events-manager.php&amp;action=edit_event&amp;event_id=<?php
998
- echo $event ['event_id'];
999
- ?>"><?php
1000
- echo ($event ['event_name']);
1001
- ?></a></strong>
1002
- </td>
1003
- <td>
1004
- <?php /* Marcus Begin Edit */ ?>
1005
- <a
1006
- href="<?php
1007
- bloginfo ( 'wpurl' )?>/wp-admin/edit.php?page=events-manager/events-manager.php&amp;action=duplicate_event&amp;event_id=<?php
1008
- echo $event ['event_id'];
1009
- ?>"
1010
- title="<?php
1011
- _e ( 'Duplicate this event', 'dbem' );
1012
- ?>"><strong>+</strong></a>
1013
- <?php /* Marcus End Edit */ ?>
1014
- </td>
1015
- <td>
1016
-
1017
- <?php
1018
- echo $location_summary;
1019
- ?>
1020
-
1021
- </td>
1022
-
1023
- <td>
1024
- <?php
1025
- echo $localised_date;
1026
- ?><br />
1027
-
1028
- <?php
1029
- echo substr ( $event ['event_start_time'], 0, 5 ) . " - " . substr ( $event ['event_end_time'], 0, 5 );
1030
- ?>
1031
- </td>
1032
- <td>
1033
- <?php
1034
- if ($event ['recurrence_id']) {
1035
- $recurrence = dbem_get_recurrence ( $event [recurrence_id] );
1036
- ?>
1037
-
1038
- <b><?php
1039
- echo $recurrence ['recurrence_description'];
1040
- ?> <br />
1041
- <a
1042
- href="<?php
1043
- bloginfo ( 'wpurl' )?>/wp-admin/edit.php?page=events-manager/events-manager.php&amp;action=edit_recurrence&amp;recurrence_id=<?php
1044
- echo $recurrence ['recurrence_id'];
1045
- ?>"><?php
1046
- _e ( 'Reschedule', 'dbem' );
1047
- ?></a></b>
1048
-
1049
-
1050
- <?php
1051
- }
1052
- ?>
1053
- </td>
1054
-
1055
-
1056
- <?php
1057
- echo '</tr>';
1058
- $i ++;
1059
- }
1060
- ?>
1061
-
1062
-
1063
-
1064
-
1065
-
1066
- </tbody>
1067
- </table>
1068
- <?php
1069
- } // end of table ?>
1070
-
1071
- <div class='tablenav'>
1072
- <div class="alignleft actions"><br class='clear' />
1073
- </div>
1074
- <br class='clear' />
1075
- </div>
1076
-
1077
- </form>
1078
- </div>
1079
- </div>
1080
-
1081
- <?php
1082
- if ($events_count > $limit) {
1083
- $backward = $offset + $limit;
1084
- $forward = $offset - $limit;
1085
- if (DEBUG)
1086
- echo "COUNT = $count BACKWARD = $backward FORWARD = $forward<br> -- OFFSET = $offset";
1087
- echo "<div id='events-pagination'> ";
1088
- if ($backward < $events_count)
1089
- echo "<a style='float: left' href='" . get_bloginfo ( 'url' ) . "/wp-admin/edit.php?page=events-manager/events-manager.php&amp;scope=$scope&offset=$backward'>&lt;&lt;</a>";
1090
- if ($forward >= 0)
1091
- echo "<a style='float: right' href='" . get_bloginfo ( 'url' ) . "/wp-admin/edit.php?page=events-manager/events-manager.php&amp;scope=$scope&offset=$forward'>&gt;&gt;</a>";
1092
- echo "</div>";
1093
- }
1094
- ?>
1095
-
1096
- </div>
1097
- <?php
1098
- }
1099
- function dbem_event_form($event, $title, $element) {
1100
-
1101
- global $localised_date_formats;
1102
- // change prefix according to event/recurrence
1103
- $_GET ['action'] == "edit_recurrence" ? $pref = "recurrence_" : $pref = "event_";
1104
-
1105
- $_GET ['action'] == "edit_recurrence" ? $form_destination = "edit.php?page=events-manager/events-manager.php&amp;action=update_recurrence&amp;recurrence_id=" . $element : $form_destination = "edit.php?page=events-manager/events-manager.php&amp;action=update_event&amp;event_id=" . $element;
1106
-
1107
- $locale_code = substr ( get_locale (), 0, 2 );
1108
- $localised_date_format = $localised_date_formats [$locale_code];
1109
-
1110
- $hours_locale = "24";
1111
- // Setting 12 hours format for those countries using it
1112
- if (preg_match ( "/en|sk|zh|us|uk/", $locale_code ))
1113
- $hours_locale = "12";
1114
-
1115
- $localised_example = str_replace ( "yy", "2008", str_replace ( "mm", "11", str_replace ( "dd", "28", $localised_date_format ) ) );
1116
- $localised_end_example = str_replace ( "yy", "2008", str_replace ( "mm", "11", str_replace ( "dd", "28", $localised_date_format ) ) );
1117
-
1118
- if ($event [$pref . 'start_date'] != "") {
1119
- preg_match ( "/(\d{4})-(\d{2})-(\d{2})/", $event [$pref . 'start_date'], $matches );
1120
- $year = $matches [1];
1121
- $month = $matches [2];
1122
- $day = $matches [3];
1123
- $localised_date = str_replace ( "yy", $year, str_replace ( "mm", $month, str_replace ( "dd", $day, $localised_date_format ) ) );
1124
- } else {
1125
- $localised_date = "";
1126
- }
1127
- if ($event [$pref . 'end_date'] != "") {
1128
- preg_match ( "/(\d{4})-(\d{2})-(\d{2})/", $event [$pref . 'end_date'], $matches );
1129
- $end_year = $matches [1];
1130
- $end_month = $matches [2];
1131
- $end_day = $matches [3];
1132
- $localised_end_date = str_replace ( "yy", $end_year, str_replace ( "mm", $end_month, str_replace ( "dd", $end_day, $localised_date_format ) ) );
1133
- } else {
1134
- $localised_end_date = "";
1135
- }
1136
- // if($event[$pref.'rsvp'])
1137
- // echo (dbem_bookings_table($event[$pref.'id']));
1138
-
1139
-
1140
- $freq_options = array ("daily" => __ ( 'Daily', 'dbem' ), "weekly" => __ ( 'Weekly', 'dbem' ), "monthly" => __ ( 'Monthly', 'dbem' ) );
1141
- $days_names = array (1 => __ ( 'Mon' ), 2 => __ ( 'Tue' ), 3 => __ ( 'Wed' ), 4 => __ ( 'Thu' ), 5 => __ ( 'Fri' ), 6 => __ ( 'Sat' ), 7 => __ ( 'Sun' ) );
1142
- $saved_bydays = explode ( ",", $event ['recurrence_byday'] );
1143
- $weekno_options = array ("1" => __ ( 'first', 'dbem' ), '2' => __ ( 'second', 'dbem' ), '3' => __ ( 'third', 'dbem' ), '4' => __ ( 'fourth', 'dbem' ), '-1' => __ ( 'last', 'dbem' ) );
1144
-
1145
- $event [$pref . 'rsvp'] ? $event_RSVP_checked = "checked='checked'" : $event_RSVP_checked = '';
1146
-
1147
- ?>
1148
- <form id="eventForm" method="post" action="<?php echo $form_destination; ?>">
1149
- <div class="wrap">
1150
- <div id="icon-events" class="icon32"><br /></div>
1151
- <h2><?php echo $title; ?></h2>
1152
- <?php
1153
- if ($event ['recurrence_id']) {
1154
- ?>
1155
- <p id='recurrence_warning'>
1156
- <?php
1157
- if (isset ( $_GET ['action'] ) && ($_GET ['action'] == 'edit_recurrence')) {
1158
- _e ( 'WARNING: This is a recurrence.', 'dbem' )?>
1159
- <br />
1160
- <?php
1161
- _e ( 'Modifying these data all the events linked to this recurrence will be rescheduled', 'dbem' );
1162
-
1163
- } else {
1164
- _e ( 'WARNING: This is a recurring event.', 'dbem' );
1165
- _e ( 'If you change these data and save, this will become an independent event.', 'dbem' );
1166
- }
1167
- ?>
1168
- </p>
1169
- <?php
1170
- }
1171
- ?>
1172
- <?php
1173
- /* Marcus Begin Edit */
1174
- //This is an edit for WP 2.8 for styling fix
1175
- ?>
1176
- <div id="poststuff" class="metabox-holder has-right-sidebar">
1177
- <!-- SIDEBAR -->
1178
- <div id="side-info-column" class='inner-sidebar'>
1179
- <div id='side-sortables'>
1180
- <!-- recurrence postbox -->
1181
- <div class="postbox ">
1182
- <div class="handlediv" title="Fare clic per cambiare."><br />
1183
- </div>
1184
- <h3 class='hndle'><span>
1185
- <?php
1186
- _e ( "Recurrence", 'dbem' );
1187
- ?>
1188
- </span></h3>
1189
- <div class="inside">
1190
- <?php
1191
- if (! $event ['event_id']) {
1192
- ?>
1193
- <?php
1194
- if ($event ['recurrence_id'] != "")
1195
- $recurrence_YES = "checked='checked'";
1196
-
1197
- ?>
1198
- <p>
1199
- <input id="event-recurrence" type="checkbox"
1200
- name="repeated_event" value="1" <?php
1201
- echo $recurrence_YES;
1202
- ?> />
1203
- <?php
1204
- _e ( 'Repeated event', 'dbem' );
1205
- ?>
1206
- </p>
1207
- <div id="event_recurrence_pattern">
1208
- <p>Frequency:
1209
- <select id="recurrence-frequency" name="recurrence_freq">
1210
- <?php
1211
- dbem_option_items ( $freq_options, $event [$pref . 'freq'] );
1212
- ?>
1213
- </select>
1214
- </p>
1215
- <p>
1216
- <?php
1217
- _e ( 'Every', 'dbem' )?>
1218
- <input id="recurrence-interval" name='recurrence_interval'
1219
- size='2' value='<?php
1220
- echo $event ['recurrence_interval'];
1221
- ?>'>
1222
- </input>
1223
- <span class='interval-desc' id="interval-daily-singular">
1224
- <?php _e ( 'day', 'dbem' )?>
1225
- </span> <span class='interval-desc' id="interval-daily-plural">
1226
- <?php _e ( 'days', 'dbem' ) ?>
1227
- </span> <span class='interval-desc' id="interval-weekly-singular">
1228
- <?php _e ( 'week', 'dbem' )?>
1229
- </span> <span class='interval-desc' id="interval-weekly-plural">
1230
- <?php _e ( 'weeks', 'dbem' )?>
1231
- </span> <span class='interval-desc' id="interval-monthly-singular">
1232
- <?php _e ( 'month', 'dbem' )?>
1233
- </span> <span class='interval-desc' id="interval-monthly-plural">
1234
- <?php _e ( 'months', 'dbem' )?>
1235
- </span> </p>
1236
- <p class="alternate-selector" id="weekly-selector">
1237
- <?php dbem_checkbox_items ( 'recurrence_bydays[]', $days_names, $saved_bydays );
1238
- ?>
1239
- </p>
1240
- <p class="alternate-selector" id="monthly-selector">
1241
- <?php
1242
- _e ( 'Every', 'dbem' )?>
1243
- <select id="monthly-modifier" name="recurrence_byweekno">
1244
- <?php
1245
- dbem_option_items ( $weekno_options, $event ['recurrence_byweekno'] );
1246
- ?>
1247
- </select>
1248
- <select id="recurrence-weekday"
1249
- name="recurrence_byday">
1250
- <?php
1251
- dbem_option_items ( $days_names, $event ['recurrence_byday'] );
1252
- ?>
1253
- </select>
1254
- &nbsp;</p>
1255
- </div>
1256
- <p id="recurrence-tip">
1257
- <?php
1258
- _e ( 'Check if your event happens more than once according to a regular pattern', 'dbem' )?>
1259
- </p>
1260
- <?php
1261
- } else {
1262
-
1263
- if (! $event ['recurrence_id']) {
1264
- echo "<p>" . __ ( 'This is\'t a recurrent event', 'dbem' ) . ".</p>";
1265
- } else {
1266
-
1267
- $recurrence = dbem_get_recurrence ( $event ['recurrence_id'] );
1268
- ?>
1269
- <p>
1270
- <?php
1271
- echo $recurrence ['recurrence_description'];
1272
- ?>
1273
- <br />
1274
- <a
1275
- href="<?php
1276
- bloginfo ( 'wpurl' )?>/wp-admin/edit.php?page=events-manager/events-manager.php&amp;action=edit_recurrence&amp;recurrence_id=<?php
1277
- echo $recurrence ['recurrence_id'];
1278
- ?>">
1279
- <?php
1280
- _e ( 'Reschedule', 'dbem' );
1281
- ?>
1282
- </a></p>
1283
- <?php
1284
- }
1285
- ?>
1286
- <?php
1287
- }
1288
- ?>
1289
- </div>
1290
- </div>
1291
- <div class="postbox ">
1292
- <div class="handlediv" title="Fare clic per cambiare."><br />
1293
- </div>
1294
- <h3 class='hndle'><span>
1295
- <?php
1296
- _e ( 'Contact Person', 'dbem' );
1297
- ?>
1298
- </span></h3>
1299
- <div class="inside">
1300
- <p>Contact:
1301
- <?php
1302
- wp_dropdown_users ( array ('name' => 'event_contactperson_id', 'show_option_none' => __ ( "Select...", 'dbem' ), 'selected' => $event ['event_contactperson_id'] ) );
1303
- ?>
1304
- </p>
1305
- </div>
1306
- </div>
1307
- <div class="postbox ">
1308
- <div class="handlediv" title="Fare clic per cambiare."><br />
1309
- </div>
1310
- <h3 class='hndle'><span>RSVP</span></h3>
1311
- <div class="inside">
1312
- <p>
1313
- <input id="rsvp-checkbox" name='event_rsvp' value='1' type='checkbox'
1314
- <?php
1315
- echo $event_RSVP_checked?> />
1316
- <?php
1317
- _e ( 'Enable registration for this event', 'dbem' )?>
1318
- </p>
1319
- <div id='rsvp-data'>
1320
- <?php
1321
- if ($event ['event_contactperson_id'] != NULL)
1322
- $selected = $event ['event_contactperson_id'];
1323
- else
1324
- $selected = '0';
1325
- ?>
1326
- <p>
1327
- <?php
1328
- _e ( 'Spaces' );
1329
- ?>
1330
- :
1331
- <input id="seats-input" type="text"
1332
- name="event_seats" size='5' value="<?php
1333
- echo $event [$pref . 'seats']?>" />
1334
- </p>
1335
- <?php
1336
- if ($event ['event_rsvp']) {
1337
- ?>
1338
- <?php
1339
- dbem_bookings_compact_table ( $event [$pref . 'id'] );
1340
- ?>
1341
- <?php
1342
- }
1343
- ?>
1344
- </div>
1345
- </div>
1346
- </div>
1347
- <?
1348
- /* Marcus Begin Edit */
1349
- //adding the category selection box
1350
- ?>
1351
- <div class="postbox ">
1352
- <div class="handlediv" title="Fare clic per cambiare."><br />
1353
- </div>
1354
- <h3 class='hndle'><span>
1355
- <?php _e ( 'Category', 'dbem' ); ?>
1356
- </span></h3>
1357
- <div class="inside">
1358
- <p>Category:
1359
- <select name="event_category_id">
1360
- <?php
1361
- $categories = dbem_get_categories();
1362
- ?>
1363
- <option value="">Select...</option>
1364
- <?php
1365
- foreach ( $categories as $category ){
1366
- $event_category = dbem_get_event_category($event['event_id']);
1367
- $selected = ($category['category_id'] == $event_category['category_id']) ? "selected='selected'": '';
1368
- ?>
1369
- <option value="<?= $category['category_id'] ?>" <?= $selected ?>>
1370
- <?= $category['category_name'] ?>
1371
- </option>
1372
- <?
1373
- }
1374
- ?>
1375
- </select>
1376
- </p>
1377
- </div>
1378
- </div>
1379
- </div>
1380
- <? /* Marcus End Edit */ ?>
1381
- </div>
1382
- <!-- END OF SIDEBAR -->
1383
- <div id="post-body">
1384
- <div id="post-body-content">
1385
- <? /* Marcus End Edit */ ?>
1386
- <div id="event_name" class="stuffbox">
1387
- <h3>
1388
- <?php
1389
- _e ( 'Name', 'dbem' );
1390
- ?>
1391
- </h3>
1392
- <div class="inside">
1393
- <input type="text" name="event_name"
1394
- value="<?php
1395
- echo $event [$pref . 'name']?>" />
1396
- <br />
1397
- <?php
1398
- _e ( 'The event name. Example: Birthday party', 'dbem' )?>
1399
- </div>
1400
- </div>
1401
- <div id="event_start_date" class="stuffbox">
1402
- <h3 id='event-date-title'>
1403
- <?php
1404
- _e ( 'Event date', 'dbem' );
1405
- ?>
1406
- </h3>
1407
- <h3 id='recurrence-dates-title'>
1408
- <?php
1409
- _e ( 'Recurrence dates', 'dbem' );
1410
- ?>
1411
- </h3>
1412
- <div class="inside">
1413
- <input id="localised-date" type="text"
1414
- name="localised_event_date" value="<?php
1415
- echo $localised_date?>"
1416
- style="display: none;" />
1417
- <input id="date-to-submit" type="text"
1418
- name="event_date" value="<?php
1419
- echo $event [$pref . 'start_date']?>"
1420
- style="background: #FCFFAA" />
1421
- <input id="localised-end-date"
1422
- type="text" name="localised_event_end_date"
1423
- value="<?php
1424
- echo $localised_end_date?>" style="display: none;" />
1425
- <input
1426
- id="end-date-to-submit" type="text" name="event_end_date"
1427
- value="<?php
1428
- echo $event [$pref . 'end_date']?>"
1429
- style="background: #FCFFAA" />
1430
- <br />
1431
- <span id='event-date-explanation'>
1432
- <?php
1433
- _e ( 'The event date.', 'dbem' );
1434
- /* Marcus Begin Edit */
1435
- echo " ";
1436
- _e ( 'When not reoccurring, this event spans between the beginning and end date.', 'dbem' );
1437
- /* Marcus End Edit */
1438
- ?>
1439
- </span><span
1440
- id='recurrence-dates-explanation'>
1441
- <?php
1442
- _e ( 'The recurrence beginning and end date.', 'dbem' );
1443
- ?>
1444
- </span> </div>
1445
- </div>
1446
- <div id="event_end_day" class="stuffbox">
1447
- <h3>
1448
- <?php
1449
- _e ( 'Event time', 'dbem' );
1450
- ?>
1451
- </h3>
1452
- <div class="inside">
1453
- <input id="start-time" type="text" size="8"
1454
- maxlength="8" name="event_start_time"
1455
- value="<?php
1456
- echo $event [$pref . 'start_' . $hours_locale . "h_time"];
1457
- ?>" />
1458
- -
1459
- <input id="end-time" type="text" size="8" maxlength="8"
1460
- name="event_end_time"
1461
- value="<?php
1462
- echo $event [$pref . 'end_' . $hours_locale . "h_time"];
1463
- ?>" />
1464
- <br />
1465
- <?php
1466
- _e ( 'The time of the event beginning and end', 'dbem' )?>
1467
- . </div>
1468
- </div>
1469
- <div id="location_coordinates" class="stuffbox" style='display: none;'>
1470
- <h3>
1471
- <?php
1472
- _e ( 'Coordinates', 'dbem' );
1473
- ?>
1474
- </h3>
1475
- <div class="inside">
1476
- <input id='location-latitude'
1477
- name='location_latitude' type='text'
1478
- value='<?php
1479
- echo $event ['location_latitude'];
1480
- ?>' size='15' />
1481
- -
1482
- <input
1483
- id='location-longitude' name='location_longitude' type='text'
1484
- value='<?php
1485
- echo $event ['location_longitude'];
1486
- ?>' size='15' />
1487
- </div>
1488
- </div>
1489
- <div id="location_name" class="stuffbox">
1490
- <h3>
1491
- <?php
1492
- _e ( 'Location', 'dbem' );
1493
- ?>
1494
- </h3>
1495
- <div class="inside">
1496
- <table id="dbem-location-data">
1497
- <tr>
1498
- <th><?php
1499
- _e ( 'Name:' )?>
1500
- &nbsp;</th>
1501
- <td><input id="location-name" type="text" name="location_name"
1502
- value="<?php
1503
- echo $event ['location_name']?>" /></td>
1504
- <?php
1505
- $gmap_is_active = get_option ( 'dbem_gmap_is_active' );
1506
- ?>
1507
- <?php
1508
- if ($gmap_is_active) {
1509
- ?>
1510
- <td rowspan='6'><div id='map-not-found'
1511
- style='width: 400px; font-size: 140%; text-align: center; margin-top: 100px; display: hide'>
1512
- <p>
1513
- <?php
1514
- _e ( 'Map not found' );
1515
- ?>
1516
- </p>
1517
- </div>
1518
- <div id='event-map'
1519
- style='width: 400px; height: 300px; background: green; display: hide; margin-right: 8px'></div></td>
1520
- <?php
1521
- }
1522
- ; // end of IF_GMAP_ACTIVE ?>
1523
- </tr>
1524
- <tr>
1525
- <td colspan='2'><p>
1526
- <?php
1527
- _e ( 'The name of the location where the event takes place. You can use the name of a venue, a square, etc', 'dbem' )?>
1528
- </p></td>
1529
- </tr>
1530
- <tr>
1531
- <th><?php
1532
- _e ( 'Address:' )?>
1533
- &nbsp;</th>
1534
- <td><input id="location-address" type="text" name="location_address"
1535
- value="<?php
1536
- echo $event ['location_address'];
1537
- ?>" /></td>
1538
- </tr>
1539
- <tr>
1540
- <td colspan='2'><p>
1541
- <?php
1542
- _e ( 'The address of the location where the event takes place. Example: 21, Dominick Street', 'dbem' )?>
1543
- </p></td>
1544
- </tr>
1545
- <tr>
1546
- <th><?php
1547
- _e ( 'Town:' )?>
1548
- &nbsp;</th>
1549
- <td><input id="location-town" type="text" name="location_town"
1550
- value="<?php
1551
- echo $event ['location_town']?>" /></td>
1552
- </tr>
1553
- <tr>
1554
- <td colspan='2'><p>
1555
- <?php
1556
- _e ( 'The town where the location is located. If you\'re using the Google Map integration and want to avoid geotagging ambiguities include the country in the town field. Example: Verona, Italy.', 'dbem' )?>
1557
- </p></td>
1558
- </tr>
1559
- </table>
1560
- </div>
1561
- </div>
1562
- <div id="event_notes" class="postbox">
1563
- <h3>
1564
- <?php
1565
- _e ( 'Details', 'dbem' );
1566
- ?>
1567
- </h3>
1568
- <div class="inside">
1569
- <? /* Marcus Begin Edit */ ?>
1570
- <!-- Currently deactivated for editor test
1571
- <textarea name="event_notes" rows="8" cols="60">
1572
- <?php
1573
- echo $event [$pref . 'notes'];
1574
- ?>
1575
- </textarea>
1576
- -->
1577
- <div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>" class="postarea">
1578
- <?php the_editor($event [$pref . 'notes']); ?>
1579
- </div>
1580
- <? /* Marcus End Edit */ ?>
1581
- <br />
1582
- <?php
1583
- _e ( 'Details about the event', 'dbem' )?>
1584
- </div>
1585
- </div>
1586
- </div>
1587
- <p class="submit">
1588
- <input type="submit" name="events_update"
1589
- value="<?php
1590
- _e ( 'Submit Event', 'dbem' );
1591
- ?> &raquo;" />
1592
- </p>
1593
- </div>
1594
- </div>
1595
- </div>
1596
- </form>
1597
- <?php
1598
- }
1599
-
1600
- function dbem_validate_event($event) {
1601
- // Only for emergencies, when JS is disabled
1602
- // TODO make it fully functional without JS
1603
- global $required_fields;
1604
- $errors = Array ();
1605
- foreach ( $required_fields as $field ) {
1606
- if ($event [$field] == "") {
1607
- $errors [] = $field;
1608
- }
1609
- }
1610
- $error_message = "";
1611
- if (count ( $errors ) > 0)
1612
- $error_message = __ ( 'Missing fields: ' ) . implode ( ", ", $errors ) . ". ";
1613
- if ($_POST ['repeated_event'] == "1" && $_POST ['event_end_date'] == "")
1614
- $error_message .= __ ( 'Since the event is repeated, you must specify an event date.', 'dbem' );
1615
- if ($error_message != "")
1616
- return $error_message;
1617
- else
1618
- return "OK";
1619
-
1620
- }
1621
-
1622
- function _dbem_is_date_valid($date) {
1623
- $year = substr ( $date, 0, 4 );
1624
- $month = substr ( $date, 5, 2 );
1625
- $day = substr ( $date, 8, 2 );
1626
- return (checkdate ( $month, $day, $year ));
1627
- }
1628
- function _dbem_is_time_valid($time) {
1629
- $result = preg_match ( "/([01]\d|2[0-3])(:[0-5]\d)/", $time );
1630
-
1631
- return ($result);
1632
- }
1633
- // Enqueing jQuery script to make sure it's loaded
1634
- function dbem_enque_scripts() {
1635
- wp_enqueue_script ( 'jquery' );
1636
- // wp_enqueue_script('datepicker','/wp-content/plugins/events-manager/jquery-ui-datepicker/jquery-ui-personalized-1.6b.js', array('jquery') );
1637
- }
1638
- add_action ( 'template_redirect', 'dbem_enque_scripts' );
1639
-
1640
- function url_exists($url) {
1641
-
1642
- if ((strpos ( $url, "http" )) === false)
1643
- $url = "http://" . $url;
1644
- // FIXME ripristina la linea seguente e VEDI DI SISTEMARE!!!!
1645
- // if (is_array(@get_headers($url))) {
1646
- if (true)
1647
- return true;
1648
- else
1649
- return false;
1650
- }
1651
-
1652
- // General script to make sure hidden fields are shown when containing data
1653
- function dbem_admin_general_script() {
1654
- ?>
1655
- <script
1656
- src="<?php
1657
- bloginfo ( 'url' );
1658
- ?>/wp-content/plugins/events-manager/dbem.js"
1659
- type="text/javascript"></script>
1660
- <script
1661
- src="<?php
1662
- bloginfo ( 'url' );
1663
- ?>/wp-content/plugins/events-manager/js/jquery-ui-datepicker/ui.datepicker.js"
1664
- type="text/javascript"></script>
1665
- <script
1666
- src="<?php
1667
- bloginfo ( 'url' );
1668
- ?>/wp-content/plugins/events-manager/js/timeentry/jquery.timeentry.js"
1669
- type="text/javascript"></script>
1670
- <?php
1671
-
1672
- // Check if the locale is there and loads it
1673
- $locale_code = substr ( get_locale (), 0, 2 );
1674
-
1675
- $show24Hours = 'true';
1676
- // Setting 12 hours format for those countries using it
1677
- if (preg_match ( "/en|sk|zh|us|uk/", $locale_code ))
1678
- $show24Hours = 'false';
1679
-
1680
- $locale_file = get_bloginfo ( 'url' ) . "/wp-content/plugins/events-manager/js/jquery-ui-datepicker/i18n/ui.datepicker-$locale_code.js";
1681
- if (url_exists ( $locale_file )) {
1682
- ?>
1683
- <script
1684
- src="<?php
1685
- bloginfo ( 'url' );
1686
- ?>/wp-content/plugins/events-manager/js/jquery-ui-datepicker/i18n/ui.datepicker-<?php
1687
- echo $locale_code;
1688
- ?>.js"
1689
- type="text/javascript"></script>
1690
- <?php
1691
- }
1692
- ?>
1693
-
1694
-
1695
- <style type='text/css' media='all'>
1696
- @import
1697
- "<?php
1698
- bloginfo ( 'url' );
1699
- ?>/wp-content/plugins/events-manager/js/jquery-ui-datepicker/ui.datepicker.css"
1700
- ;
1701
- </style>
1702
- <script type="text/javascript">
1703
- //<![CDATA[
1704
- // TODO: make more general, to support also latitude and longitude (when added)
1705
- $j=jQuery.noConflict();
1706
-
1707
- function updateIntervalDescriptor () {
1708
- $j(".interval-desc").hide();
1709
- var number = "-plural";
1710
- if ($j('input#recurrence-interval').val() == 1 || $j('input#recurrence-interval').val() == "")
1711
- number = "-singular"
1712
- var descriptor = "span#interval-"+$j("select#recurrence-frequency").val()+number;
1713
- $j(descriptor).show();
1714
- }
1715
- function updateIntervalSelectors () {
1716
- $j('p.alternate-selector').hide();
1717
- $j('p#'+ $j('select#recurrence-frequency').val() + "-selector").show();
1718
- //$j('p.recurrence-tip').hide();
1719
- //$j('p#'+ $j(this).val() + "-tip").show();
1720
- }
1721
- function updateShowHideRecurrence () {
1722
- if($j('input#event-recurrence').attr("checked")) {
1723
- $j("#event_recurrence_pattern").fadeIn();
1724
- /* Marcus Begin Edit */
1725
- //Edited this and the one below so dates always can have an end date
1726
- //$j("input#localised-end-date").fadeIn();
1727
- /* Marcus End Edit */
1728
- $j("#event-date-explanation").hide();
1729
- $j("#recurrence-dates-explanation").show();
1730
- $j("h3#recurrence-dates-title").show();
1731
- $j("h3#event-date-title").hide();
1732
- } else {
1733
- $j("#event_recurrence_pattern").hide();
1734
- /* Marcus Begin Edit */
1735
- //$j("input#localised-end-date").hide();
1736
- /* Marcus End Edit */
1737
- $j("#recurrence-dates-explanation").hide();
1738
- $j("#event-date-explanation").show();
1739
- $j("h3#recurrence-dates-title").hide();
1740
- $j("h3#event-date-title").show();
1741
- }
1742
- }
1743
-
1744
- function updateShowHideRsvp () {
1745
- if($j('input#rsvp-checkbox').attr("checked")) {
1746
- $j("div#rsvp-data").fadeIn();
1747
- } else {
1748
- $j("div#rsvp-data").hide();
1749
- }
1750
- }
1751
-
1752
- $j(document).ready( function() {
1753
- locale_format = "ciao";
1754
-
1755
- $j("#recurrence-dates-explanation").hide();
1756
- $j("#localised-date").show();
1757
- /* Marcus Begin Edit */
1758
- $j("#localised-end-date").show();
1759
- /* Marcus End Edit */
1760
-
1761
- $j("#date-to-submit").hide();
1762
- $j("#end-date-to-submit").hide();
1763
- $j("#localised-date").datepicker($j.extend({},
1764
- ($j.datepicker.regional["it"],
1765
- {altField: "#date-to-submit",
1766
- altFormat: "yy-mm-dd"})));
1767
- $j("#localised-end-date").datepicker($j.extend({},
1768
- ($j.datepicker.regional["it"],
1769
- {altField: "#end-date-to-submit",
1770
- altFormat: "yy-mm-dd"})));
1771
-
1772
-
1773
-
1774
-
1775
-
1776
-
1777
- $j("#start-time").timeEntry({spinnerImage: '', show24Hours: <?php
1778
- echo $show24Hours;
1779
- ?> });
1780
- $j("#end-time").timeEntry({spinnerImage: '', show24Hours: <?php
1781
- echo $show24Hours;
1782
- ?>});
1783
-
1784
-
1785
-
1786
-
1787
-
1788
- $j('input.select-all').change(function(){
1789
- if($j(this).is(':checked'))
1790
- $j('input.row-selector').attr('checked', true);
1791
- else
1792
- $j('input.row-selector').attr('checked', false);
1793
- });
1794
- // TODO: NOT WORKING FOR SOME REASON, val() gives me 2 instead of 'smtp'...
1795
- // console.log($j('select[name:dbem_rsvp_mail_send_method]').val());
1796
- // if ($j('select[name:dbem_rsvp_mail_send_method]').val() != "smtp") {
1797
- // $j('tr#dbem_smtp_host_row').hide();
1798
- // $j('tr#dbem_rsvp_mail_SMTPAuth_row').hide();
1799
- // $j('tr#dbem_smtp_username_row').hide();
1800
- // $j('tr#dbem_smtp_password_row').hide();
1801
- // }
1802
- //
1803
- // $j('select[name:dbem_rsvp_mail_send_method]').change(function() {
1804
- // console.log($j(this).val());
1805
- // if($j(this).val() == "smtp") {
1806
- // $j('tr#dbem_smtp_host_row').show();
1807
- // $j('tr#dbem_rsvp_mail_SMTPAuth_row').show();
1808
- // $j('tr#dbem_smtp_username_row').show();
1809
- // $j('tr#dbem_smtp_password_row').show();
1810
- // } else {
1811
- // $j('tr#dbem_smtp_host_row').hide();
1812
- // $j('tr#dbem_rsvp_mail_SMTPAuth_row').hide();
1813
- // $j('tr#dbem_smtp_username_row').hide();
1814
- // $j('tr#dbem_smtp_password_row').hide();
1815
- // }
1816
-
1817
- //});
1818
- updateIntervalDescriptor();
1819
- updateIntervalSelectors();
1820
- updateShowHideRecurrence();
1821
- updateShowHideRsvp();
1822
- $j('input#event-recurrence').change(updateShowHideRecurrence);
1823
- $j('input#rsvp-checkbox').change(updateShowHideRsvp);
1824
- // recurrency elements
1825
- $j('input#recurrence-interval').keyup(updateIntervalDescriptor);
1826
- $j('select#recurrence-frequency').change(updateIntervalDescriptor);
1827
- $j('select#recurrence-frequency').change(updateIntervalSelectors);
1828
-
1829
- // hiding or showing notes according to their content
1830
- jQuery('.postbox h3').prepend('<a class="togbox">+</a> ');
1831
- // if(jQuery("textarea[@name=event_notes]").val()!="") {
1832
- // jQuery("textarea[@name=event_notes]").parent().parent().removeClass('closed');
1833
- // }
1834
- jQuery('#event_notes h3').click( function() {
1835
- jQuery(jQuery(this).parent().get(0)).toggleClass('closed');
1836
- });
1837
-
1838
- // users cannot submit the event form unless some fields are filled
1839
- function validateEventForm(){
1840
- errors = "";
1841
- var recurring = $j("input[@name=repeated_event]:checked").val();
1842
- requiredFields= new Array('event_name', 'localised_event_date', 'location_name','location_address','location_town');
1843
- var localisedRequiredFields = {'event_name':"<?php
1844
- _e ( 'Name', 'dbem' )?>", 'localised_event_date':"<?php
1845
- _e ( 'Date', 'dbem' )?>", 'location_name':"<?php
1846
- _e ( 'Location', 'dbem' )?>",'location_address':"<?php
1847
- _e ( 'Address', 'dbem' )?>",'location_town':"<?php
1848
- _e ( 'Town', 'dbem' )?>"};
1849
-
1850
- missingFields = new Array;
1851
- for (var i in requiredFields) {
1852
- if ($j("input[@name=" + requiredFields[i]+ "]").val() == 0) {
1853
- missingFields.push(localisedRequiredFields[requiredFields[i]]);
1854
- $j("input[@name=" + requiredFields[i]+ "]").css('border','2px solid red');
1855
- } else {
1856
- $j("input[@name=" + requiredFields[i]+ "]").css('border','1px solid #DFDFDF');
1857
-
1858
- }
1859
-
1860
- }
1861
-
1862
- // alert('ciao ' + recurring+ " end: " + $j("input[@name=localised_event_end_date]").val());
1863
- if (missingFields.length > 0) {
1864
-
1865
- errors = "<?php
1866
- echo _e ( 'Some required fields are missing:', 'dbem' )?> " + missingFields.join(", ") + ".\n";
1867
- }
1868
- if(recurring && $j("input[@name=localised_event_end_date]").val() == "") {
1869
- errors = errors + "<?php
1870
- _e ( 'Since the event is repeated, you must specify an end date', 'dbem' )?>.";
1871
- $j("input[@name=localised_event_end_date]").css('border','2px solid red');
1872
- } else {
1873
- $j("input[@name=localised_event_end_date]").css('border','1px solid #DFDFDF');
1874
- }
1875
- if(errors != "") {
1876
- alert(errors);
1877
- return false;
1878
- }
1879
- return true;
1880
- }
1881
-
1882
- $j('#eventForm').bind("submit", validateEventForm);
1883
-
1884
-
1885
- });
1886
- //]]>
1887
- </script>
1888
-
1889
- <?php
1890
- }
1891
- add_action ( 'admin_head', 'dbem_admin_general_script' );
1892
-
1893
- function dbem_admin_map_script() {
1894
- if ((isset ( $_REQUEST ['event_id'] ) && $_REQUEST ['event_id'] != '') || (isset ( $_REQUEST ['page'] ) && $_REQUEST ['page'] == 'locations') || (isset ( $_REQUEST ['page'] ) && $_REQUEST ['page'] == 'new_event') || (isset ( $_REQUEST ['action'] ) && $_REQUEST ['action'] == 'edit_recurrence')) {
1895
- if (! (isset ( $_REQUEST ['action'] ) && $_REQUEST ['action'] == 'dbem_delete')) {
1896
- // single event page
1897
-
1898
-
1899
- $event_ID = $_REQUEST ['event_id'];
1900
- $event = dbem_get_event ( $event_ID );
1901
-
1902
- if ($event ['location_town'] != '' || (isset ( $_REQUEST ['page'] ) && $_REQUEST ['page'] = 'locations')) {
1903
- $gmap_key = get_option ( 'dbem_gmap_key' );
1904
- if ($event ['location_address'] != "") {
1905
- $search_key = $event ['location_address'] . ", " . $event ['location_town'];
1906
- } else {
1907
- $search_key = $event ['location_name'] . ", " . $event ['location_town'];
1908
- }
1909
-
1910
- ?>
1911
- <style type="text/css">
1912
- /* div#location_town, div#location_address, div#location_name {
1913
- width: 480px;
1914
- }
1915
- table.form-table {
1916
- width: 50%;
1917
- } */
1918
- </style>
1919
- <script
1920
- src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=<?php
1921
- echo $gmap_key;
1922
- ?>"
1923
- type="text/javascript"></script>
1924
- <script type="text/javascript">
1925
- //<![CDATA[
1926
- $j=jQuery.noConflict();
1927
-
1928
- function loadMap(location, town, address) {
1929
- if (GBrowserIsCompatible()) {
1930
- var map = new GMap2(document.getElementById("event-map"));
1931
- // map.addControl(new GScaleControl());
1932
- //map.setCenter(new GLatLng(37.4419, -122.1419), 13);
1933
- var geocoder = new GClientGeocoder();
1934
- if (address !="") {
1935
- searchKey = address + ", " + town;
1936
- } else {
1937
- searchKey = location + ", " + town;
1938
- }
1939
-
1940
- var search = "<?php
1941
- echo $search_key?>" ;
1942
- geocoder.getLatLng(
1943
- searchKey,
1944
- function(point) {
1945
- if (!point) {
1946
- $j("#event-map").hide();
1947
- $j('#map-not-found').show();
1948
- } else {
1949
- mapCenter= new GLatLng(point.lat()+0.01, point.lng()+0.005);
1950
- map.setCenter(mapCenter, 13);
1951
- var marker = new GMarker(point);
1952
- map.addOverlay(marker);
1953
- marker.openInfoWindowHtml('<strong>' + location +'</strong><p>' + address + '</p><p>' + town + '</p>');
1954
- $j('input#location-latitude').val(point.y);
1955
- $j('input#location-longitude').val(point.x);
1956
- $j("#event-map").show();
1957
- $j('#map-not-found').hide();
1958
- }
1959
- }
1960
- );
1961
- // map.addControl(new GSmallMapControl());
1962
- // map.addControl(new GMapTypeControl());
1963
-
1964
- }
1965
- }
1966
-
1967
- $j(document).ready(function() {
1968
- eventLocation = $j("input#location-name").val();
1969
- eventTown = $j("input#location-town").val();
1970
- eventAddress = $j("input#location-address").val();
1971
-
1972
- loadMap(eventLocation, eventTown, eventAddress);
1973
-
1974
- $j("input#location-name").blur(function(){
1975
- newEventLocation = $j("input#location-name").val();
1976
- if (newEventLocation !=eventLocation) {
1977
- loadMap(newEventLocation, eventTown, eventAddress);
1978
- eventLocation = newEventLocation;
1979
-
1980
- }
1981
- });
1982
- $j("input#location-town").blur(function(){
1983
- newEventTown = $j("input#location-town").val();
1984
- if (newEventTown !=eventTown) {
1985
- loadMap(eventLocation, newEventTown, eventAddress);
1986
- eventTown = newEventTown;
1987
- }
1988
- });
1989
- $j("input#location-address").blur(function(){
1990
- newEventAddress = $j("input#location-address").val();
1991
- if (newEventAddress != eventAddress) {
1992
- loadMap(eventLocation, eventTown, newEventAddress);
1993
- eventAddress = newEventAddress;
1994
- }
1995
- });
1996
-
1997
-
1998
-
1999
- });
2000
- $j(document).unload(function() {
2001
- GUnload();
2002
- });
2003
- //]]>
2004
- </script>
2005
- <?php
2006
- }
2007
- }
2008
- }
2009
- }
2010
- $gmap_is_active = get_option ( 'dbem_gmap_is_active' );
2011
- if ($gmap_is_active) {
2012
- add_action ( 'admin_head', 'dbem_admin_map_script' );
2013
-
2014
- }
2015
-
2016
- // Script to validate map options
2017
- function dbem_admin_options_script() {
2018
- if (isset ( $_REQUEST ['page'] ) && $_REQUEST ['page'] == 'events-manager-options') {
2019
- ?>
2020
- <script type="text/javascript">
2021
- //<![CDATA[
2022
- $j=jQuery.noConflict();
2023
-
2024
- $j(document).ready(function() {
2025
-
2026
- // users cannot enable Google Maps without an api key
2027
- function verifyOptionsForm(){
2028
- var gmap_is_active = $j("input[@name=dbem_gmap_is_active]:checked").val();
2029
- var gmap_key = $j("input[@name=dbem_gmap_key]").val();
2030
- if(gmap_is_active == '1' && (gmap_key == '')){
2031
- alert("<?php
2032
- _e ( 'You cannot enable Google Maps integration without setting an appropriate API key.' );
2033
- ?>");
2034
- $j("input[@name='dbem_gmap_is_active']:nth(1)").attr("checked","checked");
2035
-
2036
- return false;
2037
- } else {
2038
- return true;
2039
- }
2040
- }
2041
-
2042
- $j('#dbem_options_form').bind("submit", verifyOptionsForm);
2043
-
2044
-
2045
- });
2046
-
2047
-
2048
- //]]>
2049
- </script>
2050
-
2051
- <?php
2052
-
2053
- }
2054
-
2055
- }
2056
- add_action ( 'admin_head', 'dbem_admin_options_script' );
2057
-
2058
- function dbem_rss_link($justurl = 0, $echo = 1, $text = "RSS") {
2059
- if (strpos ( $justurl, "=" )) {
2060
- // allows the use of arguments without breaking the legacy code
2061
- $defaults = array ('justurl' => 0, 'echo' => 1, 'text' => 'RSS' );
2062
-
2063
- $r = wp_parse_args ( $justurl, $defaults );
2064
- extract ( $r, EXTR_SKIP );
2065
- $justurl = $r ['justurl'];
2066
- $echo = $r ['echo'];
2067
- $text = $r ['text'];
2068
- }
2069
- if ($text == '')
2070
- $text = "RSS";
2071
- $rss_title = get_option ( 'dbem_events_page_title' );
2072
- $url = get_bloginfo ( 'url' ) . "/?dbem_rss=main";
2073
- $link = "<a href='$url'>$text</a>";
2074
-
2075
- if ($justurl)
2076
- $result = $url;
2077
- else
2078
- $result = $link;
2079
- if ($echo)
2080
- echo $result;
2081
- else
2082
- return $result;
2083
- }
2084
-
2085
- function dbem_rss_link_shortcode($atts) {
2086
- extract ( shortcode_atts ( array ('justurl' => 0, 'text' => 'RSS' ), $atts ) );
2087
- $result = dbem_rss_link ( "justurl=$justurl&echo=0&text=$text" );
2088
- return $result;
2089
- }
2090
- add_shortcode ( 'events_rss_link', 'dbem_rss_link_shortcode' );
2091
-
2092
- function dbem_rss() {
2093
- if (isset ( $_REQUEST ['dbem_rss'] ) && $_REQUEST ['dbem_rss'] == 'main') {
2094
- header ( "Content-type: text/xml" );
2095
- echo "<?xml version='1.0'?>\n";
2096
-
2097
- $events_page_id = get_option ( 'dbem_events_page' );
2098
- $events_page_link = get_permalink ( $events_page_id );
2099
- if (stristr ( $events_page_link, "?" ))
2100
- $joiner = "&amp;";
2101
- else
2102
- $joiner = "?";
2103
-
2104
- ?>
2105
- <rss version="2.0">
2106
- <channel>
2107
- <title><?php
2108
- echo get_option ( 'dbem_rss_main_title' );
2109
- ?></title>
2110
- <link><?php
2111
- echo $events_page_link;
2112
- ?></link>
2113
- <description><?php
2114
- echo get_option ( 'dbem_rss_main_description' );
2115
- ?></description>
2116
- <docs>
2117
- http://blogs.law.harvard.edu/tech/rss
2118
- </docs>
2119
- <generator>
2120
- Weblog Editor 2.0
2121
- </generator>
2122
- <?php
2123
- $title_format = get_option ( 'dbem_rss_title_format' );
2124
- $description_format = str_replace ( ">", "&gt;", str_replace ( "<", "&lt;", get_option ( 'dbem_rss_description_format' ) ) );
2125
- $events = dbem_get_events ( 5 );
2126
- foreach ( $events as $event ) {
2127
- $title = dbem_replace_placeholders ( $title_format, $event, "rss" );
2128
- $description = dbem_replace_placeholders ( $description_format, $event, "rss" );
2129
- echo "<item>";
2130
- echo "<title>$title</title>\n";
2131
- echo "<link>$events_page_link" . $joiner . "event_id=" . $event ['event_id'] . "</link>\n ";
2132
- echo "<description>$description </description>\n";
2133
- echo "</item>";
2134
- }
2135
- ?>
2136
-
2137
- </channel>
2138
- </rss>
2139
-
2140
- <?php
2141
- die ();
2142
- }
2143
- }
2144
- add_action ( 'init', 'dbem_rss' );
2145
- function substitute_rss($data) {
2146
- if (isset ( $_REQUEST ['event_id'] ))
2147
- return get_bloginfo ( 'url' ) . "/?dbem_rss=main";
2148
- else
2149
- return $data;
2150
- }
2151
- function dbem_general_css() {
2152
- $base_url = get_bloginfo ( 'url' );
2153
- echo "<link rel='stylesheet' href='$base_url/wp-content/plugins/events-manager/events_manager.css' type='text/css'/>";
2154
-
2155
- }
2156
- add_action ( 'wp_head', 'dbem_general_css' );
2157
- add_action ( 'admin_head', 'dbem_general_css' );
2158
- //add_filter('feed_link','substitute_rss')
2159
-
2160
-
2161
- // TODO roba da mettere nell'ordine giusto
2162
- function dbem_delete_event($event_id) {
2163
- global $wpdb;
2164
- $table_name = $wpdb->prefix . EVENTS_TBNAME;
2165
- $sql = "DELETE FROM $table_name WHERE event_id = '$event_id';";
2166
- $wpdb->query ( $sql );
2167
-
2168
- }
2169
- add_filter ( 'favorite_actions', 'dbem_favorite_menu' );
2170
-
2171
- function dbem_favorite_menu($actions) {
2172
- // add quick link to our favorite plugin
2173
- $actions ['admin.php?page=new_event'] = array (__ ( 'Add an event', 'dbem' ), MIN_CAPABILITY );
2174
- return $actions;
2175
- }
2176
-
2177
- ////////////////////////////////////
2178
- // WP 2.7 options registration
2179
- function dbem_options_register() {
2180
- $options = array ('dbem_events_page', 'dbem_display_calendar_in_events_page', 'dbem_use_event_end', 'dbem_event_list_item_format', 'dbem_event_page_title_format', 'dbem_single_event_format', 'dbem_list_events_page', 'dbem_events_page_title', 'dbem_no_events_message', 'dbem_location_page_title_format', 'dbem_location_baloon_format', 'dbem_single_location_format', 'dbem_location_event_list_item_format', 'dbem_location_no_events_message', 'dbem_gmap_is_active', 'dbem_rss_main_title', 'dbem_rss_main_description', 'dbem_rss_title_format', 'dbem_rss_description_format', 'dbem_gmap_key', 'dbem_map_text_format', 'dbem_rsvp_mail_notify_is_active', 'dbem_contactperson_email_body', 'dbem_respondent_email_body', 'dbem_mail_sender_name', 'dbem_smtp_username', 'dbem_smtp_password', 'dbem_default_contact_person', 'dbem_mail_sender_address', 'dbem_mail_receiver_address', 'dbem_smtp_host', 'dbem_rsvp_mail_send_method', 'dbem_rsvp_mail_port', 'dbem_rsvp_mail_SMTPAuth', 'dbem_image_max_width', 'dbem_image_max_height', 'dbem_image_max_size' );
2181
- foreach ( $options as $opt ) {
2182
- register_setting ( 'dbem-options', $opt, '' );
2183
- }
2184
-
2185
- }
2186
- add_action ( 'admin_init', 'dbem_options_register' );
2187
-
2188
- function dbem_alert_events_page() {
2189
- $events_page_id = get_option ( 'dbem_events_page' );
2190
- if (strpos ( $_SERVER ['SCRIPT_NAME'], 'page.php' ) && isset ( $_GET ['action'] ) && $_GET ['action'] == 'edit' && isset ( $_GET ['post'] ) && $_GET ['post'] == "$events_page_id") {
2191
- $message = sprintf ( __ ( "This page corresponds to <strong>Events Manager</strong> events page. Its content will be overriden by <strong>Events Manager</strong>. If you want to display your content, you can can assign another page to <strong>Events Manager</strong> in the the <a href='%s'>Settings</a>. ", 'dbem' ), 'admin.php?page=events-manager-options' );
2192
- $notice = "<div class='error'><p>$message</p></div>";
2193
- echo $notice;
2194
- }
2195
-
2196
- }
2197
- add_action ( 'admin_notices', 'dbem_alert_events_page' );
2198
-
2199
- /* Marcus Begin Edit */
2200
- //This adds the tinymce editor
2201
- function dbem_tinymce(){
2202
- add_action( 'admin_print_footer_scripts', 'wp_tiny_mce', 25 );
2203
- wp_enqueue_script('post');
2204
- if ( user_can_richedit() )
2205
- wp_enqueue_script('editor');
2206
- add_thickbox();
2207
- wp_enqueue_script('media-upload');
2208
- wp_enqueue_script('word-count');
2209
- wp_enqueue_script('quicktags');
2210
- }
2211
- add_action ( 'admin_init', 'dbem_tinymce' );
2212
- /* Marcus End Edit */
2213
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2214
  ?>
1
+ <?php
2
+
3
+ function dbem_new_event_page() {
4
+
5
+ $title = __ ( "Insert New Event", 'dbem' );
6
+ dbem_event_form ( $event, $title, $element );
7
+
8
+ }
9
+
10
+ function dbem_events_subpanel() {
11
+ global $wpdb;
12
+ $action = $_GET ['action'];
13
+ $action2 = $_GET ['action2'];
14
+ $event_ID = $_GET ['event_id'];
15
+ $recurrence_ID = $_GET ['recurrence_id'];
16
+ $scope = $_GET ['scope'];
17
+ $offset = $_GET ['offset'];
18
+ $order = $_GET ['order'];
19
+ $selectedEvents = $_GET ['events'];
20
+
21
+ // Disable Hello to new user if requested
22
+ if (isset ( $_GET ['disable_hello_to_user'] ) && $_GET ['disable_hello_to_user'] == 'true')
23
+ update_option ( 'dbem_hello_to_user', 0 );
24
+
25
+ if ($order == "")
26
+ $order = "ASC";
27
+ if ($offset == "")
28
+ $offset = "0";
29
+ $event_table_name = $wpdb->prefix . EVENTS_TBNAME;
30
+ // Debug code, to make sure I get the correct page
31
+
32
+
33
+ // DELETE action
34
+ if ($action == 'deleteEvents') {
35
+ // $sql="DELETE FROM ".$event_table_name." WHERE event_id='"."$event_ID"."'";
36
+
37
+
38
+ // TODO eventual error if ID in non-existant
39
+ //$wpdb->query($sql);
40
+ foreach ( $selectedEvents as $event_ID ) {
41
+ dbem_delete_event ( $event_ID );
42
+ }
43
+
44
+ $events = dbem_get_events ( "", "future" );
45
+ dbem_events_table ( $events, 10, "Future events" );
46
+ }
47
+ // UPDATE or CREATE action
48
+ if ($action == 'update_event' || $action == 'update_recurrence') {
49
+
50
+ $event = array ();
51
+ $location = array ();
52
+ $event ['event_name'] = stripslashes ( $_POST ["event_name"] );
53
+ // Set event end time to event time if not valid
54
+ // if (!_dbem_is_date_valid($event['event_end_date']))
55
+ // $event['event_end_date'] = $event['event-date'];
56
+ $event ['event_start_date'] = $_POST ["event_date"];
57
+ $event ['event_end_date'] = $_POST ["event_end_date"];
58
+ // Trying to fix Alex's trouble
59
+ if ($event ['event_end_date'] == '')
60
+ $event['event_end_date'] = $event['event_start_date'];
61
+ // End of Alex's fix
62
+ //$event['event_start_time'] = $_POST[event_hh].":".$_POST[event_mm].":00";
63
+ //$event['event_end_time'] = $_POST[event_end_hh].":".$_POST[event_end_mm].":00";
64
+ $event ['event_start_time'] = date ( "G:i:00", strtotime ( $_POST ['event_start_time'] ) );
65
+ $event ['event_end_time'] = date ( "G:i:00", strtotime ( $_POST ['event_end_time'] ) );
66
+ $recurrence ['recurrence_name'] = $event ['event_name'];
67
+ $recurrence ['recurrence_start_date'] = $event ['event_start_date'];
68
+ $recurrence ['recurrence_end_date'] = $event ['event_end_date'];
69
+ $recurrence ['recurrence_start_time'] = $event ['event_start_time'];
70
+ $recurrence ['recurrence_end_time'] = $event ['event_end_time'];
71
+ $recurrence ['recurrence_id'] = $_POST [recurrence_id];
72
+ $recurrence ['recurrence_freq'] = $_POST [recurrence_freq];
73
+ $recurrence ['recurrence_freq'] == 'weekly' ? $recurrence [recurrence_byday] = implode ( ",", $_POST ['recurrence_bydays'] ) : $recurrence ['recurrence_byday'] = $_POST [recurrence_byday];
74
+ $_POST ['recurrence_interval'] == "" ? $recurrence ['recurrence_interval'] = 1 : $recurrence ['recurrence_interval'] = $_POST ['recurrence_interval'];
75
+ $recurrence ['recurrence_byweekno'] = $_POST [recurrence_byweekno];
76
+
77
+ $event ['event_rsvp'] = (is_numeric($_POST ['event_rsvp'])) ? $_POST ['event_rsvp']:0;
78
+ $event ['event_seats'] = (is_numeric($_POST ['event_seats'])) ? $_POST ['event_seats']:0;
79
+
80
+ if (isset ( $_POST ['event_contactperson_id'] ) && $_POST ['event_contactperson_id'] != '' && $_POST ['event_contactperson_id'] != '-1') {
81
+
82
+ $event ['event_contactperson_id'] = $_POST ['event_contactperson_id'];
83
+ $recurrence ['event_contactperson_id'] = $_POST ['event_contactperson_id'];
84
+ }
85
+
86
+ if (! _dbem_is_time_valid ( $event_end_time ))
87
+ $event_end_time = $event_time;
88
+
89
+ $location ['location_name'] = $_POST [location_name];
90
+ $location ['location_address'] = $_POST [location_address];
91
+ $location ['location_town'] = $_POST [location_town];
92
+ $location ['location_latitude'] = $_POST [location_latitude];
93
+ $location ['location_longitude'] = $_POST [location_longitude];
94
+ $location ['location_description'] = "";
95
+ /* Marcus Begin Edit */
96
+ //switched to WP TinyMCE field
97
+ //$event ['event_notes'] = stripslashes ( $_POST [event_notes] );
98
+ $event ['event_notes'] = stripslashes ( $_POST ['content'] );
99
+ /* Marcus End Edit */
100
+ $recurrence ['recurrence_notes'] = $event ['event_notes'];
101
+ $validation_result = dbem_validate_event ( $event );
102
+
103
+ /* Marcus Begin Edit */
104
+ $event_attributes = array();
105
+ for($i=1 ; trim($_POST["mtm_{$i}_ref"])!='' ; $i++ ){
106
+ if(trim($_POST["mtm_{$i}_name"]) != ''){
107
+ $event_attributes[$_POST["mtm_{$i}_ref"]] = $_POST["mtm_{$i}_name"];
108
+ }
109
+ }
110
+ $event['event_attributes'] = serialize($event_attributes);
111
+ /* Marcus End Edit */
112
+
113
+ if ($validation_result == "OK") {
114
+ // validation successful
115
+
116
+ $related_location = dbem_get_identical_location ( $location );
117
+ // print_r($related_location);
118
+ if ($related_location) {
119
+ $event ['location_id'] = $related_location ['location_id'];
120
+ $recurrence ['location_id'] = $related_location ['location_id'];
121
+ } else {
122
+
123
+ $new_location = dbem_insert_location ( $location );
124
+ $event ['location_id'] = $new_location ['location_id'];
125
+ $recurrence ['location_id'] = $new_location ['location_id'];
126
+ //print_r($new_location);
127
+
128
+
129
+ }
130
+
131
+ if (! $event_ID && ! $recurrence_ID) {
132
+ // there isn't anything
133
+ if ($_POST ['repeated_event']) {
134
+
135
+ //insert new recurrence
136
+ dbem_insert_recurrent_event ( $event, $recurrence );
137
+ $feedback_message = __ ( 'New recurrent event inserted!', 'dbem' );
138
+ } else {
139
+ // INSERT new event
140
+ $wpdb->insert ( $event_table_name, $event );
141
+ $feedback_message = __ ( 'New event successfully inserted!', 'dbem' );
142
+ }
143
+ } else {
144
+ // something exists
145
+ if ($recurrence_ID) {
146
+ // UPDATE old recurrence
147
+ $recurrence ['recurrence_id'] = $recurrence_ID;
148
+ //print_r($recurrence);
149
+ if (dbem_update_recurrence ( $recurrence ))
150
+ $feedback_message = __ ( 'Recurrence updated!', 'dbem' );
151
+ else
152
+ $feedback_message = __ ( 'Something went wrong with the recurrence update...', 'dbem' );
153
+
154
+ } else {
155
+ // UPDATE old event
156
+ // unlink from recurrence in case it was generated by one
157
+ //$event ['recurrence_id'] = null;
158
+ if( isset($event ['recurrence_id']) ) unset($event ['recurrence_id']);
159
+ $where ['event_id'] = $event_ID;
160
+ $result = $wpdb->update ( $event_table_name, $event, $where );
161
+ $feedback_message = "'" . $event ['event_name'] . "' " . __ ( 'updated', 'dbem' ) . "!";
162
+ }
163
+ }
164
+
165
+ /* Marcus Begin Edit */
166
+ //Save the category if selected
167
+ if( is_numeric($_POST['event_category_id']) ){
168
+ $insert_id = (! $event_ID && ! $recurrence_ID) ? $wpdb->insert_id : $event_ID;
169
+ $wpdb->update ( $event_table_name, array("event_category_id" => $_POST['event_category_id']), array('event_id' => $insert_id) );
170
+ }
171
+ /* Marcus End Edit */
172
+
173
+ //$wpdb->query($sql);
174
+ echo "<div id='message' class='updated fade'>
175
+ <p>$feedback_message</p>
176
+ </div>";
177
+ $events = dbem_get_events ( "", "future" );
178
+ dbem_events_table ( $events, 10, "Future events" );
179
+ } else {
180
+ // validation unsuccessful
181
+
182
+ echo "<div id='message' class='error '>
183
+ <p>" . __ ( "Ach, there's a problem here:", "dbem" ) . " $validation_result</p>
184
+ </div>";
185
+ dbem_event_form ( $event, "Edit event $event_ID", $event_ID );
186
+
187
+ }
188
+ }
189
+ if ($action == 'edit_event') {
190
+ if (! $event_ID) {
191
+ $title = __ ( "Insert New Event", 'dbem' );
192
+ } else {
193
+ $event = dbem_get_event ( $event_ID );
194
+ $title = __ ( "Edit Event", 'dbem' ) . " '" . $event ['event_name'] . "'";
195
+ }
196
+
197
+ //$event=$wpdb->get_row($sql, ARRAY_A);
198
+ // Enter new events and updates old ones
199
+ // DEBUG: echo"Nome: $event->event_name";
200
+
201
+
202
+ dbem_event_form ( $event, $title, $event_ID );
203
+
204
+ }
205
+ /* Marcus Begin Edit */
206
+ //Add duplicate event if requested
207
+ if ($action == 'duplicate_event') {
208
+ dbem_duplicate_event ( $event_ID );
209
+ }
210
+ /* Marcus End Edit */
211
+ if ($action == 'edit_recurrence') {
212
+
213
+ $event_ID = $_GET ['recurrence_id'];
214
+ $recurrence = dbem_get_recurrence ( $event_ID );
215
+ $title = __ ( "Reschedule", 'dbem' ) . " '" . $recurrence ['recurrence_name'] . "'";
216
+ dbem_event_form ( $recurrence, $title, $event_ID );
217
+
218
+ }
219
+
220
+ if ($action == 'update_recurrence') {
221
+ //print_r($recurrence);
222
+ //die('update recurrence!');
223
+ }
224
+
225
+ if ($action == "-1" || $action == "") {
226
+ // No action, only showing the events list
227
+
228
+
229
+ switch ($scope) {
230
+ case "past" :
231
+ $title = __ ( 'Past Events', 'dbem' );
232
+ break;
233
+ case "all" :
234
+ $title = __ ( 'All Events', 'dbem' );
235
+ break;
236
+ default :
237
+ $title = __ ( 'Future Events', 'dbem' );
238
+ $scope = "future";
239
+ }
240
+ $limit = 20;
241
+ $events = dbem_get_events ( $limit, $scope, $order, $offset );
242
+
243
+ dbem_events_table ( $events, $limit, $title );
244
+
245
+ }
246
+
247
+ }
248
+ // array of all pages, bypasses the filter I set up :)
249
+ function dbem_get_all_pages() {
250
+ global $wpdb;
251
+ $query = "SELECT id, post_title FROM " . $wpdb->prefix . "posts WHERE post_type = 'page';";
252
+ $pages = $wpdb->get_results ( $query, ARRAY_A );
253
+ $output = array ();
254
+ foreach ( $pages as $page ) {
255
+ $output [$page ['id']] = $page ['post_title'];
256
+ }
257
+ return $output;
258
+ }
259
+
260
+ // Function composing the options subpanel
261
+ function dbem_options_subpanel() {
262
+ // dbem_options_register();
263
+
264
+
265
+ ?>
266
+ <div class="wrap">
267
+ <div id='icon-options-general' class='icon32'><br />
268
+ </div>
269
+ <h2><?php
270
+ _e ( 'Event Manager Options', 'dbem' );
271
+ ?></h2>
272
+ <form id="dbem_options_form" method="post" action="options.php">
273
+ <h3><?php
274
+ _e ( 'Events page', 'dbem' );
275
+ ?></h3>
276
+ <table class="form-table">
277
+ <?php
278
+ dbem_options_select ( __ ( 'Events page' ), 'dbem_events_page', dbem_get_all_pages (), __ ( 'This option allows you to select which page to use as an events page','dbem' ) );
279
+ dbem_options_radio_binary ( __ ( 'Show events page in lists?', 'dbem' ), 'dbem_list_events_page', __ ( 'Check this option if you want the events page to appear together with other pages in pages lists.', 'dbem' ) );
280
+ dbem_options_radio_binary ( __ ( 'Display calendar in events page?', 'dbem' ), 'dbem_display_calendar_in_events_page', __ ( 'This options allows to display the calendar in the events page, instead of the default list. It is recommended not to display both the calendar widget and a calendar page.','dbem' ) )?>
281
+ </table>
282
+ <h3><?php
283
+ _e ( 'Events format', 'dbem' );
284
+ ?></h3>
285
+ <table class="form-table">
286
+ <?php
287
+ /* Marcus Begin Edit */
288
+ dbem_options_textarea ( __ ( 'Default event list format header', 'dbem' ), 'dbem_event_list_item_format_header', __( 'This content will appear just above your code for the default event list format. Default is blank', 'dbem' ) );
289
+ dbem_options_textarea ( __ ( 'Default event list format', 'dbem' ), 'dbem_event_list_item_format', __ ( 'The format of any events in a list.<br/>Insert one or more of the following placeholders: <code>#_NAME</code>, <code>#_LOCATION</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, <code>#_NOTES</code>.<br/> Use <code>#_EXCERPT</code> to show <code>#_NOTES</code> until you place a &lt;!&ndash;&ndash; more &ndash;&ndash;&gt; marker.<br/> Use <code>#_LINKEDNAME</code> for the event name with a link to the given event page.<br/> Use <code>#_EVENTPAGEURL</code> to print the event page URL and make your own customised links.<br/> Use <code>#_LOCATIONPAGEURL</code> to print the location page URL and make your own customised links.<br/>Use <code>#_EDITEVENTLINK</code> to add add a link to edit page for the event, which will appear only when a user is logged in.<br/>To insert date and time values, use <a href="http://www.php.net/manual/en/function.date.php">PHP time format characters</a> with a <code>#</code> symbol before them, i.e. <code>#m</code>, <code>#M</code>, <code>#j</code>, etc.<br/> For the end time, put <code>#@</code> in front of the character, ie. <code>#@h</code>, <code>#@i</code>, etc.<br/> You can also create a date format without prepending <code>#</code> by wrapping it in #_{} or #@_{} (e.g. <code>#_{d/m/Y}</code>). If there is no end date, the value is not shown.<br/>Feel free to use HTML tags as <code>li</code>, <code>br</code> and so on.<br/>For custom attributes, you use <code>#_ATT{key}{alternative text}</code>, the second braces are optional and will appear if the attribute is not defined or left blank for that event. This key will appear as an option when adding attributes to your event.', 'dbem' ) );
290
+ dbem_options_textarea ( __ ( 'Default event list format footer', 'dbem' ), 'dbem_event_list_item_format_footer', __ ( 'This content will appear just below your code for the default event list format. Default is blank', 'dbem' ) );
291
+
292
+ /* Marcus End Edit */
293
+ dbem_options_input_text ( __ ( 'Single event page title format', 'dbem' ), 'dbem_event_page_title_format', __ ( 'The format of a single event page title. Follow the previous formatting instructions.', 'dbem' ) );
294
+ dbem_options_textarea ( __ ( 'Default single event format', 'dbem' ), 'dbem_single_event_format', __ ( 'The format of a single event page.<br/>Follow the previous formatting instructions. <br/>Use <code>#_MAP</code> to insert a map.<br/>Use <code>#_CONTACTNAME</code>, <code>#_CONTACTEMAIL</code>, <code>#_CONTACTPHONE</code> to insert respectively the name, e-mail address and phone number of the designated contact person. <br/>Use <code>#_ADDBOOKINGFORM</code> to insert a form to allow the user to respond to your events reserving one or more places (RSVP).<br/> Use <code>#_REMOVEBOOKINGFORM</code> to insert a form where users, inserting their name and e-mail address, can remove their bookings.', 'dbem' ) );
295
+ dbem_options_input_text ( __ ( 'Events page title', 'dbem' ), 'dbem_events_page_title', __ ( 'The title on the multiple events page.', 'dbem' ) );
296
+ dbem_options_input_text ( __ ( 'No events message', 'dbem' ), 'dbem_no_events_message', __ ( 'The message displayed when no events are available.', 'dbem' ) );?>
297
+
298
+ </table>
299
+ <h3><?php _e ( 'Calendar format', 'dbem' ); ?></h3>
300
+ <table class="form-table">
301
+ <?php
302
+ dbem_options_input_text ( __ ( 'Small calendar title', 'dbem' ), 'dbem_small_calendar_event_title_format', __ ( 'The format of the title, corresponding to the text that appears when hovering on an eventful calendar day.', 'dbem' ) );
303
+ dbem_options_input_text ( __ ( 'Small calendar title separator', 'dbem' ), 'dbem_small_calendar_event_title_separator', __ ( 'The separator appearing on the above title when more than one events are taking place on the same day.', 'dbem' ) );
304
+ dbem_options_input_text ( __ ( 'Full calendar events format', 'dbem' ), 'dbem_full_calendar_event_format', __ ( 'The format of each event when displayed in the full calendar. Remember to include <code>li</code> tags before and after the event.', 'dbem' ) );
305
+
306
+ ?>
307
+
308
+ </table>
309
+
310
+ <h3><?php
311
+ _e ( 'Locations format', 'dbem' );
312
+ ?></h3>
313
+ <table class="form-table"><?php
314
+ dbem_options_input_text ( __ ( 'Single location page title format', 'dbem' ), 'dbem_location_page_title_format', __ ( 'The format of a single location page title.<br/>Follow the previous formatting instructions.', 'dbem' ) );
315
+ dbem_options_textarea ( __ ( 'Default single location page format', 'dbem' ), 'dbem_single_location_format', __ ( 'The format of a single location page.<br/>Insert one or more of the following placeholders: <code>#_NAME</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, <code>#_DESCRIPTION</code>.<br/> Use <code>#_MAP</code> to display a map of the event location, and <code>#_IMAGE</code> to display an image of the location.<br/> Use <code>#_NEXTEVENTS</code> to insert a list of the upcoming events, <code>#_PASTEVENTS</code> for a list of past events, <code>#_ALLEVENTS</code> for a list of all events taking place in this location.', 'dbem' ) );
316
+ dbem_options_textarea ( __ ( 'Default location baloon format', 'dbem' ), 'dbem_location_baloon_format', __ ( 'The format of of the text appearing in the baloon describing the location in the map.<br/>Insert one or more of the following placeholders: <code>#_NAME</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, <code>#_DESCRIPTION</code> or <code>#_IMAGE</code>.', 'dbem' ) );
317
+ dbem_options_textarea ( __ ( 'Default location event list format', 'dbem' ), 'dbem_location_event_list_item_format', __ ( 'The format of the events the list inserted in the location page through the <code>#_NEXTEVENTS</code>, <code>#_PASTEVENTS</code> and <code>#_ALLEVENTS</code> element. <br/> Follow the events formatting instructions', 'dbem' ) );
318
+ dbem_options_textarea ( __ ( 'Default no events message', 'dbem' ), 'dbem_location_no_events_message', __ ( 'The message to be displayed in the list generated by <code>#_NEXTEVENTS</code>, <code>#_PASTEVENTS</code> and <code>#_ALLEVENTS</code> when no events are available.', 'dbem' ) );
319
+
320
+ ?>
321
+ </table>
322
+
323
+ <h3><?php
324
+ _e ( 'RSS feed format', 'dbem' );
325
+ ?></h3>
326
+ <table class="form-table"><?php
327
+
328
+ dbem_options_input_text ( __ ( 'RSS main title', 'dbem' ), 'dbem_rss_main_title', __ ( 'The main title of your RSS events feed.', 'dbem' ) );
329
+ dbem_options_input_text ( __ ( 'RSS main description', 'dbem' ), 'dbem_rss_main_description', __ ( 'The main description of your RSS events feed.', 'dbem' ) );
330
+ dbem_options_input_text ( __ ( 'RSS title format', 'dbem' ), 'dbem_rss_title_format', __ ( 'The format of the title of each item in the events RSS feed.', 'dbem' ) );
331
+ dbem_options_input_text ( __ ( 'RSS description format', 'dbem' ), 'dbem_rss_description_format', __ ( 'The format of the description of each item in the events RSS feed. Follow the previous formatting instructions.', 'dbem' ) );
332
+ ?>
333
+ </table>
334
+
335
+ <h3><?php
336
+ _e ( 'Maps and geotagging', 'dbem' );
337
+ ?></h3>
338
+ <table class='form-table'>
339
+ <?php
340
+ $gmap_is_active = get_option ( 'dbem_gmap_is_active' );
341
+ ?>
342
+
343
+ <tr valign="top">
344
+ <th scope="row"><?php
345
+ _e ( 'Enable Google Maps integration?', 'dbem' );
346
+ ?></th>
347
+ <td><input id="dbem_gmap_is_active_yes" name="dbem_gmap_is_active"
348
+ type="radio" value="1"
349
+ <?php
350
+ if ($gmap_is_active)
351
+ echo "checked='checked'";
352
+ ?> /><?php
353
+ _e ( 'Yes' );
354
+ ?> <br />
355
+ <input name="dbem_gmap_is_active" type="radio" value="0"
356
+ <?php
357
+ if (! $gmap_is_active)
358
+ echo "checked='checked'";
359
+ ?> /> <?php
360
+ _e ( 'No' );
361
+ ?> <br />
362
+ <?php
363
+ _e ( 'Check this option to enable Goggle Map integration.', 'dbem' )?>
364
+ </td>
365
+ </tr>
366
+ <?php
367
+ dbem_options_input_text ( __ ( 'Google Maps API Key', 'dbem' ), 'dbem_gmap_key', sprintf ( __ ( "To display Google Maps you need a Google Maps API key. Don't worry, it's free, you can get one <a href='%s'>here</a>.", 'dbem' ), 'http://code.google.com/apis/maps/signup.html' ) );
368
+
369
+ dbem_options_textarea ( __ ( 'Map text format', 'dbem' ), 'dbem_map_text_format', __ ( 'The format the text appearing in the event page map cloud.<br/>Follow the previous formatting instructions.', 'dbem' ) );
370
+ ?>
371
+ </table>
372
+
373
+ <h3><?php
374
+ _e ( 'RSVP and bookings', 'dbem' );
375
+ ?></h3>
376
+ <table class='form-table'>
377
+ <?php
378
+ dbem_options_select ( __ ( 'Default contact person', 'dbem' ), 'dbem_default_contact_person', dbem_get_indexed_users (), __ ( 'Select the default contact person. This user will be employed whenever a contact person is not explicitly specified for an event', 'dbem' ) );
379
+ dbem_options_radio_binary ( __ ( 'Enable the RSVP e-mail notifications?', 'dbem' ), 'dbem_rsvp_mail_notify_is_active', __ ( 'Check this option if you want to receive an email when someone books places for your events.', 'dbem' ) );
380
+ dbem_options_textarea ( __ ( 'Contact person email format', 'dbem' ), 'dbem_contactperson_email_body', __ ( 'The format or the email which will be sent to the contact person. Follow the events formatting instructions. <br/>Use <code>#_RESPNAME</code>, <code>#_RESPEMAIL</code> and <code>#_RESPPHONE</code> to display respectively the name, e-mail, address and phone of the respondent.<br/>Use <code>#_SPACES</code> to display the number of spaces reserved by the respondent. Use <code>#_COMMENT</code> to display the respondent\'s comment. <br/> Use <code>#_BOOKEDSEATS</code> and <code>#_AVAILABLESEATS</code> to display respectively the number of booked and available seats.', 'dbem' ) );
381
+ dbem_options_textarea ( __ ( 'Contact person email format', 'dbem' ), 'dbem_respondent_email_body', __ ( 'The format or the email which will be sent to reposdent. Follow the events formatting instructions. <br/>Use <code>#_RESPNAME</code> to display the name of the respondent.<br/>Use <code>#_CONTACTNAME</code> and <code>#_CONTACTMAIL</code> a to display respectively the name and e-mail of the contact person.<br/>Use <code>#_SPACES</code> to display the number of spaces reserved by the respondent. Use <code>#_COMMENT</code> to display the respondent\'s comment.', 'dbem' ) );
382
+ dbem_options_input_text ( __ ( 'Notification sender name', 'dbem' ), 'dbem_mail_sender_name', __ ( "Insert the display name of the notification sender.", 'dbem' ) );
383
+ dbem_options_input_text ( __ ( 'Notification sender address', 'dbem' ), 'dbem_mail_sender_address', __ ( "Insert the address of the notification sender. It must corresponds with your gmail account user", 'dbem' ) );
384
+ dbem_options_input_text ( __ ( 'Default notification receiver address', 'dbem' ), 'dbem_mail_receiver_address', __ ( "Insert the address of the receiver of your notifications", 'dbem' ) );
385
+ dbem_options_input_text ( 'Mail sending port', 'dbem_rsvp_mail_port', __ ( "The port through which you e-mail notifications will be sent. Make sure the firewall doesn't block this port", 'dbem' ) );
386
+ dbem_options_select ( __ ( 'Mail sending method', 'dbem' ), 'dbem_rsvp_mail_send_method', array ('smtp' => 'SMTP', 'mail' => __ ( 'PHP mail function', 'dbem' ), 'sendmail' => 'Sendmail', 'qmail' => 'Qmail' ), __ ( 'Select the method to send email notification.', 'dbem' ) );
387
+ dbem_options_radio_binary ( __ ( 'Use SMTP authentication?', 'dbem' ), 'dbem_rsvp_mail_SMTPAuth', __ ( 'SMTP authenticatio is often needed. If you use GMail, make sure to set this parameter to Yes', 'dbem' ) );
388
+ dbem_options_input_text ( 'SMTP host', 'dbem_smtp_host', __ ( "The SMTP host. Usually it corresponds to 'localhost'. If you use GMail, set this value to 'ssl://smtp.gmail.com:465'.", 'dbem' ) );
389
+ dbem_options_input_text ( __ ( 'SMTP username', 'dbem' ), 'dbem_smtp_username', __ ( "Insert the username to be used to access your SMTP server.", 'dbem' ) );
390
+ dbem_options_input_password ( __ ( 'SMTP password', 'dbem' ), "dbem_smtp_password", __ ( "Insert the password to be used to access your SMTP server", 'dbem' ) );
391
+ ?>
392
+
393
+
394
+
395
+ </table>
396
+
397
+ <h3><?php
398
+ _e ( 'Images size', 'dbem' );
399
+ ?></h3>
400
+ <table class='form-table'> <?php
401
+ dbem_options_input_text ( __ ( 'Maximum width (px)', 'dbem' ), 'dbem_image_max_width', __ ( 'The maximum allowed width for images uploades', 'dbem' ) );
402
+ dbem_options_input_text ( __ ( 'Maximum height (px)', 'dbem' ), 'dbem_image_max_height', __ ( "The maximum allowed width for images uploaded, in pixels", 'dbem' ) );
403
+ dbem_options_input_text ( __ ( 'Maximum size (bytes)', 'dbem' ), 'dbem_image_max_size', __ ( "The maximum allowed size for images uploaded, in pixels", 'dbem' ) );
404
+ ?>
405
+ </table>
406
+
407
+
408
+
409
+ <p class="submit"><input type="submit" id="dbem_options_submit"
410
+ name="Submit" value="<?php
411
+ _e ( 'Save Changes' )?>" /></p>
412
+
413
+
414
+ <?php
415
+ settings_fields ( 'dbem-options' );
416
+ ?>
417
+ </form>
418
+ </div>
419
+ <?php
420
+
421
+ }
422
+
423
+ //This is the content of the event page
424
+ function dbem_events_page_content() {
425
+ global $wpdb;
426
+ if (isset ( $_REQUEST ['location_id'] ) && $_REQUEST ['location_id'] |= '') {
427
+
428
+ $location = dbem_get_location ( dbem_sanitize_request($_REQUEST ['location_id']));
429
+ $single_location_format = get_option ( 'dbem_single_location_format' );
430
+ $page_body = dbem_replace_locations_placeholders ( $single_location_format, $location );
431
+ return $page_body;
432
+
433
+ }
434
+ if (isset ( $_REQUEST ['event_id'] ) && $_REQUEST ['event_id'] != '') {
435
+ // single event page
436
+ $event_ID = dbem_sanitize_request($_REQUEST ['event_id']);
437
+ $event = dbem_get_event ( $event_ID );
438
+ $single_event_format = get_option ( 'dbem_single_event_format' );
439
+ $page_body = dbem_replace_placeholders ( $single_event_format, $event, 'stop' );
440
+ return $page_body;
441
+ } elseif (isset ( $_REQUEST ['calendar_day'] ) && $_REQUEST ['calendar_day'] != '') {
442
+ $date = dbem_sanitize_request($_REQUEST ['calendar_day']);
443
+ $events_N = dbem_events_count_for ( $date );
444
+ // $_GET['scope'] ? $scope = dbem_sanitize_request($_GET['scope']): $scope = "future";
445
+ // $stored_format = get_option('dbem_event_list_item_format');
446
+ // $events_body = dbem_get_events_list(10, $scope, "ASC", $stored_format, $false);
447
+ if ($events_N > 1) {
448
+ $_GET ['calendar_day'] ? dbem_sanitize_request($scope = $_GET ['calendar_day']) : $scope = "future";
449
+ $stored_format = get_option ( 'dbem_event_list_item_format' );
450
+ //Add headers and footers to the events list
451
+ $single_event_format_header = get_option ( 'dbem_event_list_item_format_header' );
452
+ $single_event_format_header = ( $single_event_format_header != '' ) ? $single_event_format_header : "<ul class='dbem_events_list'>";
453
+ $single_event_format_footer = get_option ( 'dbem_event_list_item_format_footer' );
454
+ $single_event_format_footer = ( $single_event_format_footer != '' ) ? $single_event_format_footer : "</ul>";
455
+ return $single_event_format_header . dbem_get_events_list ( 10, $scope, "ASC", $stored_format, $false ) . $single_event_format_footer;
456
+ } else {
457
+ $events = dbem_get_events ( "", dbem_sanitize_request($_REQUEST['calendar_day']) );
458
+ $event = $events [0];
459
+ $single_event_format = get_option ( 'dbem_single_event_format' );
460
+ $page_body = dbem_replace_placeholders ( $single_event_format, $event );
461
+ return $page_body;
462
+ }
463
+ return $events_body;
464
+ } else {
465
+ // Multiple events page
466
+ $_GET ['scope'] ? $scope = dbem_sanitize_request($_GET ['scope']) : $scope = "future";
467
+ $stored_format = get_option ( 'dbem_event_list_item_format' );
468
+ if (get_option ( 'dbem_display_calendar_in_events_page' )){
469
+ $events_body = dbem_get_calendar ('full=1');
470
+ }else{
471
+ $single_event_format_header = get_option ( 'dbem_event_list_item_format_header' );
472
+ $single_event_format_header = ( $single_event_format_header != '' ) ? $single_event_format_header : "<ul class='dbem_events_list'>";
473
+ $single_event_format_footer = get_option ( 'dbem_event_list_item_format_footer' );
474
+ $single_event_format_footer = ( $single_event_format_footer != '' ) ? $single_event_format_footer : "</ul>";
475
+ $events_body = $single_event_format_header . dbem_get_events_list ( 10, $scope, "ASC", $stored_format, $false ) . $single_event_format_footer;
476
+ }
477
+ return $events_body;
478
+
479
+ }
480
+ }
481
+ function dbem_events_count_for($date) {
482
+ global $wpdb;
483
+ $table_name = $wpdb->prefix . EVENTS_TBNAME;
484
+ $sql = "SELECT COUNT(*) FROM $table_name WHERE (event_start_date like '$date') OR (event_start_date <= '$date' AND event_end_date >= '$date');";
485
+ return $wpdb->get_var ( $sql );
486
+ }
487
+
488
+ // filter function to call the event page when appropriate
489
+ function dbem_filter_events_page($data) {
490
+
491
+ // $table_name = $wpdb->prefix .EVENTS_TBNAME;
492
+ // $start = strpos($data, DBEM_PAGE);
493
+
494
+
495
+ $is_events_post = (get_the_ID () == get_option ( 'dbem_events_page' ));
496
+ $events_page_id = get_option ( 'dbem_events_page' );
497
+ if (is_page ( $events_page_id ) && $is_events_post) {
498
+ return dbem_events_page_content ();
499
+ } else {
500
+ return $data;
501
+ }
502
+ }
503
+ add_filter ( 'the_content', 'dbem_filter_events_page' );
504
+
505
+ function dbem_events_page_title($data) {
506
+ $events_page_id = get_option ( 'dbem_events_page' );
507
+ $events_page = get_page ( $events_page_id );
508
+ $events_page_title = $events_page->post_title;
509
+
510
+ if (($data == $events_page_title) && (is_page ( $events_page_id ))) {
511
+ if (isset ( $_REQUEST ['calendar_day'] ) && $_REQUEST ['calendar_day'] != '') {
512
+
513
+ $date = dbem_sanitize_request($_REQUEST ['calendar_day']);
514
+ $events_N = dbem_events_count_for ( $date );
515
+
516
+ if ($events_N == 1) {
517
+ $events = dbem_get_events ( "", dbem_sanitize_request($_REQUEST ['calendar_day']));
518
+ $event = $events [0];
519
+ $stored_page_title_format = get_option ( 'dbem_event_page_title_format' );
520
+ $page_title = dbem_replace_placeholders ( $stored_page_title_format, $event );
521
+ return $page_title;
522
+ }
523
+
524
+ }
525
+
526
+ if (isset ( $_REQUEST ['location_id'] ) && $_REQUEST ['location_id'] |= '') {
527
+ $location = dbem_get_location ( dbem_sanitize_request($_REQUEST ['location_id']) );
528
+ $stored_page_title_format = get_option ( 'dbem_location_page_title_format' );
529
+ $page_title = dbem_replace_locations_placeholders ( $stored_page_title_format, $location );
530
+ return $page_title;
531
+ }
532
+ if (isset ( $_REQUEST ['event_id'] ) && $_REQUEST ['event_id'] != '') {
533
+ // single event page
534
+ $event_ID = dbem_sanitize_request($_REQUEST ['event_id']);
535
+ $event = dbem_get_event ( $event_ID );
536
+ $stored_page_title_format = get_option ( 'dbem_event_page_title_format' );
537
+ $page_title = dbem_replace_placeholders ( $stored_page_title_format, $event );
538
+ return $page_title;
539
+ } else {
540
+ // Multiple events page
541
+ $page_title = get_option ( 'dbem_events_page_title' );
542
+ return $page_title;
543
+
544
+ }
545
+
546
+ } else {
547
+ return $data;
548
+ }
549
+
550
+ }
551
+ // to make sure that in pages lists the title is dbem_events_page_title, and not overwritten by the previous filter
552
+ add_filter ( 'the_title', 'dbem_events_page_title' );
553
+ add_filter ( 'single_post_title', 'dbem_events_page_title' );
554
+
555
+ function dbem_filter_get_pages($data) {
556
+ $output = array ();
557
+ $events_page_id = get_option ( 'dbem_events_page' );
558
+ for($i = 0; $i < count ( $data ); ++ $i) {
559
+ if ($data [$i]->ID == $events_page_id) {
560
+ $list_events_page = get_option ( 'dbem_list_events_page' );
561
+ if ($list_events_page) {
562
+ $data [$i]->post_title = get_option ( 'dbem_events_page_title' ) . "&nbsp;";
563
+ $output [] = $data [$i];
564
+ }
565
+ } else {
566
+ $output [] = $data [$i];
567
+ }
568
+ }
569
+ return $output;
570
+ }
571
+ add_filter ( 'get_pages', 'dbem_filter_get_pages' );
572
+
573
+ //
574
+ // TODO: ROBA NUOVA DA RIORDINARE
575
+ // ADMIN CSS for debug
576
+ function dbem_admin_css() {
577
+ $css = "
578
+ <style type='text/css'>
579
+ .debug{
580
+ color: green;
581
+ background: #B7F98C;
582
+ margin: 15px;
583
+ padding: 10px;
584
+ border: 1px solid #629948;
585
+ }
586
+ .switch-tab {
587
+ background: #aaa;
588
+ width: 100px;
589
+ float: right;
590
+ text-align: center;
591
+ margin: 3px 1px 0 5px;
592
+ padding: 2px;
593
+ }
594
+ .switch-tab a {
595
+ color: #fff;
596
+ text-decoration: none;
597
+ }
598
+ .switch-tab a:hover {
599
+ color: #D54E21;
600
+
601
+ }
602
+ #events-pagination {
603
+ text-align: center;
604
+
605
+ }
606
+ #events-pagination a {
607
+ margin: 0 20px 0 20px;
608
+ text-decoration: none;
609
+ width: 80px;
610
+ padding: 3px 0;
611
+ background: #FAF4B7;
612
+ border: 1px solid #ccc;
613
+ border-top: none;
614
+ }
615
+ #new-event {
616
+ float: left;
617
+
618
+ }
619
+ </style>";
620
+ echo $css;
621
+ }
622
+
623
+ add_action ( 'admin_print_scripts', 'dbem_admin_css' );
624
+
625
+ // TEMPLATE TAGS
626
+
627
+
628
+ // exposed function, for theme makers
629
+ /* Marcus Begin Edit */
630
+ //Added a category option to the get events list method and shortcode
631
+ function dbem_get_events_list($limit = "10", $scope = "future", $order = "ASC", $format = '', $echo = 1, $category = '') {
632
+ if (strpos ( $limit, "=" )) {
633
+ // allows the use of arguments without breaking the legacy code
634
+ $defaults = array ('limit' => 10, 'scope' => 'future', 'order' => 'ASC', 'format' => '', 'echo' => 1 , 'category' => '');
635
+
636
+ $r = wp_parse_args ( $limit, $defaults );
637
+ extract ( $r, EXTR_SKIP );
638
+ $limit = $r ['limit'];
639
+ $scope = $r ['scope'];
640
+ $order = $r ['order'];
641
+ $format = $r ['format'];
642
+ $echo = $r ['echo'];
643
+ $category = ( preg_match('/^([0-9],?)+$/', $r ['category'] ) ) ? $r ['category'] : '' ;
644
+ }
645
+ if ($scope == "")
646
+ $scope = "future";
647
+ if ($order != "DESC")
648
+ $order = "ASC";
649
+ if ($format == ''){
650
+ $orig_format = true;
651
+ $format = get_option ( 'dbem_event_list_item_format' );
652
+ }
653
+ $events = dbem_get_events ( $limit, $scope, $order, '', '', $category );
654
+ $output = "";
655
+ if (! empty ( $events )) {
656
+ foreach ( $events as $event ) {
657
+ // $localised_date = mysql2date("j M Y", $event->event_time);
658
+ $output .= dbem_replace_placeholders ( $format, $event );
659
+ }
660
+ //Add headers and footers to output
661
+ if( $orig_format ){
662
+ $single_event_format_header = get_option ( 'dbem_event_list_item_format_header' );
663
+ $single_event_format_header = ( $single_event_format_header != '' ) ? $single_event_format_header : "<ul class='dbem_events_list'>";
664
+ $single_event_format_footer = get_option ( 'dbem_event_list_item_format_footer' );
665
+ $single_event_format_footer = ( $single_event_format_footer != '' ) ? $single_event_format_footer : "</ul>";
666
+ $output = $single_event_format_header . $output . $single_event_format_footer;
667
+ }
668
+ } else {
669
+ $output = "<li class='dbem-no-events'>" . get_option ( 'dbem_no_events_message' ) . "</li>";
670
+ }
671
+ if ($echo)
672
+ echo $output;
673
+ else
674
+ return $output;
675
+ }
676
+
677
+ function dbem_get_events_list_shortcode($atts) {
678
+ extract ( shortcode_atts ( array ('limit' => 3, 'scope' => 'future', 'order' => 'ASC', 'format' => '', 'category' => '' ), $atts ) );
679
+ $result = dbem_get_events_list ( "limit=$limit&scope=$scope&order=$order&format=$format&echo=0&category=$category" );
680
+ return $result;
681
+ }
682
+ add_shortcode ( 'events_list', 'dbem_get_events_list_shortcode' );
683
+ /* Marcus End Edit*/
684
+
685
+ function dbem_get_events_page($justurl = 0, $echo = 1, $text = '') {
686
+ if (strpos ( $justurl, "=" )) {
687
+ // allows the use of arguments without breaking the legacy code
688
+ $defaults = array ('justurl' => 0, 'text' => '', 'echo' => 1 );
689
+
690
+ $r = wp_parse_args ( $justurl, $defaults );
691
+ extract ( $r, EXTR_SKIP );
692
+ $justurl = $r ['justurl'];
693
+ $text = $r ['text'];
694
+ $echo = $r ['echo'];
695
+ }
696
+
697
+ $page_link = get_permalink ( get_option ( "dbem_events_page" ) );
698
+ if ($justurl) {
699
+ $result = $page_link;
700
+ } else {
701
+ if ($text == '')
702
+ $text = get_option ( "dbem_events_page_title" );
703
+ $result = "<a href='$page_link' title='$text'>$text</a>";
704
+ }
705
+ if ($echo)
706
+ echo $result;
707
+ else
708
+ return $result;
709
+
710
+ }
711
+ function dbem_get_events_page_shortcode($atts) {
712
+ extract ( shortcode_atts ( array ('justurl' => 0, 'text' => '' ), $atts ) );
713
+ $result = dbem_get_events_page ( "justurl=$justurl&text=$text&echo=0" );
714
+ return $result;
715
+ }
716
+ add_shortcode ( 'events_page', 'dbem_get_events_page_shortcode' );
717
+
718
+ function dbem_are_events_available($scope = "future") {
719
+ if ($scope == "")
720
+ $scope = "future";
721
+ $events = dbem_get_events ( 1, $scope );
722
+
723
+ if (empty ( $events ))
724
+ return FALSE;
725
+ else
726
+ return TRUE;
727
+ }
728
+
729
+ // Returns true if the page in question is the events page
730
+ function dbem_is_events_page() {
731
+ $events_page_id = get_option ( 'dbem_events_page' );
732
+ return is_page ( $events_page_id );
733
+ }
734
+
735
+ function dbem_is_single_event_page() {
736
+ return (dbem_is_events_page () && (isset ( $_REQUEST ['event_id'] ) && $_REQUEST ['event_id'] != ''));
737
+ }
738
+
739
+ function dbem_is_multiple_events_page() {
740
+ return (dbem_is_events_page () && ! (isset ( $_REQUEST ['event_id'] ) && $_REQUEST ['event_id'] != ''));
741
+ }
742
+
743
+ // main function querying the database event table
744
+ /* Marcus Begin Edit */
745
+ //Added extra method option for category
746
+ function dbem_get_events($limit = "", $scope = "future", $order = "ASC", $offset = "", $location_id = "", $category = '') {
747
+ /* Marcus End Edit */
748
+ global $wpdb;
749
+
750
+ $events_table = $wpdb->prefix . EVENTS_TBNAME;
751
+ if ($limit != "")
752
+ $limit = "LIMIT $limit";
753
+ if ($offset != "")
754
+ $offset = "OFFSET $offset";
755
+ if ($order == "")
756
+ $order = "ASC";
757
+
758
+ $timestamp = time ();
759
+ $date_time_array = getdate ( $timestamp );
760
+ $hours = $date_time_array ['hours'];
761
+ $minutes = $date_time_array ['minutes'];
762
+ $seconds = $date_time_array ['seconds'];
763
+ $month = $date_time_array ['mon'];
764
+ $day = $date_time_array ['mday'];
765
+ $year = $date_time_array ['year'];
766
+ $today = strftime ( '%Y-%m-%d', mktime ( $hours, $minutes, $seconds, $month, $day, $year ) );
767
+
768
+ $conditions = array ();
769
+ if (preg_match ( "/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/", $scope )) {
770
+ //$conditions [] = " event_start_date like '$scope'";
771
+ $conditions [] = " (event_start_date like '$scope') OR (event_start_date <= '$scope' AND event_end_date >= '$scope')";
772
+ } else {
773
+ if (($scope != "past") && ($scope != "all") && ($scope != "today"))
774
+ $scope = "future";
775
+ if ($scope == "future")
776
+ /* Marcus Begin Edit */
777
+ //This is so events with future dates are counted too
778
+ $conditions [] = " (event_start_date >= '$today' OR (event_end_date >= '$today' AND event_end_date != '0000-00-00' AND event_end_date IS NOT NULL))";
779
+ /* Marcus End Edit */
780
+ if ($scope == "past")
781
+ $conditions [] = " event_start_date < '$today'";
782
+ if ($scope == "today")
783
+ $conditions [] = " (event_start_date like '$today') OR (event_start_date <= '$today' AND event_end_date >= '$today')";
784
+ }
785
+
786
+ if ($location_id != "")
787
+ $conditions [] = " location_id = $location_id";
788
+
789
+ /* Marcus Begin Edit */
790
+ if ($category != '' && is_numeric($category)){
791
+ $conditions [] = " event_category_id = $category";
792
+ }elseif( preg_match('/^([0-9],?)+$/', $category) ){
793
+ $category = explode(',', $category);
794
+ $category_conditions = array();
795
+ foreach($category as $cat){
796
+ $category_conditions[] = " event_category_id = $cat";
797
+ }
798
+ $conditions [] = "(".implode(' OR', $category_conditions).")";
799
+ }
800
+ /* Marcus End Edit */
801
+
802
+ $where = implode ( " AND ", $conditions );
803
+ if ($where != "")
804
+ $where = " WHERE " . $where;
805
+
806
+ $sql = "SELECT event_id,
807
+ event_name,
808
+ DATE_FORMAT(event_start_time, '%e') AS 'event_day',
809
+ DATE_FORMAT(event_start_time, '%Y') AS 'event_year',
810
+ DATE_FORMAT(event_start_time, '%k') AS 'event_hh',
811
+ DATE_FORMAT(event_start_time, '%i') AS 'event_mm',
812
+ DATE_FORMAT(event_end_time, '%e') AS 'event_end_day',
813
+ DATE_FORMAT(event_end_time, '%Y') AS 'event_end_year',
814
+ DATE_FORMAT(event_end_time, '%k') AS 'event_end_hh',
815
+ DATE_FORMAT(event_end_time, '%i') AS 'event_end_mm',
816
+ event_start_date,
817
+ event_end_date,
818
+ event_start_time,
819
+ event_end_time,
820
+ event_notes,
821
+ event_rsvp,
822
+ recurrence_id,
823
+ location_id,
824
+ event_contactperson_id,
825
+ event_category_id
826
+ event_attributes
827
+ FROM $events_table
828
+ $where
829
+ ORDER BY event_start_date $order , event_start_time $order
830
+ $limit
831
+ $offset";
832
+ $wpdb->show_errors = true;
833
+ $events = $wpdb->get_results ( $sql, ARRAY_A );
834
+ if (! empty ( $events )) {
835
+ //$wpdb->print_error();
836
+ $inflated_events = array ();
837
+ foreach ( $events as $this_event ) {
838
+
839
+ $this_location = dbem_get_location ( $this_event ['location_id'] );
840
+ $this_event ['location_name'] = $this_location ['location_name'];
841
+ $this_event ['location_address'] = $this_location ['location_address'];
842
+ $this_event ['location_town'] = $this_location ['location_town'];
843
+ /* Marcus Begin Edit */
844
+ //I also edited the SQL
845
+ $this_event ['event_attributes'] = @unserialize($this_event ['event_attributes']);
846
+ $this_event ['event_attributes'] = (!is_array($this_event ['event_attributes'])) ? array() : $this_event ['event_attributes'] ;
847
+ /* Marcus End Edit */
848
+ array_push ( $inflated_events, $this_event );
849
+ }
850
+ return $inflated_events;
851
+ } else {
852
+ return null;
853
+ }
854
+ }
855
+
856
+ function dbem_get_event($event_id) {
857
+ global $wpdb;
858
+ $events_table = $wpdb->prefix . EVENTS_TBNAME;
859
+ $sql = "SELECT event_id,
860
+ event_name,
861
+ DATE_FORMAT(event_start_date, '%Y-%m-%e') AS 'event_date',
862
+ DATE_FORMAT(event_start_date, '%e') AS 'event_day',
863
+ DATE_FORMAT(event_start_date, '%m') AS 'event_month',
864
+ DATE_FORMAT(event_start_date, '%Y') AS 'event_year',
865
+ DATE_FORMAT(event_start_time, '%k') AS 'event_hh',
866
+ DATE_FORMAT(event_start_time, '%i') AS 'event_mm',
867
+ DATE_FORMAT(event_start_time, '%h:%i%p') AS 'event_start_12h_time',
868
+ DATE_FORMAT(event_start_time, '%H:%i') AS 'event_start_24h_time',
869
+ DATE_FORMAT(event_end_time, '%Y-%m-%e') AS 'event_end_date',
870
+ DATE_FORMAT(event_end_time, '%e') AS 'event_end_day',
871
+ DATE_FORMAT(event_end_time, '%m') AS 'event_end_month',
872
+ DATE_FORMAT(event_end_time, '%Y') AS 'event_end_year',
873
+ DATE_FORMAT(event_end_time, '%k') AS 'event_end_hh',
874
+ DATE_FORMAT(event_end_time, '%i') AS 'event_end_mm',
875
+ DATE_FORMAT(event_end_time, '%h:%i%p') AS 'event_end_12h_time',
876
+ DATE_FORMAT(event_end_time, '%H:%i') AS 'event_end_24h_time',
877
+ event_start_date,
878
+ event_end_date,
879
+ event_start_time,
880
+ event_end_time,
881
+ event_notes,
882
+ event_rsvp,
883
+ event_seats,
884
+ recurrence_id,
885
+ location_id,
886
+ event_contactperson_id,
887
+ event_attributes
888
+ FROM $events_table
889
+ WHERE event_id = $event_id";
890
+
891
+ //$wpdb->show_errors(true);
892
+ $event = $wpdb->get_row ( $sql, ARRAY_A );
893
+ //$wpdb->print_error();
894
+ $location = dbem_get_location ( $event ['location_id'] );
895
+ $event ['location_name'] = $location ['location_name'];
896
+ $event ['location_address'] = $location ['location_address'];
897
+ $event ['location_town'] = $location ['location_town'];
898
+ $event ['location_latitude'] = $location ['location_latitude'];
899
+ $event ['location_longitude'] = $location ['location_longitude'];
900
+ $event ['location_image_url'] = $location ['location_image_url'];
901
+ /* Marcus Begin Edit */
902
+ //I also edited the SQL
903
+ $event ['event_attributes'] = @unserialize($event ['event_attributes']);
904
+ $event ['event_attributes'] = (!is_array($event ['event_attributes'])) ? array() : $event ['event_attributes'] ;
905
+ /* Marcus End Edit */
906
+ return $event;
907
+ }
908
+
909
+ function dbem_hello_to_new_user() {
910
+ $current_user = wp_get_current_user ();
911
+ $advice = sprintf ( __ ( "<p>Hey, <strong>%s</strong>, welcome to <strong>Events Manager</strong>! We hope you like it around here.</p>
912
+ <p>Now it's time to insert events lists through <a href='%s' title='Widgets page'>widgets</a>, <a href='%s' title='Template tags documentation'>template tags</a> or <a href='%s' title='Shortcodes documentation'>shortcodes</a>.</p>
913
+ <p>By the way, have you taken a look at the <a href='%s' title='Change settings'>Settings page</a>? That's where you customize the way events and locations are displayed.</p>
914
+ <p>What? Tired of seeing this advice? I hear you, <a href='%s' title='Don't show this advice again'>click here</a> and you won't see this again!</p>", 'dbem' ), $current_user->display_name, get_bloginfo ( 'url' ) . '/wp-admin/widgets.php', 'http://davidebenini.it/wordpress-plugins/events-manager#template-tags', 'http://davidebenini.it/wordpress-plugins/events-manager#shortcodes', get_bloginfo ( 'url' ) . '/wp-admin/admin.php?page=events-manager-options', get_bloginfo ( 'url' ) . '/wp-admin/admin.php?page=events-manager/events-manager.php&disable_hello_to_user=true' );
915
+ ?>
916
+ <div id="message" class="updated">
917
+ <?php
918
+ echo $advice;
919
+ ?>
920
+ </div>
921
+ <?php
922
+ }
923
+
924
+ function dbem_events_table($events, $limit, $title) {
925
+ if (isset ( $_GET ['scope'] ))
926
+ $scope = $_GET ['scope'];
927
+ else
928
+ $scope = "future";
929
+ if (($scope != "past") && ($scope != "all"))
930
+ $scope = "future";
931
+ $events_count = count ( dbem_get_events ( "", $scope ) );
932
+
933
+ if (isset ( $_GET ['offset'] ))
934
+ $offset = $_GET ['offset'];
935
+
936
+ $use_events_end = get_option ( 'dbem_use_event_end' );
937
+
938
+ ?>
939
+
940
+ <div class="wrap">
941
+ <div id="icon-events" class="icon32"><br />
942
+ </div>
943
+ <h2><?php
944
+ echo $title;
945
+ ?></h2>
946
+
947
+ <?php
948
+ $say_hello = get_option ( 'dbem_hello_to_user' );
949
+ if ($say_hello == 1)
950
+ dbem_hello_to_new_user ();
951
+
952
+ ?>
953
+ <!--<div id='new-event' class='switch-tab'><a href="<?php
954
+ bloginfo ( 'wpurl' )?>/wp-admin/edit.php?page=events-manager/events-manager.php&amp;action=edit_event"><?php
955
+ _e ( 'New Event ...', 'dbem' );
956
+ ?></a></div>-->
957
+ <?php
958
+
959
+ $link = array ();
960
+ $link ['past'] = "<a href='" . get_bloginfo ( 'wpurl' ) . "/wp-admin/edit.php?page=events-manager/events-manager.php&amp;scope=past&amp;order=desc'>" . __ ( 'Past events', 'dbem' ) . "</a>";
961
+ $link ['all'] = " <a href='" . get_bloginfo ( 'wpurl' ) . "/wp-admin/edit.php?page=events-manager/events-manager.php&amp;scope=all&amp;order=desc'>" . __ ( 'All events', 'dbem' ) . "</a>";
962
+ $link ['future'] = " <a href='" . get_bloginfo ( 'wpurl' ) . "/wp-admin/edit.php?page=events-manager/events-manager.php&amp;scope=future'>" . __ ( 'Future events', 'dbem' ) . "</a>";
963
+
964
+ $scope_names = array ();
965
+ $scope_names ['past'] = __ ( 'Past events', 'dbem' );
966
+ $scope_names ['all'] = __ ( 'All events', 'dbem' );
967
+ $scope_names ['future'] = __ ( 'Future events', 'dbem' );
968
+
969
+ ?>
970
+
971
+ <form id="posts-filter" action="" method="get"><input type='hidden'
972
+ name='page' value='events-manager/events-manager.php' />
973
+ <ul class="subsubsub">
974
+ <li><a href='edit.php' class="current"><?php
975
+ _e ( 'Total', 'dbem' );
976
+ ?> <span
977
+ class="count">(<?php
978
+ echo (count ( $events ));
979
+ ?>)</span></a></li>
980
+ </ul>
981
+
982
+
983
+ <div class="tablenav">
984
+
985
+ <div class="alignleft actions"><select name="action">
986
+ <option value="-1" selected="selected"><?php
987
+ _e ( 'Bulk Actions' );
988
+ ?></option>
989
+ <option value="deleteEvents"><?php
990
+ _e ( 'Delete selected' );
991
+ ?></option>
992
+
993
+ </select> <input type="submit" value="<?php
994
+ _e ( 'Apply' );
995
+ ?>"
996
+ name="doaction2" id="doaction2" class="button-secondary action" /> <select
997
+ name="scope">
998
+
999
+ <?php
1000
+ foreach ( $scope_names as $key => $value ) {
1001
+ $selected = "";
1002
+ if ($key == $scope)
1003
+ $selected = "selected='selected'";
1004
+ echo "<option value='$key' $selected>$value</option> ";
1005
+ }
1006
+ ?>
1007
+ </select> <input id="post-query-submit" class="button-secondary"
1008
+ type="submit" value="<?php
1009
+ _e ( 'Filter' )?>" /></div>
1010
+ <div class="clear"></div>
1011
+ <?php
1012
+ if (empty ( $events )) {
1013
+ // TODO localize
1014
+ echo "no events";
1015
+ } else {
1016
+ ?>
1017
+
1018
+ <table class="widefat">
1019
+ <thead>
1020
+ <tr>
1021
+ <th class='manage-column column-cb check-column' scope='col'><input
1022
+ class='select-all' type="checkbox" value='1' /></th>
1023
+ <th><?php
1024
+ _e ( 'Name', 'dbem' );
1025
+ ?></th>
1026
+ <?php /* Marcus Begin Edit */ ?>
1027
+ <th></th>
1028
+ <?php /* Marcus End Edit */ ?>
1029
+ <th><?php
1030
+ _e ( 'Location', 'dbem' );
1031
+ ?></th>
1032
+ <th colspan="2"><?php
1033
+ _e ( 'Date and time', 'dbem' );
1034
+ ?></th>
1035
+ </tr>
1036
+ </thead>
1037
+ <tbody>
1038
+ <?php
1039
+ $i = 1;
1040
+ foreach ( $events as $event ) {
1041
+ $class = ($i % 2) ? ' class="alternate"' : '';
1042
+ // FIXME set to american
1043
+ $localised_date = mysql2date ( __ ( 'D d M Y' ), $event ['event_start_date'] );
1044
+ $style = "";
1045
+ $today = date ( "Y-m-d" );
1046
+
1047
+ $location_summary = "<b>" . $event ['location_name'] . "</b><br/>" . $event ['location_address'] . " - " . $event ['location_town'];
1048
+
1049
+ if ($event ['event_start_date'] < $today)
1050
+ $style = "style ='background-color: #FADDB7;'";
1051
+ ?>
1052
+ <tr <?php
1053
+ echo "$class $style";
1054
+ ?>>
1055
+
1056
+ <td><input type='checkbox' class='row-selector'
1057
+ value='<?php
1058
+ echo $event ['event_id'];
1059
+ ?>' name='events[]' /></td>
1060
+ <td><strong><a class="row-title"
1061
+ href="<?php
1062
+ bloginfo ( 'wpurl' )?>/wp-admin/edit.php?page=events-manager/events-manager.php&amp;action=edit_event&amp;event_id=<?php
1063
+ echo $event ['event_id'];
1064
+ ?>"><?php
1065
+ echo ($event ['event_name']);
1066
+ ?></a></strong>
1067
+ <?
1068
+ $category = dbem_get_category($event ['event_id']);
1069
+ if($category)
1070
+ echo "<br/><span title='".__ ( 'Category', 'dbem' ).": ".$category['category_name']."'>".$category['category_name']."</span>";
1071
+ ?>
1072
+ </td>
1073
+ <td>
1074
+ <?php /* Marcus Begin Edit */ ?>
1075
+ <a
1076
+ href="<?php
1077
+ bloginfo ( 'wpurl' )?>/wp-admin/edit.php?page=events-manager/events-manager.php&amp;action=duplicate_event&amp;event_id=<?php
1078
+ echo $event ['event_id'];
1079
+ ?>"
1080
+ title="<?php
1081
+ _e ( 'Duplicate this event', 'dbem' );
1082
+ ?>"><strong>+</strong></a>
1083
+ <?php /* Marcus End Edit */ ?>
1084
+ </td>
1085
+ <td>
1086
+
1087
+ <?php
1088
+ echo $location_summary;
1089
+ ?>
1090
+
1091
+ </td>
1092
+
1093
+ <td>
1094
+ <?php
1095
+ echo $localised_date;
1096
+ ?><br />
1097
+
1098
+ <?php
1099
+ echo substr ( $event ['event_start_time'], 0, 5 ) . " - " . substr ( $event ['event_end_time'], 0, 5 );
1100
+ ?>
1101
+ </td>
1102
+ <td>
1103
+ <?php
1104
+ if ($event ['recurrence_id']) {
1105
+ $recurrence = dbem_get_recurrence ( $event [recurrence_id] );
1106
+ ?>
1107
+
1108
+ <b><?php
1109
+ echo $recurrence ['recurrence_description'];
1110
+ ?> <br />
1111
+ <a
1112
+ href="<?php
1113
+ bloginfo ( 'wpurl' )?>/wp-admin/edit.php?page=events-manager/events-manager.php&amp;action=edit_recurrence&amp;recurrence_id=<?php
1114
+ echo $recurrence ['recurrence_id'];
1115
+ ?>"><?php
1116
+ _e ( 'Reschedule', 'dbem' );
1117
+ ?></a></b>
1118
+
1119
+
1120
+ <?php
1121
+ }
1122
+ ?>
1123
+ </td>
1124
+
1125
+
1126
+ <?php
1127
+ echo '</tr>';
1128
+ $i ++;
1129
+ }
1130
+ ?>
1131
+
1132
+
1133
+
1134
+
1135
+
1136
+ </tbody>
1137
+ </table>
1138
+ <?php
1139
+ } // end of table ?>
1140
+
1141
+ <div class='tablenav'>
1142
+ <div class="alignleft actions"><br class='clear' />
1143
+ </div>
1144
+ <br class='clear' />
1145
+ </div>
1146
+
1147
+ </form>
1148
+ </div>
1149
+ </div>
1150
+
1151
+ <?php
1152
+ if ($events_count > $limit) {
1153
+ $backward = $offset + $limit;
1154
+ $forward = $offset - $limit;
1155
+ if (DEBUG)
1156
+ echo "COUNT = $count BACKWARD = $backward FORWARD = $forward<br> -- OFFSET = $offset";
1157
+ echo "<div id='events-pagination'> ";
1158
+ if ($backward < $events_count)
1159
+ echo "<a style='float: left' href='" . get_bloginfo ( 'wpurl' ) . "/wp-admin/edit.php?page=events-manager/events-manager.php&amp;scope=$scope&offset=$backward'>&lt;&lt;</a>";
1160
+ if ($forward >= 0)
1161
+ echo "<a style='float: right' href='" . get_bloginfo ( 'wpurl' ) . "/wp-admin/edit.php?page=events-manager/events-manager.php&amp;scope=$scope&offset=$forward'>&gt;&gt;</a>";
1162
+ echo "</div>";
1163
+ }
1164
+ ?>
1165
+
1166
+ </div>
1167
+ <?php
1168
+ }
1169
+ function dbem_event_form($event, $title, $element) {
1170
+
1171
+ global $localised_date_formats;
1172
+ // change prefix according to event/recurrence
1173
+ $_GET ['action'] == "edit_recurrence" ? $pref = "recurrence_" : $pref = "event_";
1174
+
1175
+ $_GET ['action'] == "edit_recurrence" ? $form_destination = "edit.php?page=events-manager/events-manager.php&amp;action=update_recurrence&amp;recurrence_id=" . $element : $form_destination = "edit.php?page=events-manager/events-manager.php&amp;action=update_event&amp;event_id=" . $element;
1176
+
1177
+ $locale_code = substr ( get_locale (), 0, 2 );
1178
+ $localised_date_format = $localised_date_formats [$locale_code];
1179
+
1180
+ $hours_locale = "24";
1181
+ // Setting 12 hours format for those countries using it
1182
+ if (preg_match ( "/en|sk|zh|us|uk/", $locale_code ))
1183
+ $hours_locale = "12";
1184
+
1185
+ $localised_example = str_replace ( "yy", "2008", str_replace ( "mm", "11", str_replace ( "dd", "28", $localised_date_format ) ) );
1186
+ $localised_end_example = str_replace ( "yy", "2008", str_replace ( "mm", "11", str_replace ( "dd", "28", $localised_date_format ) ) );
1187
+
1188
+ if ($event [$pref . 'start_date'] != "") {
1189
+ preg_match ( "/(\d{4})-(\d{2})-(\d{2})/", $event [$pref . 'start_date'], $matches );
1190
+ $year = $matches [1];
1191
+ $month = $matches [2];
1192
+ $day = $matches [3];
1193
+ $localised_date = str_replace ( "yy", $year, str_replace ( "mm", $month, str_replace ( "dd", $day, $localised_date_format ) ) );
1194
+ } else {
1195
+ $localised_date = "";
1196
+ }
1197
+ if ($event [$pref . 'end_date'] != "") {
1198
+ preg_match ( "/(\d{4})-(\d{2})-(\d{2})/", $event [$pref . 'end_date'], $matches );
1199
+ $end_year = $matches [1];
1200
+ $end_month = $matches [2];
1201
+ $end_day = $matches [3];
1202
+ $localised_end_date = str_replace ( "yy", $end_year, str_replace ( "mm", $end_month, str_replace ( "dd", $end_day, $localised_date_format ) ) );
1203
+ } else {
1204
+ $localised_end_date = "";
1205
+ }
1206
+ // if($event[$pref.'rsvp'])
1207
+ // echo (dbem_bookings_table($event[$pref.'id']));
1208
+
1209
+
1210
+ $freq_options = array ("daily" => __ ( 'Daily', 'dbem' ), "weekly" => __ ( 'Weekly', 'dbem' ), "monthly" => __ ( 'Monthly', 'dbem' ) );
1211
+ $days_names = array (1 => __ ( 'Mon' ), 2 => __ ( 'Tue' ), 3 => __ ( 'Wed' ), 4 => __ ( 'Thu' ), 5 => __ ( 'Fri' ), 6 => __ ( 'Sat' ), 7 => __ ( 'Sun' ) );
1212
+ $saved_bydays = explode ( ",", $event ['recurrence_byday'] );
1213
+ $weekno_options = array ("1" => __ ( 'first', 'dbem' ), '2' => __ ( 'second', 'dbem' ), '3' => __ ( 'third', 'dbem' ), '4' => __ ( 'fourth', 'dbem' ), '-1' => __ ( 'last', 'dbem' ) );
1214
+
1215
+ $event [$pref . 'rsvp'] ? $event_RSVP_checked = "checked='checked'" : $event_RSVP_checked = '';
1216
+
1217
+ ?>
1218
+ <form id="eventForm" method="post" action="<?php echo $form_destination; ?>">
1219
+ <div class="wrap">
1220
+ <div id="icon-events" class="icon32"><br /></div>
1221
+ <h2><?php echo $title; ?></h2>
1222
+ <?php
1223
+ if ($event ['recurrence_id']) {
1224
+ ?>
1225
+ <p id='recurrence_warning'>
1226
+ <?php
1227
+ if (isset ( $_GET ['action'] ) && ($_GET ['action'] == 'edit_recurrence')) {
1228
+ _e ( 'WARNING: This is a recurrence.', 'dbem' )?>
1229
+ <br />
1230
+ <?php
1231
+ _e ( 'Modifying these data all the events linked to this recurrence will be rescheduled', 'dbem' );
1232
+
1233
+ } else {
1234
+ _e ( 'WARNING: This is a recurring event.', 'dbem' );
1235
+ _e ( 'If you change these data and save, this will become an independent event.', 'dbem' );
1236
+ }
1237
+ ?>
1238
+ </p>
1239
+ <?php
1240
+ }
1241
+ ?>
1242
+ <?php
1243
+ /* Marcus Begin Edit */
1244
+ //This is an edit for WP 2.8 for styling fix
1245
+ ?>
1246
+ <div id="poststuff" class="metabox-holder has-right-sidebar">
1247
+ <!-- SIDEBAR -->
1248
+ <div id="side-info-column" class='inner-sidebar'>
1249
+ <div id='side-sortables'>
1250
+ <!-- recurrence postbox -->
1251
+ <div class="postbox ">
1252
+ <div class="handlediv" title="Fare clic per cambiare."><br />
1253
+ </div>
1254
+ <h3 class='hndle'><span>
1255
+ <?php
1256
+ _e ( "Recurrence", 'dbem' );
1257
+ ?>
1258
+ </span></h3>
1259
+ <div class="inside">
1260
+ <?php
1261
+ if (! $event ['event_id']) {
1262
+ ?>
1263
+ <?php
1264
+ if ($event ['recurrence_id'] != "")
1265
+ $recurrence_YES = "checked='checked'";
1266
+
1267
+ ?>
1268
+ <p>
1269
+ <input id="event-recurrence" type="checkbox"
1270
+ name="repeated_event" value="1" <?php
1271
+ echo $recurrence_YES;
1272
+ ?> />
1273
+ <?php
1274
+ _e ( 'Repeated event', 'dbem' );
1275
+ ?>
1276
+ </p>
1277
+ <div id="event_recurrence_pattern">
1278
+ <p>Frequency:
1279
+ <select id="recurrence-frequency" name="recurrence_freq">
1280
+ <?php
1281
+ dbem_option_items ( $freq_options, $event [$pref . 'freq'] );
1282
+ ?>
1283
+ </select>
1284
+ </p>
1285
+ <p>
1286
+ <?php
1287
+ _e ( 'Every', 'dbem' )?>
1288
+ <input id="recurrence-interval" name='recurrence_interval'
1289
+ size='2' value='<?php
1290
+ echo $event ['recurrence_interval'];
1291
+ ?>'>
1292
+ </input>
1293
+ <span class='interval-desc' id="interval-daily-singular">
1294
+ <?php _e ( 'day', 'dbem' )?>
1295
+ </span> <span class='interval-desc' id="interval-daily-plural">
1296
+ <?php _e ( 'days', 'dbem' ) ?>
1297
+ </span> <span class='interval-desc' id="interval-weekly-singular">
1298
+ <?php _e ( 'week', 'dbem' )?>
1299
+ </span> <span class='interval-desc' id="interval-weekly-plural">
1300
+ <?php _e ( 'weeks', 'dbem' )?>
1301
+ </span> <span class='interval-desc' id="interval-monthly-singular">
1302
+ <?php _e ( 'month', 'dbem' )?>
1303
+ </span> <span class='interval-desc' id="interval-monthly-plural">
1304
+ <?php _e ( 'months', 'dbem' )?>
1305
+ </span> </p>
1306
+ <p class="alternate-selector" id="weekly-selector">
1307
+ <?php dbem_checkbox_items ( 'recurrence_bydays[]', $days_names, $saved_bydays );
1308
+ ?>
1309
+ </p>
1310
+ <p class="alternate-selector" id="monthly-selector">
1311
+ <?php
1312
+ _e ( 'Every', 'dbem' )?>
1313
+ <select id="monthly-modifier" name="recurrence_byweekno">
1314
+ <?php
1315
+ dbem_option_items ( $weekno_options, $event ['recurrence_byweekno'] );
1316
+ ?>
1317
+ </select>
1318
+ <select id="recurrence-weekday"
1319
+ name="recurrence_byday">
1320
+ <?php
1321
+ dbem_option_items ( $days_names, $event ['recurrence_byday'] );
1322
+ ?>
1323
+ </select>
1324
+ &nbsp;</p>
1325
+ </div>
1326
+ <p id="recurrence-tip">
1327
+ <?php
1328
+ _e ( 'Check if your event happens more than once according to a regular pattern', 'dbem' )?>
1329
+ </p>
1330
+ <?php
1331
+ } else {
1332
+
1333
+ if (! $event ['recurrence_id']) {
1334
+ echo "<p>" . __ ( 'This is\'t a recurrent event', 'dbem' ) . ".</p>";
1335
+ } else {
1336
+
1337
+ $recurrence = dbem_get_recurrence ( $event ['recurrence_id'] );
1338
+ ?>
1339
+ <p>
1340
+ <?php
1341
+ echo $recurrence ['recurrence_description'];
1342
+ ?>
1343
+ <br />
1344
+ <a
1345
+ href="<?php
1346
+ bloginfo ( 'wpurl' )?>/wp-admin/edit.php?page=events-manager/events-manager.php&amp;action=edit_recurrence&amp;recurrence_id=<?php
1347
+ echo $recurrence ['recurrence_id'];
1348
+ ?>">
1349
+ <?php
1350
+ _e ( 'Reschedule', 'dbem' );
1351
+ ?>
1352
+ </a></p>
1353
+ <?php
1354
+ }
1355
+ ?>
1356
+ <?php
1357
+ }
1358
+ ?>
1359
+ </div>
1360
+ </div>
1361
+ <div class="postbox ">
1362
+ <div class="handlediv" title="Fare clic per cambiare."><br />
1363
+ </div>
1364
+ <h3 class='hndle'><span>
1365
+ <?php
1366
+ _e ( 'Contact Person', 'dbem' );
1367
+ ?>
1368
+ </span></h3>
1369
+ <div class="inside">
1370
+ <p><?php _e('Contact','dbem'); ?>
1371
+ <?php
1372
+ wp_dropdown_users ( array ('name' => 'event_contactperson_id', 'show_option_none' => __ ( "Select...", 'dbem' ), 'selected' => $event ['event_contactperson_id'] ) );
1373
+ ?>
1374
+ </p>
1375
+ </div>
1376
+ </div>
1377
+ <div class="postbox ">
1378
+ <div class="handlediv" title="Fare clic per cambiare."><br />
1379
+ </div>
1380
+ <h3 class='hndle'><span><?php _e('RSVP','dbem'); ?></span></h3>
1381
+ <div class="inside">
1382
+ <p>
1383
+ <input id="rsvp-checkbox" name='event_rsvp' value='1' type='checkbox'
1384
+ <?php
1385
+ echo $event_RSVP_checked?> />
1386
+ <?php
1387
+ _e ( 'Enable registration for this event', 'dbem' )?>
1388
+ </p>
1389
+ <div id='rsvp-data'>
1390
+ <?php
1391
+ if ($event ['event_contactperson_id'] != NULL)
1392
+ $selected = $event ['event_contactperson_id'];
1393
+ else
1394
+ $selected = '0';
1395
+ ?>
1396
+ <p>
1397
+ <?php
1398
+ _e ( 'Spaces','dbem' );
1399
+ ?>
1400
+ :
1401
+ <input id="seats-input" type="text"
1402
+ name="event_seats" size='5' value="<?php
1403
+ echo $event [$pref . 'seats']?>" />
1404
+ </p>
1405
+ <?php
1406
+ if ($event ['event_rsvp']) {
1407
+ ?>
1408
+ <?php
1409
+ dbem_bookings_compact_table ( $event [$pref . 'id'] );
1410
+ ?>
1411
+ <?php
1412
+ }
1413
+ ?>
1414
+ </div>
1415
+ </div>
1416
+ </div>
1417
+ <?php
1418
+ /* Marcus Begin Edit */
1419
+ //adding the category selection box
1420
+ ?>
1421
+ <div class="postbox ">
1422
+ <div class="handlediv" title="Fare clic per cambiare."><br />
1423
+ </div>
1424
+ <h3 class='hndle'><span>
1425
+ <?php _e ( 'Category', 'dbem' ); ?>
1426
+ </span></h3>
1427
+ <div class="inside">
1428
+ <p><?php _e ( 'Category:', 'dbem' ); ?>
1429
+ <select name="event_category_id">
1430
+ <?php
1431
+ $categories = dbem_get_categories();
1432
+ ?>
1433
+ <option value=""><?php _e ( 'Select...', 'dbem' ); ?> </option>
1434
+ <?php
1435
+ foreach ( $categories as $category ){
1436
+ $event_category = dbem_get_event_category($event['event_id']);
1437
+ $selected = ($category['category_id'] == $event_category['category_id']) ? "selected='selected'": '';
1438
+ ?>
1439
+ <option value="<?php echo $category['category_id'] ?>" <?php echo $selected ?>>
1440
+ <?php echo $category['category_name'] ?>
1441
+ </option>
1442
+ <?
1443
+ }
1444
+ ?>
1445
+ </select>
1446
+ </p>
1447
+ </div>
1448
+ </div>
1449
+ </div>
1450
+ <?php/* Marcus End Edit */ ?>
1451
+ </div>
1452
+ <!-- END OF SIDEBAR -->
1453
+ <div id="post-body">
1454
+ <div id="post-body-content">
1455
+ <?php/* Marcus End Edit */ ?>
1456
+ <div id="event_name" class="stuffbox">
1457
+ <h3>
1458
+ <?php
1459
+ _e ( 'Name', 'dbem' );
1460
+ ?>
1461
+ </h3>
1462
+ <div class="inside">
1463
+ <input type="text" name="event_name"
1464
+ value="<?php
1465
+ echo $event [$pref . 'name']?>" />
1466
+ <br />
1467
+ <?php
1468
+ _e ( 'The event name. Example: Birthday party', 'dbem' )?>
1469
+ </div>
1470
+ </div>
1471
+ <div id="event_start_date" class="stuffbox">
1472
+ <h3 id='event-date-title'>
1473
+ <?php
1474
+ _e ( 'Event date', 'dbem' );
1475
+ ?>
1476
+ </h3>
1477
+ <h3 id='recurrence-dates-title'>
1478
+ <?php
1479
+ _e ( 'Recurrence dates', 'dbem' );
1480
+ ?>
1481
+ </h3>
1482
+ <div class="inside">
1483
+ <input id="localised-date" type="text"
1484
+ name="localised_event_date" value="<?php
1485
+ echo $localised_date?>"
1486
+ style="display: none;" />
1487
+ <input id="date-to-submit" type="text"
1488
+ name="event_date" value="<?php
1489
+ echo $event [$pref . 'start_date']?>"
1490
+ style="background: #FCFFAA" />
1491
+ <input id="localised-end-date"
1492
+ type="text" name="localised_event_end_date"
1493
+ value="<?php
1494
+ echo $localised_end_date?>" style="display: none;" />
1495
+ <input
1496
+ id="end-date-to-submit" type="text" name="event_end_date"
1497
+ value="<?php
1498
+ echo $event [$pref . 'end_date']?>"
1499
+ style="background: #FCFFAA" />
1500
+ <br />
1501
+ <span id='event-date-explanation'>
1502
+ <?php
1503
+ _e ( 'The event date.', 'dbem' );
1504
+ /* Marcus Begin Edit */
1505
+ echo " ";
1506
+ _e ( 'When not reoccurring, this event spans between the beginning and end date.', 'dbem' );
1507
+ /* Marcus End Edit */
1508
+ ?>
1509
+ </span><span
1510
+ id='recurrence-dates-explanation'>
1511
+ <?php
1512
+ _e ( 'The recurrence beginning and end date.', 'dbem' );
1513
+ ?>
1514
+ </span> </div>
1515
+ </div>
1516
+ <div id="event_end_day" class="stuffbox">
1517
+ <h3>
1518
+ <?php
1519
+ _e ( 'Event time', 'dbem' );
1520
+ ?>
1521
+ </h3>
1522
+ <div class="inside">
1523
+ <input id="start-time" type="text" size="8"
1524
+ maxlength="8" name="event_start_time"
1525
+ value="<?php
1526
+ echo $event [$pref . 'start_' . $hours_locale . "h_time"];
1527
+ ?>" />
1528
+ -
1529
+ <input id="end-time" type="text" size="8" maxlength="8"
1530
+ name="event_end_time"
1531
+ value="<?php
1532
+ echo $event [$pref . 'end_' . $hours_locale . "h_time"];
1533
+ ?>" />
1534
+ <br />
1535
+ <?php
1536
+ _e ( 'The time of the event beginning and end', 'dbem' )?>
1537
+ . </div>
1538
+ </div>
1539
+ <div id="location_coordinates" class="stuffbox" style='display: none;'>
1540
+ <h3>
1541
+ <?php
1542
+ _e ( 'Coordinates', 'dbem' );
1543
+ ?>
1544
+ </h3>
1545
+ <div class="inside">
1546
+ <input id='location-latitude'
1547
+ name='location_latitude' type='text'
1548
+ value='<?php
1549
+ echo $event ['location_latitude'];
1550
+ ?>' size='15' />
1551
+ -
1552
+ <input
1553
+ id='location-longitude' name='location_longitude' type='text'
1554
+ value='<?php
1555
+ echo $event ['location_longitude'];
1556
+ ?>' size='15' />
1557
+ </div>
1558
+ </div>
1559
+ <div id="location_name" class="stuffbox">
1560
+ <h3>
1561
+ <?php
1562
+ _e ( 'Location', 'dbem' );
1563
+ ?>
1564
+ </h3>
1565
+ <div class="inside">
1566
+ <table id="dbem-location-data">
1567
+ <tr>
1568
+ <th><?php
1569
+ _e ( 'Name:' )?>
1570
+ &nbsp;</th>
1571
+ <td><input id="location-name" type="text" name="location_name"
1572
+ value="<?php
1573
+ echo $event ['location_name']?>" /></td>
1574
+ <?php
1575
+ $gmap_is_active = get_option ( 'dbem_gmap_is_active' );
1576
+ ?>
1577
+ <?php
1578
+ if ($gmap_is_active) {
1579
+ ?>
1580
+ <td rowspan='6'><div id='map-not-found'
1581
+ style='width: 400px; font-size: 140%; text-align: center; margin-top: 100px; display: hide'>
1582
+ <p>
1583
+ <?php
1584
+ _e ( 'Map not found' );
1585
+ ?>
1586
+ </p>
1587
+ </div>
1588
+ <div id='event-map'
1589
+ style='width: 400px; height: 300px; background: green; display: hide; margin-right: 8px'></div></td>
1590
+ <?php
1591
+ }
1592
+ ; // end of IF_GMAP_ACTIVE ?>
1593
+ </tr>
1594
+ <tr>
1595
+ <td colspan='2'><p>
1596
+ <?php
1597
+ _e ( 'The name of the location where the event takes place. You can use the name of a venue, a square, etc', 'dbem' )?>
1598
+ </p></td>
1599
+ </tr>
1600
+ <tr>
1601
+ <th><?php
1602
+ _e ( 'Address:' )?>
1603
+ &nbsp;</th>
1604
+ <td><input id="location-address" type="text" name="location_address"
1605
+ value="<?php
1606
+ echo $event ['location_address'];
1607
+ ?>" /></td>
1608
+ </tr>
1609
+ <tr>
1610
+ <td colspan='2'><p>
1611
+ <?php
1612
+ _e ( 'The address of the location where the event takes place. Example: 21, Dominick Street', 'dbem' )?>
1613
+ </p></td>
1614
+ </tr>
1615
+ <tr>
1616
+ <th><?php
1617
+ _e ( 'Town:' )?>
1618
+ &nbsp;</th>
1619
+ <td><input id="location-town" type="text" name="location_town"
1620
+ value="<?php
1621
+ echo $event ['location_town']?>" /></td>
1622
+ </tr>
1623
+ <tr>
1624
+ <td colspan='2'><p>
1625
+ <?php
1626
+ _e ( 'The town where the location is located. If you\'re using the Google Map integration and want to avoid geotagging ambiguities include the country in the town field. Example: Verona, Italy.', 'dbem' )?>
1627
+ </p></td>
1628
+ </tr>
1629
+ </table>
1630
+ </div>
1631
+ </div>
1632
+ <div id="event_notes" class="postbox">
1633
+ <h3>
1634
+ <?php
1635
+ _e ( 'Details', 'dbem' );
1636
+ ?>
1637
+ </h3>
1638
+ <div class="inside">
1639
+ <?php/* Marcus Begin Edit */ ?>
1640
+ <div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>" class="postarea">
1641
+ <?php the_editor($event [$pref . 'notes']); ?>
1642
+ </div>
1643
+ <?php/* Marcus End Edit */ ?>
1644
+ <br />
1645
+ <?php
1646
+ _e ( 'Details about the event', 'dbem' )?>
1647
+ </div>
1648
+ </div>
1649
+ <?php/* Marcus Begin Edit */ ?>
1650
+ <div id="event_attributes" class="postbox">
1651
+ <h3>
1652
+ <?php
1653
+ _e ( 'Attributes', 'dbem' );
1654
+ ?>
1655
+ </h3>
1656
+ <div class="inside">
1657
+ <?php dbem_attributes_form($event) ?>
1658
+ </div>
1659
+ </div>
1660
+ <?php/* Marcus End Edit */ ?>
1661
+ </div>
1662
+ <p class="submit">
1663
+ <input type="submit" name="events_update"
1664
+ value="<?php
1665
+ _e ( 'Submit Event', 'dbem' );
1666
+ ?> &raquo;" />
1667
+ </p>
1668
+ </div>
1669
+ </div>
1670
+ </div>
1671
+ </form>
1672
+ <?php
1673
+ }
1674
+
1675
+ function dbem_validate_event($event) {
1676
+ // Only for emergencies, when JS is disabled
1677
+ // TODO make it fully functional without JS
1678
+ global $required_fields;
1679
+ $errors = Array ();
1680
+ foreach ( $required_fields as $field ) {
1681
+ if ($event [$field] == "") {
1682
+ $errors [] = $field;
1683
+ }
1684
+ }
1685
+ $error_message = "";
1686
+ if (count ( $errors ) > 0)
1687
+ $error_message = __ ( 'Missing fields: ' ) . implode ( ", ", $errors ) . ". ";
1688
+ if ($_POST ['repeated_event'] == "1" && $_POST ['event_end_date'] == "")
1689
+ $error_message .= __ ( 'Since the event is repeated, you must specify an event date.', 'dbem' );
1690
+ if ($error_message != "")
1691
+ return $error_message;
1692
+ else
1693
+ return "OK";
1694
+
1695
+ }
1696
+
1697
+ function _dbem_is_date_valid($date) {
1698
+ $year = substr ( $date, 0, 4 );
1699
+ $month = substr ( $date, 5, 2 );
1700
+ $day = substr ( $date, 8, 2 );
1701
+ return (checkdate ( $month, $day, $year ));
1702
+ }
1703
+ function _dbem_is_time_valid($time) {
1704
+ $result = preg_match ( "/([01]\d|2[0-3])(:[0-5]\d)/", $time );
1705
+
1706
+ return ($result);
1707
+ }
1708
+ // Enqueing jQuery script to make sure it's loaded
1709
+ function dbem_enque_scripts() {
1710
+ wp_enqueue_script ( 'jquery' );
1711
+ // wp_enqueue_script('datepicker','/wp-content/plugins/events-manager/jquery-ui-datepicker/jquery-ui-personalized-1.6b.js', array('jquery') );
1712
+ }
1713
+ add_action ( 'template_redirect', 'dbem_enque_scripts' );
1714
+
1715
+ function url_exists($url) {
1716
+
1717
+ if ((strpos ( $url, "http" )) === false)
1718
+ $url = "http://" . $url;
1719
+ // FIXME ripristina la linea seguente e VEDI DI SISTEMARE!!!!
1720
+ // if (is_array(@get_headers($url))) {
1721
+ if (true)
1722
+ return true;
1723
+ else
1724
+ return false;
1725
+ }
1726
+
1727
+ // General script to make sure hidden fields are shown when containing data
1728
+ function dbem_admin_general_script() {
1729
+ ?>
1730
+ <script
1731
+ src="<?php
1732
+ bloginfo ( 'wpurl' );
1733
+ ?>/wp-content/plugins/events-manager/dbem.js"
1734
+ type="text/javascript"></script>
1735
+ <script
1736
+ src="<?php
1737
+ bloginfo ( 'wpurl' );
1738
+ ?>/wp-content/plugins/events-manager/js/jquery-ui-datepicker/ui.datepicker.js"
1739
+ type="text/javascript"></script>
1740
+ <script
1741
+ src="<?php
1742
+ bloginfo ( 'wpurl' );
1743
+ ?>/wp-content/plugins/events-manager/js/timeentry/jquery.timeentry.js"
1744
+ type="text/javascript"></script>
1745
+ <?php
1746
+
1747
+ // Check if the locale is there and loads it
1748
+ $locale_code = substr ( get_locale (), 0, 2 );
1749
+
1750
+ $show24Hours = 'true';
1751
+ // Setting 12 hours format for those countries using it
1752
+ if (preg_match ( "/en|sk|zh|us|uk/", $locale_code ))
1753
+ $show24Hours = 'false';
1754
+
1755
+ $locale_file = get_bloginfo ( 'wpurl' ) . "/wp-content/plugins/events-manager/js/jquery-ui-datepicker/i18n/ui.datepicker-$locale_code.js";
1756
+ if (url_exists ( $locale_file )) {
1757
+ ?>
1758
+ <script
1759
+ src="<?php
1760
+ bloginfo ( 'wpurl' );
1761
+ ?>/wp-content/plugins/events-manager/js/jquery-ui-datepicker/i18n/ui.datepicker-<?php
1762
+ echo $locale_code;
1763
+ ?>.js"
1764
+ type="text/javascript"></script>
1765
+ <?php
1766
+ }
1767
+ ?>
1768
+
1769
+
1770
+ <style type='text/css' media='all'>
1771
+ @import
1772
+ "<?php
1773
+ bloginfo ( 'wpurl' );
1774
+ ?>/wp-content/plugins/events-manager/js/jquery-ui-datepicker/ui.datepicker.css"
1775
+ ;
1776
+ </style>
1777
+ <script type="text/javascript">
1778
+ //<![CDATA[
1779
+ // TODO: make more general, to support also latitude and longitude (when added)
1780
+ $j=jQuery.noConflict();
1781
+
1782
+ function updateIntervalDescriptor () {
1783
+ $j(".interval-desc").hide();
1784
+ var number = "-plural";
1785
+ if ($j('input#recurrence-interval').val() == 1 || $j('input#recurrence-interval').val() == "")
1786
+ number = "-singular"
1787
+ var descriptor = "span#interval-"+$j("select#recurrence-frequency").val()+number;
1788
+ $j(descriptor).show();
1789
+ }
1790
+ function updateIntervalSelectors () {
1791
+ $j('p.alternate-selector').hide();
1792
+ $j('p#'+ $j('select#recurrence-frequency').val() + "-selector").show();
1793
+ //$j('p.recurrence-tip').hide();
1794
+ //$j('p#'+ $j(this).val() + "-tip").show();
1795
+ }
1796
+ function updateShowHideRecurrence () {
1797
+ if($j('input#event-recurrence').attr("checked")) {
1798
+ $j("#event_recurrence_pattern").fadeIn();
1799
+ /* Marcus Begin Edit */
1800
+ //Edited this and the one below so dates always can have an end date
1801
+ //$j("input#localised-end-date").fadeIn();
1802
+ /* Marcus End Edit */
1803
+ $j("#event-date-explanation").hide();
1804
+ $j("#recurrence-dates-explanation").show();
1805
+ $j("h3#recurrence-dates-title").show();
1806
+ $j("h3#event-date-title").hide();
1807
+ } else {
1808
+ $j("#event_recurrence_pattern").hide();
1809
+ /* Marcus Begin Edit */
1810
+ //$j("input#localised-end-date").hide();
1811
+ /* Marcus End Edit */
1812
+ $j("#recurrence-dates-explanation").hide();
1813
+ $j("#event-date-explanation").show();
1814
+ $j("h3#recurrence-dates-title").hide();
1815
+ $j("h3#event-date-title").show();
1816
+ }
1817
+ }
1818
+
1819
+ function updateShowHideRsvp () {
1820
+ if($j('input#rsvp-checkbox').attr("checked")) {
1821
+ $j("div#rsvp-data").fadeIn();
1822
+ } else {
1823
+ $j("div#rsvp-data").hide();
1824
+ }
1825
+ }
1826
+
1827
+ $j(document).ready( function() {
1828
+ locale_format = "ciao";
1829
+
1830
+ $j("#recurrence-dates-explanation").hide();
1831
+ $j("#localised-date").show();
1832
+ /* Marcus Begin Edit */
1833
+ $j("#localised-end-date").show();
1834
+ /* Marcus End Edit */
1835
+
1836
+ $j("#date-to-submit").hide();
1837
+ $j("#end-date-to-submit").hide();
1838
+ $j("#localised-date").datepicker($j.extend({},
1839
+ ($j.datepicker.regional["it"],
1840
+ {altField: "#date-to-submit",
1841
+ altFormat: "yy-mm-dd"})));
1842
+ $j("#localised-end-date").datepicker($j.extend({},
1843
+ ($j.datepicker.regional["it"],
1844
+ {altField: "#end-date-to-submit",
1845
+ altFormat: "yy-mm-dd"})));
1846
+
1847
+
1848
+
1849
+
1850
+
1851
+
1852
+ $j("#start-time").timeEntry({spinnerImage: '', show24Hours: <?php
1853
+ echo $show24Hours;
1854
+ ?> });
1855
+ $j("#end-time").timeEntry({spinnerImage: '', show24Hours: <?php
1856
+ echo $show24Hours;
1857
+ ?>});
1858
+
1859
+
1860
+
1861
+
1862
+
1863
+ $j('input.select-all').change(function(){
1864
+ if($j(this).is(':checked'))
1865
+ $j('input.row-selector').attr('checked', true);
1866
+ else
1867
+ $j('input.row-selector').attr('checked', false);
1868
+ });
1869
+ // TODO: NOT WORKING FOR SOME REASON, val() gives me 2 instead of 'smtp'...
1870
+ // console.log($j('select[name:dbem_rsvp_mail_send_method]').val());
1871
+ // if ($j('select[name:dbem_rsvp_mail_send_method]').val() != "smtp") {
1872
+ // $j('tr#dbem_smtp_host_row').hide();
1873
+ // $j('tr#dbem_rsvp_mail_SMTPAuth_row').hide();
1874
+ // $j('tr#dbem_smtp_username_row').hide();
1875
+ // $j('tr#dbem_smtp_password_row').hide();
1876
+ // }
1877
+ //
1878
+ // $j('select[name:dbem_rsvp_mail_send_method]').change(function() {
1879
+ // console.log($j(this).val());
1880
+ // if($j(this).val() == "smtp") {
1881
+ // $j('tr#dbem_smtp_host_row').show();
1882
+ // $j('tr#dbem_rsvp_mail_SMTPAuth_row').show();
1883
+ // $j('tr#dbem_smtp_username_row').show();
1884
+ // $j('tr#dbem_smtp_password_row').show();
1885
+ // } else {
1886
+ // $j('tr#dbem_smtp_host_row').hide();
1887
+ // $j('tr#dbem_rsvp_mail_SMTPAuth_row').hide();
1888
+ // $j('tr#dbem_smtp_username_row').hide();
1889
+ // $j('tr#dbem_smtp_password_row').hide();
1890
+ // }
1891
+
1892
+ //});
1893
+ updateIntervalDescriptor();
1894
+ updateIntervalSelectors();
1895
+ updateShowHideRecurrence();
1896
+ updateShowHideRsvp();
1897
+ $j('input#event-recurrence').change(updateShowHideRecurrence);
1898
+ $j('input#rsvp-checkbox').change(updateShowHideRsvp);
1899
+ // recurrency elements
1900
+ $j('input#recurrence-interval').keyup(updateIntervalDescriptor);
1901
+ $j('select#recurrence-frequency').change(updateIntervalDescriptor);
1902
+ $j('select#recurrence-frequency').change(updateIntervalSelectors);
1903
+
1904
+ // hiding or showing notes according to their content
1905
+ jQuery('.postbox h3').prepend('<a class="togbox">+</a> ');
1906
+ // if(jQuery("textarea[@name=event_notes]").val()!="") {
1907
+ // jQuery("textarea[@name=event_notes]").parent().parent().removeClass('closed');
1908
+ // }
1909
+ jQuery('#event_notes h3').click( function() {
1910
+ jQuery(jQuery(this).parent().get(0)).toggleClass('closed');
1911
+ });
1912
+
1913
+ // users cannot submit the event form unless some fields are filled
1914
+ function validateEventForm(){
1915
+ errors = "";
1916
+ var recurring = $j("input[@name=repeated_event]:checked").val();
1917
+ requiredFields= new Array('event_name', 'localised_event_date', 'location_name','location_address','location_town');
1918
+ var localisedRequiredFields = {'event_name':"<?php
1919
+ _e ( 'Name', 'dbem' )?>", 'localised_event_date':"<?php
1920
+ _e ( 'Date', 'dbem' )?>", 'location_name':"<?php
1921
+ _e ( 'Location', 'dbem' )?>",'location_address':"<?php
1922
+ _e ( 'Address', 'dbem' )?>",'location_town':"<?php
1923
+ _e ( 'Town', 'dbem' )?>"};
1924
+
1925
+ missingFields = new Array;
1926
+ for (var i in requiredFields) {
1927
+ if ($j("input[@name=" + requiredFields[i]+ "]").val() == 0) {
1928
+ missingFields.push(localisedRequiredFields[requiredFields[i]]);
1929
+ $j("input[@name=" + requiredFields[i]+ "]").css('border','2px solid red');
1930
+ } else {
1931
+ $j("input[@name=" + requiredFields[i]+ "]").css('border','1px solid #DFDFDF');
1932
+
1933
+ }
1934
+
1935
+ }
1936
+
1937
+ // alert('ciao ' + recurring+ " end: " + $j("input[@name=localised_event_end_date]").val());
1938
+ if (missingFields.length > 0) {
1939
+
1940
+ errors = "<?php
1941
+ echo _e ( 'Some required fields are missing:', 'dbem' )?> " + missingFields.join(", ") + ".\n";
1942
+ }
1943
+ if(recurring && $j("input[@name=localised_event_end_date]").val() == "") {
1944
+ errors = errors + "<?php
1945
+ _e ( 'Since the event is repeated, you must specify an end date', 'dbem' )?>.";
1946
+ $j("input[@name=localised_event_end_date]").css('border','2px solid red');
1947
+ } else {
1948
+ $j("input[@name=localised_event_end_date]").css('border','1px solid #DFDFDF');
1949
+ }
1950
+ if(errors != "") {
1951
+ alert(errors);
1952
+ return false;
1953
+ }
1954
+ return true;
1955
+ }
1956
+
1957
+ $j('#eventForm').bind("submit", validateEventForm);
1958
+
1959
+
1960
+ });
1961
+ //]]>
1962
+ </script>
1963
+
1964
+ <?php
1965
+ }
1966
+
1967
+ function dbem_admin_map_script() {
1968
+ if ((isset ( $_REQUEST ['event_id'] ) && $_REQUEST ['event_id'] != '') || (isset ( $_REQUEST ['page'] ) && $_REQUEST ['page'] == 'locations') || (isset ( $_REQUEST ['page'] ) && $_REQUEST ['page'] == 'new_event') || (isset ( $_REQUEST ['action'] ) && $_REQUEST ['action'] == 'edit_recurrence')) {
1969
+ if (! (isset ( $_REQUEST ['action'] ) && $_REQUEST ['action'] == 'dbem_delete')) {
1970
+ // single event page
1971
+
1972
+
1973
+ $event_ID = $_REQUEST ['event_id'];
1974
+ $event = dbem_get_event ( $event_ID );
1975
+
1976
+ if ($event ['location_town'] != '' || (isset ( $_REQUEST ['page'] ) && $_REQUEST ['page'] = 'locations')) {
1977
+ $gmap_key = get_option ( 'dbem_gmap_key' );
1978
+ if ($event ['location_address'] != "") {
1979
+ $search_key = $event ['location_address'] . ", " . $event ['location_town'];
1980
+ } else {
1981
+ $search_key = $event ['location_name'] . ", " . $event ['location_town'];
1982
+ }
1983
+
1984
+ ?>
1985
+ <style type="text/css">
1986
+ /* div#location_town, div#location_address, div#location_name {
1987
+ width: 480px;
1988
+ }
1989
+ table.form-table {
1990
+ width: 50%;
1991
+ } */
1992
+ </style>
1993
+ <script
1994
+ src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=<?php
1995
+ echo $gmap_key;
1996
+ ?>"
1997
+ type="text/javascript"></script>
1998
+ <script type="text/javascript">
1999
+ //<![CDATA[
2000
+ $j=jQuery.noConflict();
2001
+
2002
+ function loadMap(location, town, address) {
2003
+ if (GBrowserIsCompatible()) {
2004
+ var map = new GMap2(document.getElementById("event-map"));
2005
+ // map.addControl(new GScaleControl());
2006
+ //map.setCenter(new GLatLng(37.4419, -122.1419), 13);
2007
+ var geocoder = new GClientGeocoder();
2008
+ if (address !="") {
2009
+ searchKey = address + ", " + town;
2010
+ } else {
2011
+ searchKey = location + ", " + town;
2012
+ }
2013
+
2014
+ var search = "<?php
2015
+ echo $search_key?>" ;
2016
+ geocoder.getLatLng(
2017
+ searchKey,
2018
+ function(point) {
2019
+ if (!point) {
2020
+ $j("#event-map").hide();
2021
+ $j('#map-not-found').show();
2022
+ } else {
2023
+ mapCenter= new GLatLng(point.lat()+0.01, point.lng()+0.005);
2024
+ map.setCenter(mapCenter, 13);
2025
+ var marker = new GMarker(point);
2026
+ map.addOverlay(marker);
2027
+ marker.openInfoWindowHtml('<strong>' + location +'</strong><p>' + address + '</p><p>' + town + '</p>');
2028
+ $j('input#location-latitude').val(point.y);
2029
+ $j('input#location-longitude').val(point.x);
2030
+ $j("#event-map").show();
2031
+ $j('#map-not-found').hide();
2032
+ }
2033
+ }
2034
+ );
2035
+ // map.addControl(new GSmallMapControl());
2036
+ // map.addControl(new GMapTypeControl());
2037
+
2038
+ }
2039
+ }
2040
+
2041
+ $j(document).ready(function() {
2042
+ eventLocation = $j("input#location-name").val();
2043
+ eventTown = $j("input#location-town").val();
2044
+ eventAddress = $j("input#location-address").val();
2045
+
2046
+ loadMap(eventLocation, eventTown, eventAddress);
2047
+
2048
+ $j("input#location-name").blur(function(){
2049
+ newEventLocation = $j("input#location-name").val();
2050
+ if (newEventLocation !=eventLocation) {
2051
+ loadMap(newEventLocation, eventTown, eventAddress);
2052
+ eventLocation = newEventLocation;
2053
+
2054
+ }
2055
+ });
2056
+ $j("input#location-town").blur(function(){
2057
+ newEventTown = $j("input#location-town").val();
2058
+ if (newEventTown !=eventTown) {
2059
+ loadMap(eventLocation, newEventTown, eventAddress);
2060
+ eventTown = newEventTown;
2061
+ }
2062
+ });
2063
+ $j("input#location-address").blur(function(){
2064
+ newEventAddress = $j("input#location-address").val();
2065
+ if (newEventAddress != eventAddress) {
2066
+ loadMap(eventLocation, eventTown, newEventAddress);
2067
+ eventAddress = newEventAddress;
2068
+ }
2069
+ });
2070
+
2071
+
2072
+
2073
+ });
2074
+ $j(document).unload(function() {
2075
+ GUnload();
2076
+ });
2077
+ //]]>
2078
+ </script>
2079
+ <?php
2080
+ }
2081
+ }
2082
+ }
2083
+ }
2084
+ $gmap_is_active = get_option ( 'dbem_gmap_is_active' );
2085
+ if ($gmap_is_active) {
2086
+ add_action ( 'admin_head', 'dbem_admin_map_script' );
2087
+
2088
+ }
2089
+
2090
+ // Script to validate map options
2091
+ function dbem_admin_options_script() {
2092
+ if (isset ( $_REQUEST ['page'] ) && $_REQUEST ['page'] == 'events-manager-options') {
2093
+ ?>
2094
+ <script type="text/javascript">
2095
+ //<![CDATA[
2096
+ $j=jQuery.noConflict();
2097
+
2098
+ $j(document).ready(function() {
2099
+
2100
+ // users cannot enable Google Maps without an api key
2101
+ function verifyOptionsForm(){
2102
+ var gmap_is_active = $j("input[@name=dbem_gmap_is_active]:checked").val();
2103
+ var gmap_key = $j("input[@name=dbem_gmap_key]").val();
2104
+ if(gmap_is_active == '1' && (gmap_key == '')){
2105
+ alert("<?php
2106
+ _e ( 'You cannot enable Google Maps integration without setting an appropriate API key.' );
2107
+ ?>");
2108
+ $j("input[@name='dbem_gmap_is_active']:nth(1)").attr("checked","checked");
2109
+
2110
+ return false;
2111
+ } else {
2112
+ return true;
2113
+ }
2114
+ }
2115
+
2116
+ $j('#dbem_options_form').bind("submit", verifyOptionsForm);
2117
+
2118
+
2119
+ });
2120
+
2121
+
2122
+ //]]>
2123
+ </script>
2124
+
2125
+ <?php
2126
+
2127
+ }
2128
+
2129
+ }
2130
+ add_action ( 'admin_head', 'dbem_admin_options_script' );
2131
+
2132
+ function dbem_rss_link($justurl = 0, $echo = 1, $text = "RSS") {
2133
+ if (strpos ( $justurl, "=" )) {
2134
+ // allows the use of arguments without breaking the legacy code
2135
+ $defaults = array ('justurl' => 0, 'echo' => 1, 'text' => 'RSS' );
2136
+
2137
+ $r = wp_parse_args ( $justurl, $defaults );
2138
+ extract ( $r, EXTR_SKIP );
2139
+ $justurl = $r ['justurl'];
2140
+ $echo = $r ['echo'];
2141
+ $text = $r ['text'];
2142
+ }
2143
+ if ($text == '')
2144
+ $text = "RSS";
2145
+ $rss_title = get_option ( 'dbem_events_page_title' );
2146
+ $url = get_bloginfo ( 'wpurl' ) . "/?dbem_rss=main";
2147
+ $link = "<a href='$url'>$text</a>";
2148
+
2149
+ if ($justurl)
2150
+ $result = $url;
2151
+ else
2152
+ $result = $link;
2153
+ if ($echo)
2154
+ echo $result;
2155
+ else
2156
+ return $result;
2157
+ }
2158
+
2159
+ function dbem_rss_link_shortcode($atts) {
2160
+ extract ( shortcode_atts ( array ('justurl' => 0, 'text' => 'RSS' ), $atts ) );
2161
+ $result = dbem_rss_link ( "justurl=$justurl&echo=0&text=$text" );
2162
+ return $result;
2163
+ }
2164
+ add_shortcode ( 'events_rss_link', 'dbem_rss_link_shortcode' );
2165
+
2166
+ function dbem_rss() {
2167
+ if (isset ( $_REQUEST ['dbem_rss'] ) && $_REQUEST ['dbem_rss'] == 'main') {
2168
+ header ( "Content-type: text/xml" );
2169
+ echo "<?xml version='1.0'?>\n";
2170
+
2171
+ $events_page_id = get_option ( 'dbem_events_page' );
2172
+ $events_page_link = get_permalink ( $events_page_id );
2173
+ if (stristr ( $events_page_link, "?" ))
2174
+ $joiner = "&amp;";
2175
+ else
2176
+ $joiner = "?";
2177
+
2178
+ ?>
2179
+ <rss version="2.0">
2180
+ <channel>
2181
+ <title><?php
2182
+ echo get_option ( 'dbem_rss_main_title' );
2183
+ ?></title>
2184
+ <link><?php
2185
+ echo $events_page_link;
2186
+ ?></link>
2187
+ <description><?php
2188
+ echo get_option ( 'dbem_rss_main_description' );
2189
+ ?></description>
2190
+ <docs>
2191
+ http://blogs.law.harvard.edu/tech/rss
2192
+ </docs>
2193
+ <generator>
2194
+ Weblog Editor 2.0
2195
+ </generator>
2196
+ <?php
2197
+ $title_format = get_option ( 'dbem_rss_title_format' );
2198
+ $description_format = str_replace ( ">", "&gt;", str_replace ( "<", "&lt;", get_option ( 'dbem_rss_description_format' ) ) );
2199
+ $events = dbem_get_events ( 5 );
2200
+ foreach ( $events as $event ) {
2201
+ $title = dbem_replace_placeholders ( $title_format, $event, "rss" );
2202
+ $description = dbem_replace_placeholders ( $description_format, $event, "rss" );
2203
+ echo "<item>";
2204
+ echo "<title>$title</title>\n";
2205
+ echo "<link>$events_page_link" . $joiner . "event_id=" . $event ['event_id'] . "</link>\n ";
2206
+ echo "<description>$description </description>\n";
2207
+ echo "</item>";
2208
+ }
2209
+ ?>
2210
+
2211
+ </channel>
2212
+ </rss>
2213
+
2214
+ <?php
2215
+ die ();
2216
+ }
2217
+ }
2218
+ add_action ( 'init', 'dbem_rss' );
2219
+ function substitute_rss($data) {
2220
+ if (isset ( $_REQUEST ['event_id'] ))
2221
+ return get_bloginfo ( 'wpurl' ) . "/?dbem_rss=main";
2222
+ else
2223
+ return $data;
2224
+ }
2225
+ function dbem_general_css() {
2226
+ $base_url = get_bloginfo ( 'wpurl' );
2227
+ echo "<link rel='stylesheet' href='$base_url/wp-content/plugins/events-manager/events_manager.css' type='text/css'/>";
2228
+
2229
+ }
2230
+ add_action ( 'wp_head', 'dbem_general_css' );
2231
+ add_action ( 'admin_head', 'dbem_general_css' );
2232
+ //add_filter('feed_link','substitute_rss')
2233
+
2234
+
2235
+ // TODO roba da mettere nell'ordine giusto
2236
+ function dbem_delete_event($event_id) {
2237
+ global $wpdb;
2238
+ $table_name = $wpdb->prefix . EVENTS_TBNAME;
2239
+ $sql = "DELETE FROM $table_name WHERE event_id = '$event_id';";
2240
+ $wpdb->query ( $sql );
2241
+
2242
+ }
2243
+ add_filter ( 'favorite_actions', 'dbem_favorite_menu' );
2244
+
2245
+ function dbem_favorite_menu($actions) {
2246
+ // add quick link to our favorite plugin
2247
+ $actions ['admin.php?page=new_event'] = array (__ ( 'Add an event', 'dbem' ), MIN_CAPABILITY );
2248
+ return $actions;
2249
+ }
2250
+
2251
+ ////////////////////////////////////
2252
+ // WP 2.7 options registration
2253
+ function dbem_options_register() {
2254
+ $options = array ('dbem_events_page', 'dbem_display_calendar_in_events_page', 'dbem_use_event_end', 'dbem_event_list_item_format_header', 'dbem_event_list_item_format', 'dbem_event_list_item_format_footer', 'dbem_event_page_title_format', 'dbem_single_event_format', 'dbem_list_events_page', 'dbem_events_page_title', 'dbem_no_events_message', 'dbem_location_page_title_format', 'dbem_location_baloon_format', 'dbem_single_location_format', 'dbem_location_event_list_item_format', 'dbem_location_no_events_message', 'dbem_gmap_is_active', 'dbem_rss_main_title', 'dbem_rss_main_description', 'dbem_rss_title_format', 'dbem_rss_description_format', 'dbem_gmap_key', 'dbem_map_text_format', 'dbem_rsvp_mail_notify_is_active', 'dbem_contactperson_email_body', 'dbem_respondent_email_body', 'dbem_mail_sender_name', 'dbem_smtp_username', 'dbem_smtp_password', 'dbem_default_contact_person', 'dbem_mail_sender_address', 'dbem_mail_receiver_address', 'dbem_smtp_host', 'dbem_rsvp_mail_send_method', 'dbem_rsvp_mail_port', 'dbem_rsvp_mail_SMTPAuth', 'dbem_image_max_width', 'dbem_image_max_height', 'dbem_image_max_size','dbem_full_calendar_event_format');
2255
+ foreach ( $options as $opt ) {
2256
+ register_setting ( 'dbem-options', $opt, '' );
2257
+ }
2258
+
2259
+ }
2260
+ add_action ( 'admin_init', 'dbem_options_register' );
2261
+
2262
+ function dbem_alert_events_page() {
2263
+ $events_page_id = get_option ( 'dbem_events_page' );
2264
+ if (strpos ( $_SERVER ['SCRIPT_NAME'], 'page.php' ) && isset ( $_GET ['action'] ) && $_GET ['action'] == 'edit' && isset ( $_GET ['post'] ) && $_GET ['post'] == "$events_page_id") {
2265
+ $message = sprintf ( __ ( "This page corresponds to <strong>Events Manager</strong> events page. Its content will be overriden by <strong>Events Manager</strong>. If you want to display your content, you can can assign another page to <strong>Events Manager</strong> in the the <a href='%s'>Settings</a>. ", 'dbem' ), 'admin.php?page=events-manager-options' );
2266
+ $notice = "<div class='error'><p>$message</p></div>";
2267
+ echo $notice;
2268
+ }
2269
+
2270
+ }
2271
+ add_action ( 'admin_notices', 'dbem_alert_events_page' );
2272
+
2273
+ /* Marcus Begin Edit */
2274
+ //This adds the tinymce editor
2275
+ function dbem_tinymce(){
2276
+ add_action( 'admin_print_footer_scripts', 'wp_tiny_mce', 25 );
2277
+ wp_enqueue_script('post');
2278
+ if ( user_can_richedit() )
2279
+ wp_enqueue_script('editor');
2280
+ add_thickbox();
2281
+ wp_enqueue_script('media-upload');
2282
+ wp_enqueue_script('word-count');
2283
+ wp_enqueue_script('quicktags');
2284
+ }
2285
+ add_action ( 'admin_init', 'dbem_tinymce' );
2286
+ /* Marcus End Edit */
2287
+
2288
  ?>
dbem_locations.php CHANGED
@@ -36,7 +36,7 @@ function dbem_locations_page() {
36
  $location['location_town'] = $_POST['location_town'];
37
  $location['location_latitude'] = $_POST['location_latitude'];
38
  $location['location_longitude'] = $_POST['location_longitude'];
39
- $location['location_description'] = $_POST['location_description'];
40
 
41
  if(empty($location['location_latitude'])) {
42
  $location['location_latitude'] = 0;
@@ -65,7 +65,7 @@ function dbem_locations_page() {
65
  $location['location_town'] = $_POST['location_town'];
66
  $location['location_latitude'] = $_POST['location_latitude'];
67
  $location['location_longitude'] = $_POST['location_longitude'];
68
- $location['location_description'] = $_POST['location_description'];
69
  $validation_result = dbem_validate_location($location);
70
  if ($validation_result == "OK") {
71
  $new_location = dbem_insert_location($location);
@@ -103,232 +103,237 @@ function dbem_locations_page() {
103
  }
104
 
105
  function dbem_locations_edit_layout($location, $message = "") {
106
- $layout = "
107
  <div class='wrap'>
108
- <div id='icon-edit' class='icon32'>
109
- <br/>
110
- </div>
111
-
112
- <h2>".__('Edit location', 'dbem')."</h2>";
113
-
114
- if($message != "") {
115
- $layout .= "
116
- <div id='message' class='updated fade below-h2' style='background-color: rgb(255, 251, 204);'>
117
- <p>$message</p>
118
- </div>";
119
- }
120
- $layout .= "
121
- <div id='ajax-response'></div>
122
-
123
- <form enctype='multipart/form-data' name='editcat' id='editcat' method='post' action='admin.php?page=locations' class='validate'>
124
- <input type='hidden' name='action' value='editedlocation' />
125
- <input type='hidden' name='location_ID' value='".$location['location_id']."'/>";
126
-
127
- $layout .= "<table class='form-table'>
128
- <tr class='form-field form-required'>
129
- <th scope='row' valign='top'><label for='location_name'>".__('Location name', 'dbem')."</label></th>
130
- <td><input name='location_name' id='location-name' type='text' value='".$location['location_name']."' size='40' /><br />
131
- ".__('The name of the location', 'dbem')."</td>
132
- </tr>
133
-
134
- <tr class='form-field'>
135
- <th scope='row' valign='top'><label for='location_address'>".__('Location address', 'dbem')."</label></th>
136
- <td><input name='location_address' id='location-address' type='text' value='".$location['location_address']."' size='40' /><br />
137
- ".__('The address of the location', 'dbem').".</td>
138
-
139
- </tr>
140
 
141
- <tr class='form-field'>
142
- <th scope='row' valign='top'> <label for='location_town'>".__('Location town', 'dbem')."</label></th>
143
- <td><input name='location_town' id='location-town' type='text' value='".$location['location_town']."' size='40' /><br />
144
- ".__('The town where the location is located', 'dbem').".</td>
145
-
146
- </tr>
147
-
148
- <tr style='display:none;'>
149
- <td>Coordinates</td>
150
- <td><input id='location-latitude' name='location_latitude' id='location_latitude' type='text' value='".$location['location_latitude']."' size='15' />
151
- <input id='location-longitude' name='location_longitude' id='location_longitude' type='text' value='".$location['location_longitude']."' size='15' /></td>
152
- </tr>\n ";
153
- $gmap_is_active = get_option('dbem_gmap_is_active');
154
- if ($gmap_is_active) {
155
- $layout .= "
156
 
157
- <tr>
158
- <th scope='row' valign='top'><label for='location_map'>".__('Location map', 'dbem')."</label></th>
159
- <td>
160
- <div id='map-not-found' style='width: 450px; font-size: 140%; text-align: center; margin-top: 100px; display: hide'><p>".__('Map not found')."</p></div>
161
- <div id='event-map' style='width: 450px; height: 300px; background: green; display: hide; margin-right:8px'></div></td></tr>";
162
- }
163
- $layout .= "
164
- <tr class='form-field'>
165
- <th scope='row' valign='top'><label for='location_description'>".__('Location description', 'dbem')."</label></th>
166
- <td><textarea name='location_description' id='location_description' rows='5' cols='50' style='width: 97%;'>".$location['location_description']."</textarea><br />
167
- ".__('A description of the Location. You may include any kind of info here.', 'dbem')."</td>
168
-
169
- </tr>
170
- <tr class='form-field'>
171
- <th scope='row' valign='top'><label for='location_picture'>".__('Location image', 'dbem')."</label></th>
172
- <td>";
173
- if ($location['location_image_url'] != '')
174
- $layout .= "<img src='".$location['location_image_url']."' alt='".$location['location_name']."'/>";
175
- else
176
- $layout .= __('No image uploaded for this location yet', 'debm');
177
 
178
- $layout .= "</td>
179
-
180
- </tr>
181
- <tr>
182
- <th scope='row' valign='top'><label for='location_image'>".__('Upload/change picture', 'dbem')."</label></th>
183
- <td><input id='location-image' name='location_image' id='location_image' type='file' size='40' /></td>
184
- </tr>\n
185
- </table>
186
- <p class='submit'><input type='submit' class='button-primary' name='submit' value='".__('Update location', 'dbem')."' /></p>
187
- </form>
188
-
189
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
190
  </div>
191
-
192
- ";
193
- echo $layout;
194
  }
195
 
196
  function dbem_locations_table_layout($locations, $new_location, $message = "") {
197
- $destination = get_bloginfo('url')."/wp-admin/admin.php";
198
- $table = "
199
- <div class='wrap nosubsub'>\n
 
 
200
  <div id='icon-edit' class='icon32'>
201
  <br/>
202
  </div>
203
- <h2>".__('Locations', 'dbem')."</h2>\n ";
204
 
205
- if($message != "") {
206
- $table .= "
207
- <div id='message' class='updated fade below-h2' style='background-color: rgb(255, 251, 204);'>
208
- <p>$message</p>
209
- </div>";
210
- }
211
- $table .= "
212
- <div id='col-container'>\n
213
- <div id='col-right'>\n
214
- <div class='col-wrap'>\n
215
- <form id='bookings-filter' method='get' action='$destination'>\n
216
- <input type='hidden' name='page' value='locations'/>\n
217
- <input type='hidden' name='action' value='edit_location'/>\n
218
- <input type='hidden' name='event_id' value='$event_id'/>\n";
219
 
220
- if (count($locations)>0) {
221
- $table .= "<table class='widefat'>\n
222
- <thead>\n
223
- <tr>\n
224
- <th class='manage-column column-cb check-column' scope='col'><input type='checkbox' class='select-all' value='1'/></th>\n
225
- <th>".__('Name', 'dbem')."</th>\n
226
- <th>".__('Address', 'dbem')."</th>\n
227
- <th>".__('Town', 'dbem')."</th>\n
228
- </tr>\n
229
- </thead>\n
230
- <tfoot>\n
231
- <tr>\n
232
- <th class='manage-column column-cb check-column' scope='col'><input type='checkbox' class='select-all' value='1'/></th>\n
233
- <th>".__('Name', 'dbem')."</th>\n
234
- <th>".__('Address', 'dbem')."</th>\n
235
- <th>".__('Town', 'dbem')."</th>\n
236
- </tr>\n
237
- </tfoot>\n
238
- <tbody>\n";
239
- foreach ($locations as $this_location) {
240
- $table .= "
241
- <tr>\n
242
- <td><input type='checkbox' class ='row-selector' value='".$this_location['location_id']."' name='locations[]'/></td>\n
243
- <td><a href='".get_bloginfo('url')."/wp-admin/admin.php?page=locations&amp;action=edit&amp;location_ID=".$this_location['location_id']."'>".$this_location['location_name']."</a></td>\n
244
- <td>".$this_location['location_address']."</td>\n
245
- <td>".$this_location['location_town']."</td>\n
246
- </tr>\n";
247
- }
248
- $table .= "
249
- </tbody>\n
250
-
251
- </table>\n
252
-
253
- <div class='tablenav'>\n
254
- <div class='alignleft actions'>\n
255
  <input type='hidden' name='action2' value='delete'/>
256
- <input class='button-secondary action' type='submit' name='doaction2' value='Delete'/>\n
257
- <br class='clear'/>\n
258
- </div>\n
259
- <br class='clear'/>\n
260
- </div>\n";
261
- } else {
262
- $table .= "<p>".__('No venues have been inserted yet!', 'dbem');
263
- }
264
- $table .= "
265
- </form>\n
266
- </div>\n
267
- </div> <?-- end col-right -->\n
268
 
269
- <div id='col-left'>\n
270
- <div class='col-wrap'>\n
271
- <div class='form-wrap'>\n
272
  <div id='ajax-response'/>
273
- <h3>".__('Add location', 'dbem')."</h3>\n
274
- <form enctype='multipart/form-data' name='addlocation' id='addlocation' method='post' action='admin.php?page=locations' class='add:the-list: validate'>\n
275
 
276
- <input type='hidden' name='action' value='addlocation' />\n
277
- <div class='form-field form-required'>\n
278
- <label for='location_name'>".__('Location name', 'dbem')."</label>\n
279
- <input id='location-name' name='location_name' id='location_name' type='text' value='".$new_location['location_name']."' size='40' />\n
280
- <p>".__('The name of the location', 'dbem').".</p>\n
281
- </div>\n
282
 
283
- <div class='form-field'>\n
284
- <label for='location_address'>".__('Location address', 'dbem')."</label>\n
285
- <input id='location-address' name='location_address' id='location_address' type='text' value='".$new_location['location_address']."' size='40' />\n
286
- <p>".__('The address of the location', 'dbem').".</p>\n
287
- </div>\n
288
 
289
- <div class='form-field '>\n
290
- <label for='location_town'>".__('Location town', 'dbem')."</label>\n
291
- <input id='location-town' name='location_town' id='location_town' type='text' value='".$new_location['location_town']."' size='40' />\n
292
- <p>".__('The town of the location', 'dbem').".</p>\n
293
- </div>\n
294
 
295
- <div class='form-field' style='display:none;'>\n
296
- <label for='location_latitude'>LAT</label>\n
297
- <input id='location-latitude' name='location_latitude' type='text' value='".$new_location['location_latitude']."' size='40' />\n
298
- </div>\n
299
- <div class='form-field' style='display:none;'>\n
300
- <label for='location_longitude'>LONG</label>\n
301
- <input id='location-longitude' name='location_longitude' type='text' value='".$new_location['location_longitude']."' size='40' />\n
302
- </div>\n
303
 
304
- <div class='form-field'>\n
305
- <label for='location_image'>".__('Location image', 'dbem')."</label>\n
306
- <input id='location-image' name='location_image' id='location_image' type='file' size='35' />\n
307
- <p>".__('Select an image to upload', 'dbem').".</p>\n
308
- </div>\n";
309
- $gmap_is_active = get_option('dbem_gmap_is_active');
310
-
311
- if ($gmap_is_active) {
312
- $table .= "<div id='map-not-found' style='width: 450px; float: right; font-size: 140%; text-align: center; margin-top: 100px; display: hide'><p>".__('Map not found')."</p></div>";
313
- $table .= "<div id='event-map' style='width: 450px; height: 300px; background: green; float: right; display: hide; margin-right:8px'></div>";
314
- }
315
- $table .= "
316
- <div class='form-field'>\n
317
- <label for='location_description'>".__('Location description', 'dbem')."</label>\n
318
- <textarea name='location_description' id='location_description' rows='5' cols='40'>".$new_location['location_description']."</textarea>\n
319
- <p>".__('A description of the location. You may include any kind of info here.', 'dbem')."</p>\n
320
- </div>\n
321
-
322
- <p class='submit'><input type='submit' class='button' name='submit' value='".__('Add location', 'dbem')."' /></p>\n
323
- </form>\n
324
-
325
- </div>\n
326
- </div>\n
327
- </div> <?-- end col-left -->\n
328
- </div>\n
329
- </div>\n";
330
-
331
- echo $table;
 
 
 
 
332
  }
333
 
334
 
@@ -361,11 +366,10 @@ function dbem_get_location($location_id) {
361
 
362
  function dbem_image_url_for_location_id($location_id) {
363
  $file_name= ABSPATH.IMAGE_UPLOAD_DIR."/location-".$location_id;
364
- $mime_types = array('gif','jpg','png');
365
- foreach($mime_types as $type) {
366
  $file_path = "$file_name.$type";
367
  if (file_exists($file_path)) {
368
- $result = get_bloginfo('url')."/".IMAGE_UPLOAD_DIR."/location-$location_id.$type";
369
  return $result;
370
  }
371
  }
@@ -374,14 +378,13 @@ function dbem_image_url_for_location_id($location_id) {
374
 
375
  function dbem_get_identical_location($location) {
376
  global $wpdb;
377
-
378
  $locations_table = $wpdb->prefix.LOCATIONS_TBNAME;
379
  //$sql = "SELECT * FROM $locations_table WHERE location_name ='".$location['location_name']."' AND location_address ='".$location['location_address']."' AND location_town ='".$location['location_town']."';";
380
- $prepared_sql=$wpdb->prepare("SELECT * FROM $locations_table WHERE location_name = %s AND location_address = %s AND location_town = %s", $location['location_name'], $location['location_address'], $location['location_town'] );
381
  //$wpdb->show_errors(true);
382
  $cached_location = $wpdb->get_row($prepared_sql, ARRAY_A);
383
  return $cached_location;
384
-
385
  }
386
 
387
  function dbem_validate_location($location) {
@@ -506,7 +509,7 @@ function dbem_global_map($atts) {
506
  location_infos = '$location_infos'
507
  //-->
508
  </script>";
509
- $result .= "<script src='".get_bloginfo('url')."/wp-content/plugins/events-manager/dbem_global_map.js' type='text/javascript'></script>";
510
  $result .= "<ol id='dbem_locations_list'></ol>";
511
 
512
  } else {
@@ -597,7 +600,7 @@ function dbem_single_location_map($location) {
597
  map_text = '$map_text';
598
  //-->
599
  </script>";
600
- $map_div .= "<script src='".get_bloginfo('url')."/wp-content/plugins/events-manager/dbem_single_location_map.js' type='text/javascript'></script>";
601
  } else {
602
  $map_div = "";
603
  }
36
  $location['location_town'] = $_POST['location_town'];
37
  $location['location_latitude'] = $_POST['location_latitude'];
38
  $location['location_longitude'] = $_POST['location_longitude'];
39
+ $location['location_description'] = $_POST['content'];
40
 
41
  if(empty($location['location_latitude'])) {
42
  $location['location_latitude'] = 0;
65
  $location['location_town'] = $_POST['location_town'];
66
  $location['location_latitude'] = $_POST['location_latitude'];
67
  $location['location_longitude'] = $_POST['location_longitude'];
68
+ $location['location_description'] = $_POST['content'];
69
  $validation_result = dbem_validate_location($location);
70
  if ($validation_result == "OK") {
71
  $new_location = dbem_insert_location($location);
103
  }
104
 
105
  function dbem_locations_edit_layout($location, $message = "") {
106
+ ?>
107
  <div class='wrap'>
108
+ <div id="poststuff">
109
+ <div id='icon-edit' class='icon32'>
110
+ <br/>
111
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
 
113
+ <h2><?php echo __('Edit location', 'dbem') ?></h2>
114
+
115
+ <?php if($message != "") : ?>
116
+ <div id='message' class='updated fade below-h2' style='background-color: rgb(255, 251, 204);'>
117
+ <p><?php echo $message ?></p>
118
+ </div>
119
+ <?php endif; ?>
120
+ <div id='ajax-response'></div>
121
+
122
+ <form enctype='multipart/form-data' name='editcat' id='editcat' method='post' action='admin.php?page=locations' class='validate'>
123
+ <input type='hidden' name='action' value='editedlocation' />
124
+ <input type='hidden' name='location_ID' value='<?php echo $location['location_id'] ?>'/>
 
 
 
125
 
126
+ <table class='form-table'>
127
+ <tr class='form-field form-required'>
128
+ <th scope='row' valign='top'><label for='location_name'><?php echo __('Location name', 'dbem') ?></label></th>
129
+ <td><input name='location_name' id='location-name' type='text' value='<?php echo $location['location_name'] ?>' size='40' /><br />
130
+ <?php echo __('The name of the location', 'dbem') ?></td>
131
+ </tr>
132
+
133
+ <tr class='form-field'>
134
+ <th scope='row' valign='top'><label for='location_address'><?php echo __('Location address', 'dbem') ?></label></th>
135
+ <td><input name='location_address' id='location-address' type='text' value='<?php echo $location['location_address'] ?>' size='40' /><br />
136
+ <?php echo __('The address of the location', 'dbem') ?>.</td>
137
+
138
+ </tr>
 
 
 
 
 
 
 
139
 
140
+ <tr class='form-field'>
141
+ <th scope='row' valign='top'> <label for='location_town'><?php echo __('Location town', 'dbem') ?></label></th>
142
+ <td><input name='location_town' id='location-town' type='text' value='<?php echo $location['location_town'] ?>' size='40' /><br />
143
+ <?php echo __('The town where the location is located', 'dbem') ?>.</td>
144
+
145
+ </tr>
146
+
147
+ <tr style='display:none;'>
148
+ <td>Coordinates</td>
149
+ <td><input id='location-latitude' name='location_latitude' id='location_latitude' type='text' value='<?php echo $location['location_latitude'] ?>' size='15' />
150
+ <input id='location-longitude' name='location_longitude' id='location_longitude' type='text' value='<?php echo $location['location_longitude'] ?>' size='15' /></td>
151
+ </tr>
152
+
153
+ <?php
154
+ $gmap_is_active = get_option('dbem_gmap_is_active');
155
+ if ($gmap_is_active) {
156
+ ?>
157
+ <tr>
158
+ <th scope='row' valign='top'><label for='location_map'><?php echo __('Location map', 'dbem') ?></label></th>
159
+ <td>
160
+ <div id='map-not-found' style='width: 450px; font-size: 140%; text-align: center; margin-top: 100px; display: hide'><p><?php echo __('Map not found') ?></p></div>
161
+ <div id='event-map' style='width: 450px; height: 300px; background: green; display: hide; margin-right:8px'></div>
162
+ </td>
163
+ </tr>
164
+ <?php
165
+ }
166
+ ?>
167
+ <tr class='form-field'>
168
+ <th scope='row' valign='top'><label for='location_description'><?php _e('Location description', 'dbem') ?></label></th>
169
+ <td>
170
+ <div class="inside">
171
+ <div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>" class="postarea">
172
+ <?php the_editor($location['location_description']); ?>
173
+ </div>
174
+ <?php _e('A description of the Location. You may include any kind of info here.', 'dbem') ?>
175
+ </div>
176
+ </td>
177
+ </tr>
178
+ <tr class='form-field'>
179
+ <th scope='row' valign='top'><label for='location_picture'><?php echo __('Location image', 'dbem') ?></label></th>
180
+ <td>
181
+ <?php if ($location['location_image_url'] != '') : ?>
182
+ <img src='<?php echo $location['location_image_url'] ?>' alt='<?php echo $location['location_name'] ?>'/>
183
+ <?php else : ?>
184
+ <?php echo __('No image uploaded for this location yet', 'debm') ?>
185
+ <?php endif; ?>
186
+ </td>
187
+ </tr>
188
+ <tr>
189
+ <th scope='row' valign='top'><label for='location_image'><?php echo __('Upload/change picture', 'dbem') ?></label></th>
190
+ <td><input id='location-image' name='location_image' id='location_image' type='file' size='40' /></td>
191
+ </tr>
192
+ </table>
193
+ <p class='submit'><input type='submit' class='button-primary' name='submit' value='<?php echo __('Update location', 'dbem') ?>' /></p>
194
+ </form>
195
+ </div>
196
  </div>
197
+ <?php
 
 
198
  }
199
 
200
  function dbem_locations_table_layout($locations, $new_location, $message = "") {
201
+ $destination = get_bloginfo('wpurl')."/wp-admin/admin.php";
202
+ $new_location = (is_array($new_location)) ? $new_location : array();
203
+ ob_start();
204
+ ?>
205
+ <div class='wrap nosubsub'>
206
  <div id='icon-edit' class='icon32'>
207
  <br/>
208
  </div>
209
+ <h2><?php echo __('Locations', 'dbem') ?></h2>
210
 
211
+ <?php if($message != "") : ?>
212
+ <div id='message' class='updated fade below-h2' style='background-color: rgb(255, 251, 204);'>
213
+ <p><?php echo $message ?></p>
214
+ </div>
215
+ <?php endif; ?>
216
+ <div id='col-container'>
217
+ <div id='col-right'>
218
+ <div class='col-wrap'>
219
+ <form id='bookings-filter' method='get' action='<?php echo $destination ?>'>
220
+ <input type='hidden' name='page' value='locations'/>
221
+ <input type='hidden' name='action' value='edit_location'/>
222
+ <input type='hidden' name='event_id' value='<?php echo $event_id ?>'/>
 
 
223
 
224
+ <?php if (count($locations)>0) : ?>
225
+ <table class='widefat'>
226
+ <thead>
227
+ <tr>
228
+ <th class='manage-column column-cb check-column' scope='col'><input type='checkbox' class='select-all' value='1'/></th>
229
+ <th><?php echo __('Name', 'dbem') ?></th>
230
+ <th><?php echo __('Address', 'dbem') ?></th>
231
+ <th><?php echo __('Town', 'dbem') ?></th>
232
+ </tr>
233
+ </thead>
234
+ <tfoot>
235
+ <tr>
236
+ <th class='manage-column column-cb check-column' scope='col'><input type='checkbox' class='select-all' value='1'/></th>
237
+ <th><?php echo __('Name', 'dbem') ?></th>
238
+ <th><?php echo __('Address', 'dbem') ?></th>
239
+ <th><?php echo __('Town', 'dbem') ?></th>
240
+ </tr>
241
+ </tfoot>
242
+ <tbody>
243
+ <?php foreach ($locations as $this_location) : ?>
244
+ <tr>
245
+ <td><input type='checkbox' class ='row-selector' value='<?php echo $this_location['location_id'] ?>' name='locations[]'/></td>
246
+ <td><a href='<?php echo get_bloginfo('wpurl') ?>/wp-admin/admin.php?page=locations&amp;action=edit&amp;location_ID=<?php echo $this_location['location_id'] ?>'><?php echo $this_location['location_name'] ?></a></td>
247
+ <td><?php echo $this_location['location_address'] ?></td>
248
+ <td><?php echo $this_location['location_town'] ?></td>
249
+ </tr>
250
+ <?php endforeach; ?>
251
+ </tbody>
252
+
253
+ </table>
254
+
255
+ <div class='tablenav'>
256
+ <div class='alignleft actions'>
 
 
257
  <input type='hidden' name='action2' value='delete'/>
258
+ <input class='button-secondary action' type='submit' name='doaction2' value='Delete'/>
259
+ <br class='clear'/>
260
+ </div>
261
+ <br class='clear'/>
262
+ </div>
263
+ <?php else: ?>
264
+ <p><?php echo __('No venues have been inserted yet!', 'dbem') ?></p>
265
+ <?php endif; ?>
266
+ </form>
267
+ </div>
268
+ </div> <!-- end col-right -->
 
269
 
270
+ <div id='col-left'>
271
+ <div class='col-wrap'>
272
+ <div class='form-wrap'>
273
  <div id='ajax-response'/>
274
+ <h3><?php echo __('Add location', 'dbem') ?></h3>
275
+ <form enctype='multipart/form-data' name='addlocation' id='addlocation' method='post' action='admin.php?page=locations' class='add:the-list: validate'>
276
 
277
+ <input type='hidden' name='action' value='addlocation' />
278
+ <div class='form-field form-required'>
279
+ <label for='location_name'><?php echo __('Location name', 'dbem') ?></label>
280
+ <input id='location-name' name='location_name' id='location_name' type='text' value='<?php echo $new_location['location_name'] ?>' size='40' />
281
+ <p><?php echo __('The name of the location', 'dbem') ?>.</p>
282
+ </div>
283
 
284
+ <div class='form-field'>
285
+ <label for='location_address'><?php echo __('Location address', 'dbem') ?></label>
286
+ <input id='location-address' name='location_address' id='location_address' type='text' value='<?php echo $new_location['location_address'] ?>' size='40' />
287
+ <p><?php echo __('The address of the location', 'dbem') ?>.</p>
288
+ </div>
289
 
290
+ <div class='form-field '>
291
+ <label for='location_town'><?php echo __('Location town', 'dbem') ?></label>
292
+ <input id='location-town' name='location_town' id='location_town' type='text' value='<?php echo $new_location['location_town'] ?>' size='40' />
293
+ <p><?php echo __('The town of the location', 'dbem') ?>.</p>
294
+ </div>
295
 
296
+ <div class='form-field' style='display:none;'>
297
+ <label for='location_latitude'>LAT</label>
298
+ <input id='location-latitude' name='location_latitude' type='text' value='<?php echo $new_location['location_latitude'] ?>' size='40' />
299
+ </div>
300
+ <div class='form-field' style='display:none;'>
301
+ <label for='location_longitude'>LONG</label>
302
+ <input id='location-longitude' name='location_longitude' type='text' value='<?php echo $new_location['location_longitude'] ?>' size='40' />
303
+ </div>
304
 
305
+ <div class='form-field'>
306
+ <label for='location_image'><?php echo __('Location image', 'dbem') ?></label>
307
+ <input id='location-image' name='location_image' id='location_image' type='file' size='35' />
308
+ <p><?php echo __('Select an image to upload', 'dbem') ?>.</p>
309
+ </div>
310
+ <?php
311
+ $gmap_is_active = get_option('dbem_gmap_is_active');
312
+ if ($gmap_is_active) :
313
+ ?>
314
+ <div id='map-not-found' style='width: 450px; font-size: 140%; text-align: center; margin-top: 20px; display: hide'><p><?php echo __('Map not found') ?></p></div>
315
+ <div id='event-map' style='width: 450px; height: 300px; background: green; display: hide; margin-right:8px'></div>
316
+ <br style='clear:both;' />
317
+ <?php endif; ?>
318
+ <div id="poststuff">
319
+ <label for='location_description'><?php _e('Location description', 'dbem') ?></label>
320
+ <div class="inside">
321
+ <div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>" class="postarea">
322
+ <?php the_editor($new_location['location_description']); ?>
323
+ </div>
324
+ <?php _e('A description of the Location. You may include any kind of info here.', 'dbem') ?>
325
+ </div>
326
+ </div>
327
+ <p class='submit'><input type='submit' class='button' name='submit' value='<?php echo __('Add location', 'dbem') ?>' /></p>
328
+ </form>
329
+
330
+ </div>
331
+ </div>
332
+ </div> <!-- end col-left -->
333
+ </div>
334
+ </div>
335
+ <?php
336
+ echo ob_get_clean();
337
  }
338
 
339
 
366
 
367
  function dbem_image_url_for_location_id($location_id) {
368
  $file_name= ABSPATH.IMAGE_UPLOAD_DIR."/location-".$location_id;
369
+ $mime_types = array('gif','jpg','png');foreach($mime_types as $type) {
 
370
  $file_path = "$file_name.$type";
371
  if (file_exists($file_path)) {
372
+ $result = get_bloginfo('wpurl')."/".IMAGE_UPLOAD_DIR."/location-$location_id.$type";
373
  return $result;
374
  }
375
  }
378
 
379
  function dbem_get_identical_location($location) {
380
  global $wpdb;
 
381
  $locations_table = $wpdb->prefix.LOCATIONS_TBNAME;
382
  //$sql = "SELECT * FROM $locations_table WHERE location_name ='".$location['location_name']."' AND location_address ='".$location['location_address']."' AND location_town ='".$location['location_town']."';";
383
+ $prepared_sql=$wpdb->prepare("SELECT * FROM $locations_table WHERE location_name = %s AND location_address = %s AND location_town = %s", stripcslashes($location['location_name']), stripcslashes($location['location_address']), stripcslashes($location['location_town']) );
384
  //$wpdb->show_errors(true);
385
  $cached_location = $wpdb->get_row($prepared_sql, ARRAY_A);
386
  return $cached_location;
387
+
388
  }
389
 
390
  function dbem_validate_location($location) {
509
  location_infos = '$location_infos'
510
  //-->
511
  </script>";
512
+ $result .= "<script src='".get_bloginfo('wpurl')."/wp-content/plugins/events-manager/dbem_global_map.js' type='text/javascript'></script>";
513
  $result .= "<ol id='dbem_locations_list'></ol>";
514
 
515
  } else {
600
  map_text = '$map_text';
601
  //-->
602
  </script>";
603
+ $map_div .= "<script src='".get_bloginfo('wpurl')."/wp-content/plugins/events-manager/dbem_single_location_map.js' type='text/javascript'></script>";
604
  } else {
605
  $map_div = "";
606
  }
dbem_people.php CHANGED
@@ -68,7 +68,7 @@ function dbem_printable_booking_report($event_id) {
68
  $bookings = dbem_get_bookings_for($event_id);
69
  $available_seats = dbem_get_available_seats($event_id);
70
  $booked_seats = dbem_get_booked_seats($event_id);
71
- $stylesheet = get_bloginfo('url')."/wp-content/plugins/events-manager/events_manager.css";
72
  ?>
73
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
74
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -90,7 +90,8 @@ function dbem_printable_booking_report($event_id) {
90
  <th scope='col'><?php _e('Name', 'dbem')?></th>
91
  <th scope='col'><?php _e('E-mail', 'dbem')?></th>
92
  <th scope='col'><?php _e('Phone number', 'dbem')?></th>
93
- <th scope='col'><?php _e('Seats', 'dbem')?></th>
 
94
  <?php
95
  foreach($bookings as $booking) { ?>
96
  <tr>
@@ -98,16 +99,17 @@ function dbem_printable_booking_report($event_id) {
98
  <td><?php echo $booking['person_name']?></td>
99
  <td><?php echo $booking['person_email']?></td>
100
  <td><?php echo $booking['person_phone']?></td>
101
- <td class='seats-number'><?php echo $booking['booking_seats']?></td>
 
102
  </tr>
103
- <?php } ?>
104
  <tr id='booked-seats'>
105
- <td colspan='2'>&nbsp;</td>
106
  <td class='total-label'><?php _e('Booked', 'dbem')?>:</td>
107
  <td class='seats-number'><?php echo $booked_seats; ?></td>
108
  </tr>
109
  <tr id='available-seats'>
110
- <td colspan='2'>&nbsp;</td>
111
  <td class='total-label'><?php _e('Available', 'dbem')?>:</td>
112
  <td class='seats-number'><?php echo $available_seats; ?></td>
113
  </tr>
68
  $bookings = dbem_get_bookings_for($event_id);
69
  $available_seats = dbem_get_available_seats($event_id);
70
  $booked_seats = dbem_get_booked_seats($event_id);
71
+ $stylesheet = get_bloginfo('wpurl')."/wp-content/plugins/events-manager/events_manager.css";
72
  ?>
73
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
74
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
90
  <th scope='col'><?php _e('Name', 'dbem')?></th>
91
  <th scope='col'><?php _e('E-mail', 'dbem')?></th>
92
  <th scope='col'><?php _e('Phone number', 'dbem')?></th>
93
+ <th scope='col'><?php _e('Seats', 'dbem')?></th>
94
+ <th scope='col'><?php _e('Comment', 'dbem')?></th>
95
  <?php
96
  foreach($bookings as $booking) { ?>
97
  <tr>
99
  <td><?php echo $booking['person_name']?></td>
100
  <td><?php echo $booking['person_email']?></td>
101
  <td><?php echo $booking['person_phone']?></td>
102
+ <td class='seats-number'><?php echo $booking['booking_seats']?></td>
103
+ <td><?=$booking['booking_comment'] ?></td>
104
  </tr>
105
+ <?php } ?>
106
  <tr id='booked-seats'>
107
+ <td colspan='3'>&nbsp;</td>
108
  <td class='total-label'><?php _e('Booked', 'dbem')?>:</td>
109
  <td class='seats-number'><?php echo $booked_seats; ?></td>
110
  </tr>
111
  <tr id='available-seats'>
112
+ <td colspan='3'>&nbsp;</td>
113
  <td class='total-label'><?php _e('Available', 'dbem')?>:</td>
114
  <td class='seats-number'><?php echo $available_seats; ?></td>
115
  </tr>
dbem_rsvp.php CHANGED
@@ -16,19 +16,20 @@ function dbem_add_booking_form() {
16
  $module .= "<form id='dbem-rsvp-form' name='booking-form' method='post' action='$destination'>
17
  <table class='dbem-rsvp-form'>
18
  <tr><th scope='row'>".__('Name', 'dbem').":</th><td><input type='text' name='bookerName' value=''/></td></tr>
19
- <tr><th scope='row'>".__('E-Mail', 'dbem').":</th><td><input type='text' name='bookerEmail' value=''/></td></tr>
20
- <tr><th scope='row'>".__('Phone number', 'dbem').":</th><td><input type='text' name='bookerPhone' value=''/></td></tr>
21
  <tr><th scope='row'>".__('Seats', 'dbem').":</th><td><select name='bookedSeats' >";
22
  foreach($booked_places_options as $option) {
23
  $module .= $option."\n";
24
  }
25
- $module .= "</select></td></tr>
 
26
  </table>
27
- <input type='submit' value='".__('Send your booking', 'dbem')."'/>
28
- <input type='hidden' name='eventAction' value='add_booking'/>
29
  </form>";
30
  // $module .= "dati inviati: ";
31
- // $module .= $_POST['bookerName'];
32
  //print_r($_SERVER);
33
 
34
  //$module .= dbem_delete_booking_form();
@@ -77,8 +78,8 @@ function dbem_catch_rsvp() {
77
 
78
  if (isset($_POST['eventAction']) && $_POST['eventAction'] == 'delete_booking') {
79
 
80
- $bookerName = $_POST['bookerName'];
81
- $bookerEmail = $_POST['bookerEmail'];
82
  $booker = dbem_get_person_by_name_and_email($bookerName, $bookerEmail);
83
  if ($booker) {
84
  $booker_id = $booker['person_id'];
@@ -98,17 +99,18 @@ add_action('init','dbem_catch_rsvp');
98
 
99
 
100
  function dbem_book_seats() {
101
- $bookerName = $_POST['bookerName'];
102
- $bookerEmail = $_POST['bookerEmail'];
103
- $bookerPhone = $_POST['bookerPhone'];
104
- $bookedSeats = $_POST['bookedSeats'];
105
- $event_id = $_GET['event_id'];
 
106
  $booker = dbem_get_person_by_name_and_email($bookerName, $bookerEmail);
107
  if (!$booker) {
108
- $booker = dbem_add_person($bookerName, $bookerEmail, $bookerPhone);
109
  }
110
- if (dbem_are_seats_available_for($event_id, $bookedSeats)) {
111
- dbem_record_booking($event_id, $booker['person_id'], $bookedSeats);
112
 
113
  $result = __('Your booking has been recorded','dbem');
114
  $mailing_is_active = get_option('dbem_rsvp_mail_notify_is_active');
@@ -117,7 +119,7 @@ function dbem_book_seats() {
117
  }
118
 
119
  } else {
120
- $result = __('Sorry, there aren\'t so many seats available!', 'dbem');
121
  }
122
  return $result;
123
  }
@@ -132,7 +134,7 @@ function dbem_get_booking_by_person_id($person_id) {
132
  return $result;
133
  }
134
 
135
- function dbem_record_booking($event_id, $person_id, $seats) {
136
  global $wpdb;
137
  $bookings_table = $wpdb->prefix.BOOKINGS_TBNAME;
138
  // checking whether the booker has already booked places
@@ -149,9 +151,8 @@ function dbem_record_booking($event_id, $person_id, $seats) {
149
 
150
  } else {
151
  if(true) {
152
- $sql = "INSERT INTO $bookings_table (event_id, person_id, booking_seats) VALUES ($event_id, $person_id, $seats)";
153
  $wpdb->query($sql);
154
- // echo $sql;
155
  }
156
  }
157
  }
@@ -191,7 +192,7 @@ function dbem_are_seats_available_for($event_id, $seats) {
191
  function dbem_bookings_table($event_id) {
192
 
193
  $bookings = dbem_get_bookings_for($event_id);
194
- $destination = get_bloginfo('url')."/wp-admin/edit.php";
195
  $table = "<form id='bookings-filter' method='get' action='$destination'>
196
  <input type='hidden' name='page' value='events-manager/events-manager.php'/>
197
  <input type='hidden' name='action' value='edit_event'/>
@@ -229,10 +230,10 @@ function dbem_bookings_table($event_id) {
229
 
230
  function dbem_bookings_compact_table($event_id) {
231
  $bookings = dbem_get_bookings_for($event_id);
232
- $destination = get_bloginfo('url')."/wp-admin/edit.php";
233
  $available_seats = dbem_get_available_seats($event_id);
234
  $booked_seats = dbem_get_booked_seats($event_id);
235
- $printable_address = get_bloginfo('url')."/wp-admin/admin.php?page=people&action=printable&event_id=$event_id";
236
  if (count($bookings)>0) {
237
  $table =
238
  "<div class='wrap'>
@@ -253,11 +254,12 @@ function dbem_bookings_compact_table($event_id) {
253
  </tr>
254
  </tfoot>
255
  <tbody>" ;
256
- foreach ($bookings as $booking) {
 
257
  $table .=
258
  "<tr id='booking-".$booking['booking_id']."'>
259
  <td><a id='booking-check-".$booking['booking_id']."' class='bookingdelbutton'>X</a></td>
260
- <td><a title='".$booking['person_email']." - ".$booking['person_phone']."'>".$booking['person_name']."</a></td>
261
  <td>".$booking['booking_seats']."</td>
262
  </tr>";
263
  }
@@ -319,11 +321,12 @@ add_action('init', 'dbem_intercept_bookings_delete');
319
 
320
  function dbem_email_rsvp_booking(){
321
  $booker = array();
322
- $bookerName = $_POST['bookerName'];
323
- $bookerEmail = $_POST['bookerEmail'];
324
- $bookerPhone = $_POST['bookerPhone'];
325
- $bookedSeats = $_POST['bookedSeats'];
326
- $event_id = $_GET['event_id'];
 
327
 
328
 
329
  $event = dbem_get_event($event_id);
@@ -332,7 +335,7 @@ function dbem_email_rsvp_booking(){
332
 
333
  if($event['event_contactperson_id'] != "")
334
  $contact_id = $event['event_contactperson_id'];
335
- else
336
  $contact_id = get_option('dbem_default_contact_person');
337
 
338
  $contact_name = dbem_get_user_name($contact_id);
@@ -341,16 +344,15 @@ function dbem_email_rsvp_booking(){
341
  $booker_body = dbem_replace_placeholders(get_option('dbem_respondent_email_body'), $event);
342
 
343
  // email specific placeholders
344
- $placeholders = array('#_CONTACTPERSON'=> $contact_name, '#_RESPNAME' => $bookerName, '#_RESPEMAIL' => $bookerEmail, '#_SPACES' => $bookedSeats, '#_RESERVEDSPACES' => $reserved_seats, '#_AVAILABLESPACES' => $available_seats);
345
 
346
- foreach($placeholders as $key => $value) {
347
  $contact_body= str_replace($key, $value, $contact_body);
348
  $booker_body= str_replace($key, $value, $booker_body);
349
  }
350
-
351
  $contact_email = dbem_get_user_email($contact_id);
352
  dbem_send_mail(__("New booking",'dbem'), $contact_body, $contact_email);
353
- dbem_send_mail(__('Reservation confirmed','dbem'),$booker_body, $bookerEmail);
354
 
355
  }
356
 
@@ -377,7 +379,7 @@ function dbem_ascii_encode($e)
377
 
378
  function dbem_is_event_rsvpable() {
379
  if (dbem_is_single_event_page()) {
380
- $event = dbem_get_event($_GET['event_id']);
381
  if($event)
382
  return $event['event_rsvp'];
383
  }
16
  $module .= "<form id='dbem-rsvp-form' name='booking-form' method='post' action='$destination'>
17
  <table class='dbem-rsvp-form'>
18
  <tr><th scope='row'>".__('Name', 'dbem').":</th><td><input type='text' name='bookerName' value=''/></td></tr>
19
+ <tr><th scope='row'>".__('E-Mail', 'dbem').":</th><td><input type='text' name='bookerEmail' value=''/></td></tr>
20
+ <tr><th scope='row'>".__('Phone number', 'dbem').":</th><td><input type='text' name='bookerPhone' value=''/></td></tr>
21
  <tr><th scope='row'>".__('Seats', 'dbem').":</th><td><select name='bookedSeats' >";
22
  foreach($booked_places_options as $option) {
23
  $module .= $option."\n";
24
  }
25
+ $module .= "</select></td></tr>
26
+ <tr><th scope='row'>".__('Comment', 'dbem').":</th><td><textarea name='bookerComment'></textarea></td></tr>
27
  </table>
28
+ <p><input type='submit' value='".__('Send your booking', 'dbem')."'/>
29
+ <input type='hidden' name='eventAction' value='add_booking'/></p>
30
  </form>";
31
  // $module .= "dati inviati: ";
32
+ // $module .= dbem_sanitize_request($_POST['bookerName']);
33
  //print_r($_SERVER);
34
 
35
  //$module .= dbem_delete_booking_form();
78
 
79
  if (isset($_POST['eventAction']) && $_POST['eventAction'] == 'delete_booking') {
80
 
81
+ $bookerName = dbem_sanitize_request($_POST['bookerName']);
82
+ $bookerEmail = dbem_sanitize_request($_POST['bookerEmail']);
83
  $booker = dbem_get_person_by_name_and_email($bookerName, $bookerEmail);
84
  if ($booker) {
85
  $booker_id = $booker['person_id'];
99
 
100
 
101
  function dbem_book_seats() {
102
+ $bookerName = dbem_sanitize_request($_POST['bookerName']);
103
+ $bookerEmail = dbem_sanitize_request($_POST['bookerEmail']);
104
+ $bookerPhone = dbem_sanitize_request($_POST['bookerPhone']);
105
+ $bookedSeats = dbem_sanitize_request($_POST['bookedSeats']);
106
+ $bookerComment = dbem_sanitize_request($_POST['bookerComment']);
107
+ $event_id = dbem_sanitize_request($_GET['event_id']);
108
  $booker = dbem_get_person_by_name_and_email($bookerName, $bookerEmail);
109
  if (!$booker) {
110
+ $booker = dbem_add_person($bookerName, $bookerEmail, $bookerPhone);
111
  }
112
+ if (dbem_are_seats_available_for($event_id, $bookedSeats)) {
113
+ dbem_record_booking($event_id, $booker['person_id'], $bookedSeats,$bookerComment);
114
 
115
  $result = __('Your booking has been recorded','dbem');
116
  $mailing_is_active = get_option('dbem_rsvp_mail_notify_is_active');
119
  }
120
 
121
  } else {
122
+ $result = __('Booking cannot be made not enough seats available!', 'dbem');
123
  }
124
  return $result;
125
  }
134
  return $result;
135
  }
136
 
137
+ function dbem_record_booking($event_id, $person_id, $seats, $comment = "") {
138
  global $wpdb;
139
  $bookings_table = $wpdb->prefix.BOOKINGS_TBNAME;
140
  // checking whether the booker has already booked places
151
 
152
  } else {
153
  if(true) {
154
+ $sql = "INSERT INTO $bookings_table (event_id, person_id, booking_seats,booking_comment) VALUES ($event_id, $person_id, $seats,'$comment')";
155
  $wpdb->query($sql);
 
156
  }
157
  }
158
  }
192
  function dbem_bookings_table($event_id) {
193
 
194
  $bookings = dbem_get_bookings_for($event_id);
195
+ $destination = get_bloginfo('wpurl')."/wp-admin/edit.php";
196
  $table = "<form id='bookings-filter' method='get' action='$destination'>
197
  <input type='hidden' name='page' value='events-manager/events-manager.php'/>
198
  <input type='hidden' name='action' value='edit_event'/>
230
 
231
  function dbem_bookings_compact_table($event_id) {
232
  $bookings = dbem_get_bookings_for($event_id);
233
+ $destination = get_bloginfo('wpurl')."/wp-admin/edit.php";
234
  $available_seats = dbem_get_available_seats($event_id);
235
  $booked_seats = dbem_get_booked_seats($event_id);
236
+ $printable_address = get_bloginfo('wpurl')."/wp-admin/admin.php?page=people&action=printable&event_id=$event_id";
237
  if (count($bookings)>0) {
238
  $table =
239
  "<div class='wrap'>
254
  </tr>
255
  </tfoot>
256
  <tbody>" ;
257
+ foreach ($bookings as $booking) {
258
+ ($booking['booking_comment']) ? $baloon = " <img src='../wp-content/plugins/events-manager/images/baloon.png' title='".__('Comment:','dbem')." ".$booking['booking_comment']."' alt='comment'/>" : $baloon = "";
259
  $table .=
260
  "<tr id='booking-".$booking['booking_id']."'>
261
  <td><a id='booking-check-".$booking['booking_id']."' class='bookingdelbutton'>X</a></td>
262
+ <td><a title='".$booking['person_email']." - ".$booking['person_phone']."'>".$booking['person_name']."</a>$baloon</td>
263
  <td>".$booking['booking_seats']."</td>
264
  </tr>";
265
  }
321
 
322
  function dbem_email_rsvp_booking(){
323
  $booker = array();
324
+ $bookerName = dbem_sanitize_request($_POST['bookerName']);
325
+ $bookerEmail = dbem_sanitize_request($_POST['bookerEmail']);
326
+ $bookerPhone = dbem_sanitize_request($_POST['bookerPhone']);
327
+ $bookedSeats = dbem_sanitize_request($_POST['bookedSeats']);
328
+ $bookerComment = dbem_sanitize_request($_POST['bookerComment']);
329
+ $event_id = dbem_sanitize_request($_GET['event_id']);
330
 
331
 
332
  $event = dbem_get_event($event_id);
335
 
336
  if($event['event_contactperson_id'] != "")
337
  $contact_id = $event['event_contactperson_id'];
338
+ else
339
  $contact_id = get_option('dbem_default_contact_person');
340
 
341
  $contact_name = dbem_get_user_name($contact_id);
344
  $booker_body = dbem_replace_placeholders(get_option('dbem_respondent_email_body'), $event);
345
 
346
  // email specific placeholders
347
+ $placeholders = array('#_CONTACTPERSON'=> $contact_name, '#_RESPNAME' => $bookerName, '#_RESPEMAIL' => $bookerEmail, '#_RESPPHONE' => $bookerPhone, '#_SPACES' => $bookedSeats,'#_COMMENT' => $bookerComment, '#_RESERVEDSPACES' => $reserved_seats, '#_AVAILABLESPACES' => $available_seats);
348
 
349
+ foreach($placeholders as $key => $value) {
350
  $contact_body= str_replace($key, $value, $contact_body);
351
  $booker_body= str_replace($key, $value, $booker_body);
352
  }
 
353
  $contact_email = dbem_get_user_email($contact_id);
354
  dbem_send_mail(__("New booking",'dbem'), $contact_body, $contact_email);
355
+ dbem_send_mail(__('Reservation confirmed','dbem'),$booker_body, $bookerEmail);
356
 
357
  }
358
 
379
 
380
  function dbem_is_event_rsvpable() {
381
  if (dbem_is_single_event_page()) {
382
+ $event = dbem_get_event(dbem_sanitize_request($_GET['event_id']));
383
  if($event)
384
  return $event['event_rsvp'];
385
  }
dbem_widgets.php CHANGED
@@ -116,22 +116,22 @@ function widget_dbem_calendar($args) {
116
  extract($args);
117
 
118
  $options = get_option("widget_dbem_calendar");
119
- if (!is_array( $options ))
120
- {
121
  $options = array(
122
- 'title' => _e('calendar','dbem')
123
- );
124
- }
 
125
 
126
- echo $before_widget;
127
  echo $before_title;
128
- echo $options['title'];
129
  echo $after_title;
130
- //Our Widget Content
131
- $current_month = date("m");
132
-
133
- dbem_get_calendar($current_month);
134
- echo $after_widget;
135
  }
136
 
137
  function dbem_calendar_control()
@@ -142,13 +142,15 @@ function dbem_calendar_control()
142
  {
143
  $options = array(
144
  'title' => 'Calendar',
 
145
  );
146
  }
147
 
148
  if ($_POST['dbem_calendar-Submit'])
149
  {
150
  $options['title'] = htmlspecialchars($_POST['dbem_calendar-WidgetTitle']);
151
- update_option("widget_dbem_calendar", $options);
 
152
  }
153
 
154
  ?>
@@ -157,6 +159,10 @@ function dbem_calendar_control()
157
  <input type="text" id="dbem_calendar-WidgetTitle" name="dbem_calendar-WidgetTitle" value="<?php echo $options['title'];?>" />
158
  <input type="hidden" id="dbem_calendar-Submit" name="dbem_calendar-Submit" value="1" />
159
  </p>
 
 
 
 
160
  <?php
161
  }
162
 
116
  extract($args);
117
 
118
  $options = get_option("widget_dbem_calendar");
119
+
120
+ if (!is_array( $options )) {
121
  $options = array(
122
+ 'title' => _e('calendar','dbem'),
123
+ 'long_events' => 0
124
+ );
125
+ }
126
 
127
+ echo $before_widget;
128
  echo $before_title;
129
+ echo $options['title'];
130
  echo $after_title;
131
+ //Our Widget Content
132
+ $options['month'] = date("m");
133
+ dbem_get_calendar($options);
134
+ echo $after_widget;
 
135
  }
136
 
137
  function dbem_calendar_control()
142
  {
143
  $options = array(
144
  'title' => 'Calendar',
145
+ 'long_events' => 0
146
  );
147
  }
148
 
149
  if ($_POST['dbem_calendar-Submit'])
150
  {
151
  $options['title'] = htmlspecialchars($_POST['dbem_calendar-WidgetTitle']);
152
+ $options['long_events'] = ($_POST['dbem_calendar-WidgetLongEvents'] == '1') ? 1:0;
153
+ update_option("widget_dbem_calendar", $options);
154
  }
155
 
156
  ?>
159
  <input type="text" id="dbem_calendar-WidgetTitle" name="dbem_calendar-WidgetTitle" value="<?php echo $options['title'];?>" />
160
  <input type="hidden" id="dbem_calendar-Submit" name="dbem_calendar-Submit" value="1" />
161
  </p>
162
+ <p>
163
+ <label for="dbem_calendar-WidgetTitle"><?php _e('Show Long Events?', 'dbem'); ?>:</label>
164
+ <input type="checkbox" id="dbem_calendar-WidgetLongEvents" name="dbem_calendar-WidgetLongEvents" value="1" <?php echo ($options['long_events']) ? 'checked="checked"':'' ;?>" />
165
+ </p>
166
  <?php
167
  }
168
 
events-manager.php CHANGED
@@ -1,693 +1,763 @@
1
- <?php
2
- /*
3
- Plugin Name: Events Manager
4
- Version: 2.0rc2
5
- Plugin URI: http://davidebenini.it/wordpress-plugins/events-manager/
6
- Description: Manage events specifying precise spatial data (Location, Town, Province, etc).
7
- Author: Davide Benini, Marcus Skyes
8
- Author URI: http://www.davidebenini.it/blog
9
- */
10
-
11
- /*
12
- Copyright (c) 2009, Davide Benini. $Revision: 1 $
13
-
14
- This program is free software; you can redistribute it and/or
15
- modify it under the terms of the GNU General Public License
16
- as published by the Free Software Foundation; either version 2
17
- of the License, or (at your option) any later version.
18
-
19
- This program is distributed in the hope that it will be useful,
20
- but WITHOUT ANY WARRANTY; without even the implied warranty of
21
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
- GNU General Public License for more details.
23
-
24
- You should have received a copy of the GNU General Public License
25
- along with this program; if not, write to the Free Software
26
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
27
- */
28
-
29
- /*************************************************/
30
-
31
- // Setting constants
32
- define('EVENTS_TBNAME','dbem_events'); //TABLE NAME
33
- define('RECURRENCE_TBNAME','dbem_recurrence'); //TABLE NAME
34
- define('LOCATIONS_TBNAME','dbem_locations'); //TABLE NAME
35
- define('BOOKINGS_TBNAME','dbem_bookings'); //TABLE NAME
36
- define('PEOPLE_TBNAME','dbem_people'); //TABLE NAME
37
- define('BOOKING_PEOPLE_TBNAME','dbem_bookings_people'); //TABLE NAME
38
- define('DEFAULT_EVENT_PAGE_NAME', 'Events');
39
- define('DBEM_PAGE','<!--DBEM_EVENTS_PAGE-->'); //EVENTS PAGE
40
- define('MIN_CAPABILITY', 'edit_posts'); // Minimum user level to access calendars
41
- define('SETTING_CAPABILITY', 'activate_plugins'); // Minimum user level to access calendars
42
- define('DEFAULT_EVENT_LIST_ITEM_FORMAT', '<li>#j #M #Y - #H:#i<br/> #_LINKEDNAME<br/>#_TOWN </li>');
43
- define('DEFAULT_SINGLE_EVENT_FORMAT', '<p>#j #M #Y - #H:#i</p><p>#_TOWN</p>');
44
- define('DEFAULT_EVENTS_PAGE_TITLE',__('Events','dbem') ) ;
45
- define('DEFAULT_EVENT_PAGE_TITLE_FORMAT', ' #_NAME');
46
- define('DEFAULT_RSS_DESCRIPTION_FORMAT',"#j #M #y - #H:#i <br/>#_LOCATION <br/>#_ADDRESS <br/>#_TOWN");
47
- define('DEFAULT_RSS_TITLE_FORMAT',"#_NAME");
48
- define('DEFAULT_MAP_TEXT_FORMAT', '<strong>#_LOCATION</strong><p>#_ADDRESS</p><p>#_TOWN</p>');
49
- define('DEFAULT_WIDGET_EVENT_LIST_ITEM_FORMAT','<li>#_LINKEDNAME<ul><li>#j #M #y</li><li>#_TOWN</li></ul></li>');
50
- define('DEFAULT_NO_EVENTS_MESSAGE', __('No events', 'dbem'));
51
- define('DEFAULT_SINGLE_LOCATION_FORMAT', '<p>#_ADDRESS</p><p>#_TOWN</p>');
52
- define('DEFAULT_LOCATION_PAGE_TITLE_FORMAT', ' #_NAME');
53
- define('DEFAULT_LOCATION_BALOON_FORMAT', "<strong>#_NAME</strong><br/>#_ADDRESS - #_TOWN<br/><a href='#_LOCATIONPAGEURL'>Details</a>");
54
- define('DEFAULT_LOCATION_EVENT_LIST_ITEM_FORMAT', "<li>#_NAME - #j #M #Y - #H:#i</li>");
55
- define('DEFAULT_LOCATION_NO_EVENTS_MESSAGE', __('<li>No events in this location</li>', 'dbem'));
56
- define("IMAGE_UPLOAD_DIR", "wp-content/uploads/locations-pics");
57
- define('DEFAULT_IMAGE_MAX_WIDTH', 700);
58
- define('DEFAULT_IMAGE_MAX_HEIGHT', 700);
59
- define('DEFAULT_IMAGE_MAX_SIZE', 204800);
60
- // DEBUG constant for developing
61
- // if you are hacking this plugin, set to TRUE, a log will show in admin pages
62
- define('DEBUG', false);
63
-
64
- // INCLUDES
65
- /* Marcus Begin Edit */
66
- include("marcus-extras.php");
67
- /* Marcus End Edit */
68
- include("dbem_events.php");
69
- include("dbem_calendar.php");
70
- include("dbem_widgets.php");
71
- include("dbem_rsvp.php");
72
- include("dbem_locations.php");
73
- include("dbem_people.php");
74
- include("dbem-recurrence.php");
75
- include("dbem_UI_helpers.php");
76
-
77
- require_once("phpmailer/dbem_phpmailer.php") ;
78
- //require_once("phpmailer/language/phpmailer.lang-en.php") ;
79
-
80
- // Localised date formats as in the jquery UI datepicker plugin
81
- $localised_date_formats = array("am" => "dd.mm.yy","ar" => "dd/mm/yy", "bg" => "dd.mm.yy", "ca" => "mm/dd/yy", "cs" => "dd.mm.yy", "da" => "dd-mm-yy", "de" =>"dd.mm.yy", "es" => "dd/mm/yy", "en" => "mm/dd/yy", "fi" => "dd.mm.yy", "fr" => "dd/mm/yy", "he" => "dd/mm/yy", "hu" => "yy-mm-dd", "hy" => "dd.mm.yy", "id" => "dd/mm/yy", "is" => "dd/mm/yy", "it" => "dd/mm/yy", "ja" => "yy/mm/dd", "ko" => "yy-mm-dd", "lt" => "yy-mm-dd", "lv" => "dd-mm-yy", "nl" => "dd.mm.yy", "no" => "yy-mm-dd", "pl" => "yy-mm-dd", "pt" => "dd/mm/yy", "ro" => "mm/dd/yy", "ru" => "dd.mm.yy", "sk" => "dd.mm.yy", "sv" => "yy-mm-dd", "th" => "dd/mm/yy", "tr" => "dd.mm.yy", "ua" => "dd.mm.yy", "uk" => "dd.mm.yy", "us" => "mm/dd/yy", "CN" => "yy-mm-dd", "TW" => "yy/mm/dd");
82
- //required fields
83
- $required_fields = array('event_name');
84
-
85
- load_plugin_textdomain('dbem', "/wp-content/plugins/events-manager/langs/");
86
-
87
- // To enable activation through the activate function
88
- register_activation_hook(__FILE__,'events-manager');
89
-
90
- // Execute the install script when the plugin is installed
91
- add_action('activate_events-manager/events-manager.php','dbem_install');
92
-
93
- // filters for general events field (corresponding to those of "the _title")
94
- add_filter('dbem_general', 'wptexturize');
95
- add_filter('dbem_general', 'convert_chars');
96
- add_filter('dbem_general', 'trim');
97
- // filters for the notes field (corresponding to those of "the _content")
98
- add_filter('dbem_notes', 'wptexturize');
99
- add_filter('dbem_notes', 'convert_smilies');
100
- add_filter('dbem_notes', 'convert_chars');
101
- add_filter('dbem_notes', 'wpautop');
102
- add_filter('dbem_notes', 'prepend_attachment');
103
- // RSS general filters
104
- add_filter('dbem_general_rss', 'strip_tags');
105
- add_filter('dbem_general_rss', 'ent2ncr', 8);
106
- add_filter('dbem_general_rss', 'wp_specialchars');
107
- // RSS content filter
108
- add_filter('dbem_notes_rss', 'convert_chars', 8);
109
- add_filter('dbem_notes_rss', 'ent2ncr', 8);
110
-
111
- add_filter('dbem_notes_map', 'convert_chars', 8);
112
- add_filter('dbem_notes_map', 'js_escape');
113
-
114
-
115
-
116
- /* Creating the wp_events table to store event data*/
117
- function dbem_install() {
118
- // Creates the events table if necessary
119
- dbem_create_events_table();
120
- dbem_create_recurrence_table();
121
- dbem_create_locations_table();
122
- dbem_create_bookings_table();
123
- dbem_create_people_table();
124
- dbem_add_options();
125
- /* Marcus Begin Edit */
126
- dbem_create_categories_table();
127
- /* Marcus End Edit */
128
- // if ANY 1.0 option is there AND the version options hasn't been set yet THEN launch the updat script
129
- if (get_option('dbem_events_page') && !get_option('dbem_version'))
130
- dbem_migrate_old_events();
131
-
132
- update_option('dbem_version', 2);
133
- // Create events page if necessary
134
- $events_page_id = get_option('dbem_events_page') ;
135
- if ($events_page_id != "" ) {
136
- query_posts("page_id=$events_page_id");
137
- $count = 0;
138
- while(have_posts()) { the_post();
139
- $count++;
140
- }
141
- if ($count == 0)
142
- dbem_create_events_page();
143
- } else {
144
- dbem_create_events_page();
145
- }
146
- // wp-content must be chmodded 777. Maybe just wp-content.
147
- if(!file_exists("../".IMAGE_UPLOAD_DIR))
148
- mkdir("../".IMAGE_UPLOAD_DIR, 0777);
149
-
150
- }
151
-
152
- function dbem_create_events_table() {
153
-
154
- global $wpdb, $user_level;
155
- require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
156
-
157
- $old_table_name = $wpdb->prefix."events";
158
- $table_name = $wpdb->prefix.EVENTS_TBNAME;
159
-
160
- if(!($wpdb->get_var("SHOW TABLES LIKE '$old_table_name'") != $old_table_name)) {
161
- // upgrading from previous versions
162
-
163
- $sql = "ALTER TABLE $old_table_name RENAME $table_name;";
164
- $wpdb->query($sql);
165
-
166
- }
167
-
168
-
169
- if($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) {
170
- // check the user is allowed to make changes
171
- // get_currentuserinfo();
172
- // if ($user_level < 8) { return; }
173
-
174
- // Creating the events table
175
- /* Marcus Begin Edit*/
176
- //Added Category FK Field
177
- $sql = "CREATE TABLE ".$table_name." (
178
- event_id mediumint(9) NOT NULL AUTO_INCREMENT,
179
- event_author mediumint(9) DEFAULT NULL,
180
- event_name tinytext NOT NULL,
181
- event_start_time time NOT NULL,
182
- event_end_time time NOT NULL,
183
- event_start_date date NOT NULL,
184
- event_end_date date NULL,
185
- event_notes text DEFAULT NULL,
186
- event_rsvp bool NOT NULL DEFAULT 0,
187
- event_seats tinyint,
188
- event_contactperson_id mediumint(9) NULL,
189
- location_id mediumint(9) NOT NULL,
190
- recurrence_id mediumint(9) NULL,
191
- event_category_id int(11) default NULL,
192
- UNIQUE KEY (event_id)
193
- );";
194
- /* Marcus End Edit */
195
-
196
- dbDelta($sql);
197
- //-------------- DEBUG CODE to insert a few events n the new table
198
- // get the current timestamp into an array
199
- $timestamp = time();
200
- $date_time_array = getdate($timestamp);
201
-
202
- $hours = $date_time_array['hours'];
203
- $minutes = $date_time_array['minutes'];
204
- $seconds = $date_time_array['seconds'];
205
- $month = $date_time_array['mon'];
206
- $day = $date_time_array['mday'];
207
- $year = $date_time_array['year'];
208
-
209
- // use mktime to recreate the unix timestamp
210
- // adding 19 hours to $hours
211
- $in_one_week = strftime('%Y-%m-%d', mktime($hours,$minutes,$seconds,$month,$day+7,$year));
212
- $in_four_weeks = strftime('%Y-%m-%d',mktime($hours,$minutes,$seconds,$month,$day+28,$year));
213
- $in_one_year = strftime('%Y-%m-%d',mktime($hours,$minutes,$seconds,$month,$day,$year+1));
214
-
215
- $wpdb->query("INSERT INTO ".$table_name." (event_name, event_start_date, event_start_time, event_end_time, location_id)
216
- VALUES ('Orality in James Joyce Conference', '$in_one_week', '16:00:00', '18:00:00', 1)");
217
- $wpdb->query("INSERT INTO ".$table_name." (event_name, event_start_date, event_start_time, event_end_time, location_id)
218
- VALUES ('Traditional music session', '$in_four_weeks', '20:00:00', '22:00:00', 2)");
219
- $wpdb->query("INSERT INTO ".$table_name." (event_name, event_start_date, event_start_time, event_end_time, location_id)
220
- VALUES ('6 Nations, Italy VS Ireland', '$in_one_year','22:00:00', '24:00:00', 3)");
221
- } else {
222
- // eventual maybe_add_column() for later versions
223
- maybe_add_column($table_name, 'event_start_date', "alter table $table_name add event_start_date date NOT NULL;");
224
- maybe_add_column($table_name, 'event_end_date', "alter table $table_name add event_end_date date NULL;");
225
- maybe_add_column($table_name, 'event_start_time', "alter table $table_name add event_start_time time NOT NULL;");
226
- maybe_add_column($table_name, 'event_end_time', "alter table $table_name add event_end_time time NOT NULL;");
227
- maybe_add_column($table_name, 'event_rsvp', "alter table $table_name add event_rsvp BOOL NOT NULL;");
228
- maybe_add_column($table_name, 'event_seats', "alter table $table_name add event_seats tinyint NULL;");
229
- maybe_add_column($table_name, 'location_id', "alter table $table_name add location_id mediumint(9) NOT NULL;");
230
- maybe_add_column($table_name, 'recurrence_id', "alter table $table_name add recurrence_id mediumint(9) NULL;");
231
- maybe_add_column($table_name, 'event_contactperson_id', "alter table $table_name add event_contactperson_id mediumint(9) NULL;");
232
-
233
- // Fix buggy columns
234
- $wpdb->query("ALTER TABLE $table_name MODIFY event_notes text ;");
235
- $wpdb->query("ALTER TABLE $table_name MODIFY event_author mediumint(9);");
236
- }
237
- }
238
-
239
- function dbem_create_recurrence_table() {
240
-
241
- global $wpdb, $user_level;
242
- $table_name = $wpdb->prefix.RECURRENCE_TBNAME;
243
-
244
- if($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) {
245
-
246
- $sql = "CREATE TABLE ".$table_name." (
247
- recurrence_id mediumint(9) NOT NULL AUTO_INCREMENT,
248
- recurrence_name tinytext NOT NULL,
249
- recurrence_start_date date NOT NULL,
250
- recurrence_end_date date NOT NULL,
251
- recurrence_start_time time NOT NULL,
252
- recurrence_end_time time NOT NULL,
253
- recurrence_notes text NOT NULL,
254
- location_id mediumint(9) NOT NULL,
255
- recurrence_interval tinyint NOT NULL,
256
- recurrence_freq tinytext NOT NULL,
257
- recurrence_byday tinyint NOT NULL,
258
- recurrence_byweekno tinyint NOT NULL,
259
- event_contactperson_id mediumint(9) NULL,
260
- UNIQUE KEY (recurrence_id)
261
- );";
262
- require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
263
- dbDelta($sql);
264
-
265
- }
266
- }
267
-
268
- function dbem_create_locations_table() {
269
-
270
- global $wpdb, $user_level;
271
- $table_name = $wpdb->prefix.LOCATIONS_TBNAME;
272
-
273
- if($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) {
274
-
275
- // check the user is allowed to make changes
276
- // get_currentuserinfo();
277
- // if ($user_level < 8) { return; }
278
-
279
- // Creating the events table
280
- $sql = "CREATE TABLE ".$table_name." (
281
- location_id mediumint(9) NOT NULL AUTO_INCREMENT,
282
- location_name tinytext NOT NULL,
283
- location_address tinytext NOT NULL,
284
- location_town tinytext NOT NULL,
285
- location_province tinytext,
286
- location_latitude float DEFAULT NULL,
287
- location_longitude float DEFAULT NULL,
288
- location_description text DEFAULT NULL,
289
- UNIQUE KEY (location_id)
290
- );";
291
- require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
292
- dbDelta($sql);
293
-
294
- $wpdb->query("INSERT INTO ".$table_name." (location_name, location_address, location_town, location_latitude, location_longitude)
295
- VALUES ('Arts Millenium Building', 'Newcastle Road','Galway', 53.275, -9.06532)");
296
- $wpdb->query("INSERT INTO ".$table_name." (location_name, location_address, location_town, location_latitude, location_longitude)
297
- VALUES ('The Crane Bar', '2, Sea Road','Galway', 53.2692, -9.06151)");
298
- $wpdb->query("INSERT INTO ".$table_name." (location_name, location_address, location_town, location_latitude, location_longitude)
299
- VALUES ('Taaffes Bar', '19 Shop Street','Galway', 53.2725, -9.05321)");
300
- }
301
- }
302
-
303
- function dbem_create_bookings_table() {
304
-
305
- global $wpdb, $user_level;
306
- $table_name = $wpdb->prefix.BOOKINGS_TBNAME;
307
-
308
- if($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) {
309
-
310
- $sql = "CREATE TABLE ".$table_name." (
311
- booking_id mediumint(9) NOT NULL AUTO_INCREMENT,
312
- event_id tinyint NOT NULL,
313
- person_id tinyint NOT NULL,
314
- booking_seats tinyint NOT NULL,
315
- UNIQUE KEY (booking_id)
316
- );";
317
- require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
318
- dbDelta($sql);
319
-
320
- }
321
- }
322
-
323
- function dbem_create_people_table() {
324
-
325
- global $wpdb, $user_level;
326
- $table_name = $wpdb->prefix.PEOPLE_TBNAME;
327
-
328
- if($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) {
329
-
330
- $sql = "CREATE TABLE ".$table_name." (
331
- person_id mediumint(9) NOT NULL AUTO_INCREMENT,
332
- person_name tinytext NOT NULL,
333
- person_email tinytext NOT NULL,
334
- person_phone tinytext NOT NULL,
335
- UNIQUE KEY (person_id)
336
- );";
337
- require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
338
- dbDelta($sql);
339
-
340
- }
341
- }
342
-
343
- function dbem_migrate_old_events() {
344
-
345
-
346
- global $wpdb;
347
-
348
- $events_table = $wpdb->prefix.EVENTS_TBNAME;
349
- $sql = "SELECT event_id, event_time, event_venue, event_address, event_town FROM $events_table";
350
- //echo $sql;
351
- $events = $wpdb->get_results($sql, ARRAY_A);
352
- foreach($events as $event) {
353
-
354
- // Migrating location data to the location table
355
- $location = array('location_name' => $event['event_venue'], 'location_address' => $event['event_address'], 'location_town' => $event['event_town']);
356
- $related_location = dbem_get_identical_location($location);
357
-
358
- if ($related_location) {
359
- $event['location_id'] = $related_location['location_id'];
360
- }
361
- else {
362
- $new_location = dbem_insert_location($location);
363
- $event['location_id']= $new_location['location_id'];
364
- }
365
- // migrating event_time to event_start_date and event_start_time
366
- $event['event_start_date'] = substr($event['event_time'],0,10);
367
- $event['event_start_time'] = substr($event['event_time'],11,8);
368
- $event['event_end_time'] = substr($event['event_time'],11,8);
369
-
370
- $where = array('event_id' => $event['event_id']);
371
- $wpdb->update($events_table, $event, $where);
372
-
373
-
374
-
375
-
376
- }
377
-
378
-
379
- }
380
-
381
- function dbem_add_options() {
382
- $contact_person_email_body_localizable = __("#_RESPNAME (#_RESPEMAIL) will attend #_NAME on #m #d, #Y. He wants to reserve #_SPACES spaces.<br/> Now there are #_RESERVEDSPACES spaces reserved, #_AVAILABLESPACES are still available.<br/>Yours faithfully,<br/>Events Manager",'dbem') ;
383
- $respondent_email_body_localizable = __("Dear #_RESPNAME, <br/>you have successfully reserved #_SPACES space/spaces for #_NAME.<br/>Yours faithfully,<br/> #_CONTACTPERSON",'dbem');
384
-
385
- $dbem_options = array('dbem_event_list_item_format' => DEFAULT_EVENT_LIST_ITEM_FORMAT,
386
- 'dbem_display_calendar_in_events_page' => 0,
387
- 'dbem_single_event_format' => DEFAULT_SINGLE_EVENT_FORMAT,
388
- 'dbem_event_page_title_format' => DEFAULT_EVENT_PAGE_TITLE_FORMAT,
389
- 'dbem_list_events_page' => 0,
390
- 'dbem_events_page_title' => DEFAULT_EVENTS_PAGE_TITLE,
391
- 'dbem_no_events_message' => __('No events','dbem'),
392
- 'dbem_location_page_title_format' => DEFAULT_LOCATION_PAGE_TITLE_FORMAT,
393
- 'dbem_location_baloon_format' => DEFAULT_LOCATION_BALOON_FORMAT,
394
- 'dbem_location_event_list_item_format' => DEFAULT_LOCATION_EVENT_LIST_ITEM_FORMAT,
395
- 'dbem_location_no_events_message' => DEFAULT_LOCATION_NO_EVENTS_MESSAGE,
396
- 'dbem_single_location_format' => DEFAULT_SINGLE_LOCATION_FORMAT,
397
- 'dbem_map_text_format' => DEFAULT_MAP_TEXT_FORMAT,
398
- 'dbem_rss_main_title' => get_bloginfo('title')." - ".__('Events'),
399
- 'dbem_rss_main_description' => get_bloginfo('description')." - ".__('Events'),
400
- 'dbem_rss_description_format' => DEFAULT_RSS_DESCRIPTION_FORMAT,
401
- 'dbem_rss_title_format' => DEFAULT_RSS_TITLE_FORMAT,
402
- 'dbem_gmap_is_active'=>0,
403
- 'dbem_gmap_key' => '',
404
- 'dbem_default_contact_person' => 1,
405
- 'dbem_rsvp_mail_notify_is_active' => 0 ,
406
- 'dbem_contactperson_email_body' => __(str_replace("<br/>", "\n\r", $contact_person_email_body_localizable)),
407
- 'dbem_respondent_email_body' => __(str_replace("<br>", "\n\r", $respondent_email_body_localizable)),
408
- 'dbem_rsvp_mail_port' => 465,
409
- 'dbem_smtp_host' => 'localhost',
410
- 'dbem_mail_sender_name' => '',
411
- 'dbem_rsvp_mail_send_method' => 'smtp',
412
- 'dbem_rsvp_mail_SMTPAuth' => 1,
413
- 'dbem_image_max_width' => DEFAULT_IMAGE_MAX_WIDTH,
414
- 'dbem_image_max_height' => DEFAULT_IMAGE_MAX_HEIGHT,
415
- 'dbem_image_max_size' => DEFAULT_IMAGE_MAX_SIZE,
416
- 'dbem_hello_to_user' => 1);
417
-
418
- foreach($dbem_options as $key => $value)
419
- dbem_add_option($key, $value);
420
-
421
- }
422
- function dbem_add_option($key, $value) {
423
- $option = get_option($key);
424
- if (empty($option))
425
- update_option($key, $value);
426
- }
427
-
428
- function dbem_create_events_page(){
429
- echo "inserimento pagina";
430
- global $wpdb,$current_user;
431
- $page_name= DEFAULT_EVENT_PAGE_NAME;
432
- $sql= "INSERT INTO $wpdb->posts (post_author, post_date, post_date_gmt, post_type, post_content, post_title, post_name, post_modified, post_modified_gmt, comment_count) VALUES ($current_user->ID, '$now', '$now_gmt', 'page','CONTENTS', '$page_name', '".$wpdb->escape(__('events','dbem'))."', '$now', '$now_gmt', '0')";
433
- // echo($sql);
434
- $wpdb->query($sql);
435
-
436
- update_option('dbem_events_page', mysql_insert_id());
437
- }
438
-
439
- // Create the Manage Events and the Options submenus
440
- add_action('admin_menu','dbem_create_events_submenu');
441
- function dbem_create_events_submenu () {
442
- if(function_exists('add_submenu_page')) {
443
- add_object_page(__('Events', 'dbem'),__('Events', 'dbem'),MIN_CAPABILITY,__FILE__,dbem_events_subpanel, '../wp-content/plugins/events-manager/images/calendar-16.png');
444
- // Add a submenu to the custom top-level menu:
445
- add_submenu_page(__FILE__, __('Edit'),__('Edit'),MIN_CAPABILITY,__FILE__,dbem_events_subpanel);
446
- add_submenu_page(__FILE__, __('Add new', 'dbem'), __('Add new','dbem'), MIN_CAPABILITY, 'new_event', "dbem_new_event_page");
447
- add_submenu_page(__FILE__, __('Locations', 'dbem'), __('Locations', 'dbem'), MIN_CAPABILITY, 'locations', "dbem_locations_page");
448
- add_submenu_page(__FILE__, __('People', 'dbem'), __('People', 'dbem'), MIN_CAPABILITY, 'people', "dbem_people_page");
449
- //add_submenu_page(__FILE__, 'Test ', 'Test ', 8, 'test', 'dbem_recurrence_test');
450
- add_submenu_page(__FILE__, __('Events Manager Settings','dbem'),__('Settings','dbem'), SETTING_CAPABILITY, "events-manager-options", dbem_options_subpanel);
451
- }
452
- }
453
-
454
- function dbem_replace_placeholders($format, $event, $target="html") {
455
- $event_string = $format;
456
- preg_match_all("/#@?_?[A-Za-z0-9]+/", $format, $placeholders);
457
- foreach($placeholders[0] as $result) {
458
- // echo "RESULT: $result <br>";
459
- // matches alla fields placeholder
460
- //TODO CUSTOM FIX FOR Brian
461
- // EVENTUALLY REMOVE
462
- if (preg_match('/#_JCCSTARTTIME/', $result)) {
463
- $time = substr($event['event_start_time'], 0,5);
464
- $event_string = str_replace($result, $time , $event_string );
465
- }
466
- // END of REMOVE
467
-
468
- if (preg_match('/#_24HSTARTTIME/', $result)) {
469
- $time = substr($event['event_start_time'], 0,5);
470
- $event_string = str_replace($result, $time , $event_string );
471
- }
472
- if (preg_match('/#_24HENDTIME/', $result)) {
473
- $time = substr($event['event_end_time'], 0,5);
474
- $event_string = str_replace($result, $time , $event_string );
475
- }
476
-
477
- if (preg_match('/#_12HSTARTTIME/', $result)) {
478
- $AMorPM = "AM";
479
- $hour = substr($event['event_start_time'], 0,2);
480
- $minute = substr($event['event_start_time'], 3,2);
481
- if ($hour > 12) {
482
- $hour = $hour -12;
483
- $AMorPM = "PM";
484
- }
485
- $time = "$hour:$minute $AMorPM";
486
- $event_string = str_replace($result, $time , $event_string );
487
- }
488
- if (preg_match('/#_12HENDTIME/', $result)) {
489
- $AMorPM = "AM";
490
- $hour = substr($event['event_end_time'], 0,2);
491
- $minute = substr($event['event_end_time'], 3,2);
492
- if ($hour > 12) {
493
- $hour = $hour -12;
494
- $AMorPM = "PM";
495
- }
496
- $time = "$hour:$minute $AMorPM";
497
- $event_string = str_replace($result, $time , $event_string );
498
- }
499
-
500
- if (preg_match('/#_MAP/', $result)) {
501
- $location = dbem_get_location($event['location_id']);
502
- $map_div = dbem_single_location_map($location);
503
- $event_string = str_replace($result, $map_div , $event_string );
504
-
505
- }
506
- if (preg_match('/#_ADDBOOKINGFORM/', $result)) {
507
- $rsvp_is_active = get_option('dbem_gmap_is_active');
508
- if ($event['event_rsvp']) {
509
- $rsvp_add_module .= dbem_add_booking_form();
510
- } else {
511
- $rsvp_add_module .= "";
512
- }
513
- $event_string = str_replace($result, $rsvp_add_module , $event_string );
514
- }
515
- if (preg_match('/#_REMOVEBOOKINGFORM/', $result)) {
516
- $rsvp_is_active = get_option('dbem_gmap_is_active');
517
- if ($event['event_rsvp']) {
518
- $rsvp_delete_module .= dbem_delete_booking_form();
519
- } else {
520
- $rsvp_delete_module .= "";
521
- }
522
- $event_string = str_replace($result, $rsvp_delete_module , $event_string );
523
- }
524
- if (preg_match('/#_AVAILABLESEATS/', $result)) {
525
- $rsvp_is_active = get_option('dbem_gmap_is_active');
526
- if ($event['event_rsvp']) {
527
- $availble_seats .= dbem_get_available_seats($event['event_id']);
528
- } else {
529
- $availble_seats .= "";
530
- }
531
- $event_string = str_replace($result, $availble_seats , $event_string );
532
- }
533
- if (preg_match('/#_LINKEDNAME/', $result)) {
534
- $events_page_id = get_option('dbem_events_page');
535
- $event_page_link = get_permalink($events_page_id);
536
- if (stristr($event_page_link, "?"))
537
- $joiner = "&amp;";
538
- else
539
- $joiner = "?";
540
- $event_string = str_replace($result, "<a href='".get_permalink($events_page_id).$joiner."event_id=".$event['event_id']."' title='".$event['event_name']."'>".$event['event_name']."</a>" , $event_string );
541
- }
542
- if (preg_match('/#_EVENTPAGEURL/', $result)) {
543
- $events_page_id = get_option('dbem_events_page');
544
- $event_page_link = get_permalink($events_page_id);
545
- if (stristr($event_page_link, "?"))
546
- $joiner = "&amp;";
547
- else
548
- $joiner = "?";
549
- $event_string = str_replace($result, get_permalink($events_page_id).$joiner."event_id=".$event['event_id'] , $event_string );
550
- }
551
- if (preg_match('/#_(NAME|NOTES|SEATS)/', $result)) {
552
- $field = "event_".ltrim(strtolower($result), "#_");
553
- $field_value = $event[$field];
554
-
555
- if ($field == "event_notes") {
556
- if ($target == "html")
557
- $field_value = apply_filters('dbem_notes', $field_value);
558
- else
559
- if ($target == "map")
560
- $field_value = apply_filters('dbem_notes_map', $field_value);
561
- else
562
- $field_value = apply_filters('dbem_notes_rss', $field_value);
563
- } else {
564
- if ($target == "html")
565
- $field_value = apply_filters('dbem_general', $field_value);
566
- else
567
- $field_value = apply_filters('dbem_general_rss', $field_value);
568
- }
569
- $event_string = str_replace($result, $field_value , $event_string );
570
- }
571
-
572
- if (preg_match('/#_(ADDRESS|TOWN|PROVINCE)/', $result)) {
573
- $field = "location_".ltrim(strtolower($result), "#_");
574
- $field_value = $event[$field];
575
-
576
- if ($field == "event_notes") {
577
- if ($target == "html")
578
- $field_value = apply_filters('dbem_notes', $field_value);
579
- else
580
- if ($target == "map")
581
- $field_value = apply_filters('dbem_notes_map', $field_value);
582
- else
583
- $field_value = apply_filters('dbem_notes_rss', $field_value);
584
- } else {
585
- if ($target == "html")
586
- $field_value = apply_filters('dbem_general', $field_value);
587
- else
588
- $field_value = apply_filters('dbem_general_rss', $field_value);
589
- }
590
- $event_string = str_replace($result, $field_value , $event_string );
591
- }
592
-
593
- if (preg_match('/#_(LOCATION)$/', $result)) {
594
- $field = "location_name";
595
- $field_value = $event[$field];
596
- if ($target == "html")
597
- $field_value = apply_filters('dbem_general', $field_value);
598
- else
599
- $field_value = apply_filters('dbem_general_rss', $field_value);
600
-
601
- $event_string = str_replace($result, $field_value , $event_string );
602
- }
603
- if (preg_match('/#_CONTACTNAME$/', $result)) {
604
- $event['event_contactperson_id'] ? $user_id = $event['event_contactperson_id'] : $user_id = get_option('dbem_default_contact_person');
605
- $name = dbem_get_user_name($user_id);
606
- $event_string = str_replace($result, $name, $event_string );
607
- }
608
- if (preg_match('/#_CONTACTEMAIL$/', $result)) {
609
- $event['event_contactperson_id'] ? $user_id = $event['event_contactperson_id'] : $user_id = get_option('dbem_default_contact_person');
610
- $email = dbem_get_user_email($user_id);
611
- $event_string = str_replace($result, dbem_ascii_encode($email), $event_string );
612
- }
613
- if (preg_match('/#_CONTACTPHONE$/', $result)) {
614
- $event['event_contactperson_id'] ? $user_id = $event['event_contactperson_id'] : $user_id = get_option('dbem_default_contact_person');
615
- $phone = dbem_get_user_phone($user_id);
616
- $event_string = str_replace($result, dbem_ascii_encode($phone), $event_string );
617
- }
618
- if (preg_match('/#_(IMAGE)/', $result)) {
619
-
620
- if($event['location_image_url'] != '')
621
- $location_image = "<img src='".$event['location_image_url']."' alt='".$event['location_name']."'/>";
622
- else
623
- $location_image = "";
624
- $event_string = str_replace($result, $location_image , $event_string );
625
- }
626
-
627
- if (preg_match('/#_(LOCATIONPAGEURL)/', $result)) {
628
- $events_page_link = dbem_get_events_page(true, false);
629
- if (stristr($events_page_link, "?"))
630
- $joiner = "&amp;";
631
- else
632
- $joiner = "?";
633
- $venue_page_link = $events_page_link.$joiner."location_id=".$event['location_id'];
634
- $event_string = str_replace($result, $venue_page_link , $event_string );
635
- }
636
- // matches all PHP time placeholders for endtime
637
- if (preg_match('/^#@[dDjlNSwzWFmMntLoYy]$/', $result)) {
638
- $event_string = str_replace($result, mysql2date(ltrim($result, "#@"), $event['event_end_date']), $event_string );
639
- }
640
-
641
- // matches all PHP date placeholders
642
- if (preg_match('/^#[dDjlNSwzWFmMntLoYy]$/', $result)) {
643
- // echo "-inizio-";
644
- $event_string = str_replace($result, mysql2date(ltrim($result, "#"), $event['event_start_date']),$event_string );
645
- // echo $event_string;
646
- }
647
-
648
-
649
-
650
- // matches all PHP time placeholders
651
- if (preg_match('/^#@[aABgGhHisueIOPTZcrU]$/', $result)) {
652
- $event_string = str_replace($result, mysql2date(ltrim($result, "#@"), "0000-00-00 ".$event['event_end_time']),$event_string );
653
- // echo $event_string;
654
- }
655
-
656
- if (preg_match('/^#[aABgGhHisueIOPTZcrU]$/', $result)) {
657
- $event_string = str_replace($result, mysql2date(ltrim($result, "#"), "0000-00-00 ".$event['event_start_time']),$event_string );
658
- // echo $event_string;
659
- }
660
-
661
- /* Marcus Begin Edit*/
662
- //Add a placeholder for categories
663
- if (preg_match('/#_CATEGORY$/', $result)) {
664
- $category = (dbem_get_event_category($event['event_id']));
665
- $event_string = str_replace($result, $category['category_name'], $event_string );
666
- }
667
- /* Marcus End Edit */
668
-
669
-
670
- }
671
- /* Marcus Begin Edit */
672
- preg_match_all("/#@?_\{[A-Za-z0-9 -\/,\.\\\]+\}/", $format, $placeholders);
673
- foreach($placeholders[0] as $result) {
674
- if(substr($result, 0, 3 ) == "#@_"){
675
- $date = 'event_end_date';
676
- $offset = 4;
677
- }else{
678
- $date = 'event_start_date';
679
- $offset = 3;
680
- }
681
- $event_string = str_replace($result, mysql2date(substr($result, $offset, (strlen($result)-($offset+1)) ), $event[$date]),$event_string );
682
- }
683
- /* Marcus End Edit */
684
-
685
- return $event_string;
686
-
687
- }
688
-
689
- function dbem_date_to_unix_time($date) {
690
- $unix_time = mktime(0, 0, 0, substr($date,5,2), substr($date,8,2), substr($date,0,4));
691
- return $unix_time;
692
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
693
  ?>
1
+ <?php
2
+ /*
3
+ Plugin Name: Events Manager
4
+ Version: 2.1
5
+ Plugin URI: http://davidebenini.it/wordpress-plugins/events-manager/
6
+ Description: Manage events specifying precise spatial data (Location, Town, Province, etc).
7
+ Author: Davide Benini
8
+ Author URI: http://www.davidebenini.it/blog
9
+ */
10
+
11
+ /*
12
+ Copyright (c) 2009, Davide Benini. $Revision: 1 $
13
+
14
+ This program is free software; you can redistribute it and/or
15
+ modify it under the terms of the GNU General Public License
16
+ as published by the Free Software Foundation; either version 2
17
+ of the License, or (at your option) any later version.
18
+
19
+ This program is distributed in the hope that it will be useful,
20
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
21
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
+ GNU General Public License for more details.
23
+
24
+ You should have received a copy of the GNU General Public License
25
+ along with this program; if not, write to the Free Software
26
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
27
+ */
28
+
29
+ /*************************************************/
30
+
31
+ // Setting constants
32
+ define('EVENTS_TBNAME','dbem_events'); //TABLE NAME
33
+ define('RECURRENCE_TBNAME','dbem_recurrence'); //TABLE NAME
34
+ define('LOCATIONS_TBNAME','dbem_locations'); //TABLE NAME
35
+ define('BOOKINGS_TBNAME','dbem_bookings'); //TABLE NAME
36
+ define('PEOPLE_TBNAME','dbem_people'); //TABLE NAME
37
+ define('BOOKING_PEOPLE_TBNAME','dbem_bookings_people'); //TABLE NAME
38
+ define('DEFAULT_EVENT_PAGE_NAME', 'Events');
39
+ define('DBEM_PAGE','<!--DBEM_EVENTS_PAGE-->'); //EVENTS PAGE
40
+ define('MIN_CAPABILITY', 'edit_posts'); // Minimum user level to access calendars
41
+ define('SETTING_CAPABILITY', 'activate_plugins'); // Minimum user level to access calendars
42
+ define('DEFAULT_EVENT_LIST_ITEM_FORMAT', '<li>#j #M #Y - #H:#i<br/> #_LINKEDNAME<br/>#_TOWN </li>');
43
+ define('DEFAULT_SINGLE_EVENT_FORMAT', '<p>#j #M #Y - #H:#i</p><p>#_TOWN</p>');
44
+ define('DEFAULT_EVENTS_PAGE_TITLE',__('Events','dbem') ) ;
45
+ define('DEFAULT_EVENT_PAGE_TITLE_FORMAT', ' #_NAME');
46
+ define('DEFAULT_RSS_DESCRIPTION_FORMAT',"#j #M #y - #H:#i <br/>#_LOCATION <br/>#_ADDRESS <br/>#_TOWN");
47
+ define('DEFAULT_RSS_TITLE_FORMAT',"#_NAME");
48
+ define('DEFAULT_MAP_TEXT_FORMAT', '<strong>#_LOCATION</strong><p>#_ADDRESS</p><p>#_TOWN</p>');
49
+ define('DEFAULT_WIDGET_EVENT_LIST_ITEM_FORMAT','<li>#_LINKEDNAME<ul><li>#j #M #y</li><li>#_TOWN</li></ul></li>');
50
+ define('DEFAULT_NO_EVENTS_MESSAGE', __('No events', 'dbem'));
51
+ define('DEFAULT_SINGLE_LOCATION_FORMAT', '<p>#_ADDRESS</p><p>#_TOWN</p>');
52
+ define('DEFAULT_LOCATION_PAGE_TITLE_FORMAT', ' #_NAME');
53
+ define('DEFAULT_LOCATION_BALOON_FORMAT', "<strong>#_NAME</strong><br/>#_ADDRESS - #_TOWN<br/><a href='#_LOCATIONPAGEURL'>Details</a>");
54
+ define('DEFAULT_LOCATION_EVENT_LIST_ITEM_FORMAT', "<li>#_NAME - #j #M #Y - #H:#i</li>");
55
+ define('DEFAULT_LOCATION_NO_EVENTS_MESSAGE', __('<li>No events in this location</li>', 'dbem'));
56
+ define("IMAGE_UPLOAD_DIR", "wp-content/uploads/locations-pics");
57
+ define('DEFAULT_IMAGE_MAX_WIDTH', 700);
58
+ define('DEFAULT_IMAGE_MAX_HEIGHT', 700);
59
+ define('DEFAULT_IMAGE_MAX_SIZE', 204800);
60
+ define('DEFAULT_FULL_CALENDAR_EVENT_FORMAT', '<li>#_LINKEDNAME</li>');
61
+ define('DEFAULT_SMALL_CALENDAR_EVENT_TITLE_FORMAT', "#_NAME" );
62
+ define('DEFAULT_SMALL_CALENDAR_EVENT_TITLE_SEPARATOR', ", ");
63
+ // DEBUG constant for developing
64
+ // if you are hacking this plugin, set to TRUE, a log will show in admin pages
65
+ define('DEBUG', false);
66
+
67
+ // INCLUDES
68
+ /* Marcus Begin Edit */
69
+ include("marcus-extras.php");
70
+ /* Marcus End Edit */
71
+ include("dbem_events.php");
72
+ include("dbem_calendar.php");
73
+ include("dbem_widgets.php");
74
+ include("dbem_rsvp.php");
75
+ include("dbem_locations.php");
76
+ include("dbem_people.php");
77
+ include("dbem-recurrence.php");
78
+ include("dbem_UI_helpers.php");
79
+
80
+ require_once("phpmailer/dbem_phpmailer.php") ;
81
+ //require_once("phpmailer/language/phpmailer.lang-en.php") ;
82
+
83
+ // Localised date formats as in the jquery UI datepicker plugin
84
+ $localised_date_formats = array("am" => "dd.mm.yy","ar" => "dd/mm/yy", "bg" => "dd.mm.yy", "ca" => "mm/dd/yy", "cs" => "dd.mm.yy", "da" => "dd-mm-yy", "de" =>"dd.mm.yy", "es" => "dd/mm/yy", "en" => "mm/dd/yy", "fi" => "dd.mm.yy", "fr" => "dd/mm/yy", "he" => "dd/mm/yy", "hu" => "yy-mm-dd", "hy" => "dd.mm.yy", "id" => "dd/mm/yy", "is" => "dd/mm/yy", "it" => "dd/mm/yy", "ja" => "yy/mm/dd", "ko" => "yy-mm-dd", "lt" => "yy-mm-dd", "lv" => "dd-mm-yy", "nl" => "dd.mm.yy", "no" => "yy-mm-dd", "pl" => "yy-mm-dd", "pt" => "dd/mm/yy", "ro" => "mm/dd/yy", "ru" => "dd.mm.yy", "sk" => "dd.mm.yy", "sv" => "yy-mm-dd", "th" => "dd/mm/yy", "tr" => "dd.mm.yy", "ua" => "dd.mm.yy", "uk" => "dd.mm.yy", "us" => "mm/dd/yy", "CN" => "yy-mm-dd", "TW" => "yy/mm/dd");
85
+ //required fields
86
+ $required_fields = array('event_name');
87
+
88
+ $thisDir = dirname( plugin_basename( __FILE__ ) );
89
+ load_plugin_textdomain('dbem', false, $thisDir.'/langs');
90
+
91
+ // To enable activation through the activate function
92
+ register_activation_hook(__FILE__,'events-manager');
93
+
94
+ // Execute the install script when the plugin is installed
95
+ add_action('activate_events-manager/events-manager.php','dbem_install');
96
+
97
+ // filters for general events field (corresponding to those of "the _title")
98
+ add_filter('dbem_general', 'wptexturize');
99
+ add_filter('dbem_general', 'convert_chars');
100
+ add_filter('dbem_general', 'trim');
101
+ // filters for the notes field (corresponding to those of "the _content")
102
+ add_filter('dbem_notes', 'wptexturize');
103
+ add_filter('dbem_notes', 'convert_smilies');
104
+ add_filter('dbem_notes', 'convert_chars');
105
+ add_filter('dbem_notes', 'wpautop');
106
+ add_filter('dbem_notes', 'prepend_attachment');
107
+ // RSS general filters
108
+ add_filter('dbem_general_rss', 'strip_tags');
109
+ add_filter('dbem_general_rss', 'ent2ncr', 8);
110
+ add_filter('dbem_general_rss', 'wp_specialchars');
111
+ // RSS content filter
112
+ add_filter('dbem_notes_rss', 'convert_chars', 8);
113
+ add_filter('dbem_notes_rss', 'ent2ncr', 8);
114
+
115
+ add_filter('dbem_notes_map', 'convert_chars', 8);
116
+ add_filter('dbem_notes_map', 'js_escape');
117
+
118
+
119
+
120
+ /* Creating the wp_events table to store event data*/
121
+ function dbem_install() {
122
+ // Creates the events table if necessary
123
+ dbem_create_events_table();
124
+ dbem_create_recurrence_table();
125
+ dbem_create_locations_table();
126
+ dbem_create_bookings_table();
127
+ dbem_create_people_table();
128
+ dbem_add_options();
129
+ /* Marcus Begin Edit */
130
+ dbem_create_categories_table();
131
+ /* Marcus End Edit */
132
+ // if ANY 1.0 option is there AND the version options hasn't been set yet THEN launch the updat script
133
+ if (get_option('dbem_events_page') && !get_option('dbem_version'))
134
+ dbem_migrate_old_events();
135
+
136
+ update_option('dbem_version', 2);
137
+ // Create events page if necessary
138
+ $events_page_id = get_option('dbem_events_page') ;
139
+ if ($events_page_id != "" ) {
140
+ query_posts("page_id=$events_page_id");
141
+ $count = 0;
142
+ while(have_posts()) { the_post();
143
+ $count++;
144
+ }
145
+ if ($count == 0)
146
+ dbem_create_events_page();
147
+ } else {
148
+ dbem_create_events_page();
149
+ }
150
+ // wp-content must be chmodded 777. Maybe just wp-content.
151
+ if(!file_exists("../".IMAGE_UPLOAD_DIR))
152
+ mkdir("../".IMAGE_UPLOAD_DIR, 0777);
153
+
154
+ }
155
+
156
+ function dbem_create_events_table() {
157
+ global $wpdb, $user_level;
158
+ require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
159
+
160
+ $old_table_name = $wpdb->prefix."events";
161
+ $table_name = $wpdb->prefix.EVENTS_TBNAME;
162
+
163
+ if(!($wpdb->get_var("SHOW TABLES LIKE '$old_table_name'") != $old_table_name)) {
164
+ // upgrading from previous versions
165
+
166
+ $sql = "ALTER TABLE $old_table_name RENAME $table_name;";
167
+ $wpdb->query($sql);
168
+
169
+ }
170
+
171
+
172
+ if($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) {
173
+ // check the user is allowed to make changes
174
+ // get_currentuserinfo();
175
+ // if ($user_level < 8) { return; }
176
+
177
+ // Creating the events table
178
+ /* Marcus Begin Edit*/
179
+ //Added Category FK Field
180
+ $sql = "CREATE TABLE ".$table_name." (
181
+ event_id mediumint(9) NOT NULL AUTO_INCREMENT,
182
+ event_author mediumint(9) DEFAULT NULL,
183
+ event_name tinytext NOT NULL,
184
+ event_start_time time NOT NULL,
185
+ event_end_time time NOT NULL,
186
+ event_start_date date NOT NULL,
187
+ event_end_date date NULL,
188
+ event_notes text DEFAULT NULL,
189
+ event_rsvp bool NOT NULL DEFAULT 0,
190
+ event_seats tinyint,
191
+ event_contactperson_id mediumint(9) NULL,
192
+ location_id mediumint(9) NOT NULL,
193
+ recurrence_id mediumint(9) NULL,
194
+ event_category_id int(11) default NULL,
195
+ event_attributes text NULL,
196
+ UNIQUE KEY (event_id)
197
+ );";
198
+ /* Marcus End Edit */
199
+
200
+ dbDelta($sql);
201
+ //-------------- DEBUG CODE to insert a few events n the new table
202
+ // get the current timestamp into an array
203
+ $timestamp = time();
204
+ $date_time_array = getdate($timestamp);
205
+
206
+ $hours = $date_time_array['hours'];
207
+ $minutes = $date_time_array['minutes'];
208
+ $seconds = $date_time_array['seconds'];
209
+ $month = $date_time_array['mon'];
210
+ $day = $date_time_array['mday'];
211
+ $year = $date_time_array['year'];
212
+
213
+ // use mktime to recreate the unix timestamp
214
+ // adding 19 hours to $hours
215
+ $in_one_week = strftime('%Y-%m-%d', mktime($hours,$minutes,$seconds,$month,$day+7,$year));
216
+ $in_four_weeks = strftime('%Y-%m-%d',mktime($hours,$minutes,$seconds,$month,$day+28,$year));
217
+ $in_one_year = strftime('%Y-%m-%d',mktime($hours,$minutes,$seconds,$month,$day,$year+1));
218
+
219
+ $wpdb->query("INSERT INTO ".$table_name." (event_name, event_start_date, event_start_time, event_end_time, location_id)
220
+ VALUES ('Orality in James Joyce Conference', '$in_one_week', '16:00:00', '18:00:00', 1)");
221
+ $wpdb->query("INSERT INTO ".$table_name." (event_name, event_start_date, event_start_time, event_end_time, location_id)
222
+ VALUES ('Traditional music session', '$in_four_weeks', '20:00:00', '22:00:00', 2)");
223
+ $wpdb->query("INSERT INTO ".$table_name." (event_name, event_start_date, event_start_time, event_end_time, location_id)
224
+ VALUES ('6 Nations, Italy VS Ireland', '$in_one_year','22:00:00', '24:00:00', 3)");
225
+ } else {
226
+ // eventual maybe_add_column() for later versions
227
+ maybe_add_column($table_name, 'event_start_date', "alter table $table_name add event_start_date date NOT NULL;");
228
+ maybe_add_column($table_name, 'event_end_date', "alter table $table_name add event_end_date date NULL;");
229
+ maybe_add_column($table_name, 'event_start_time', "alter table $table_name add event_start_time time NOT NULL;");
230
+ maybe_add_column($table_name, 'event_end_time', "alter table $table_name add event_end_time time NOT NULL;");
231
+ maybe_add_column($table_name, 'event_rsvp', "alter table $table_name add event_rsvp BOOL NOT NULL;");
232
+ maybe_add_column($table_name, 'event_seats', "alter table $table_name add event_seats tinyint NULL;");
233
+ maybe_add_column($table_name, 'location_id', "alter table $table_name add location_id mediumint(9) NOT NULL;");
234
+ maybe_add_column($table_name, 'recurrence_id', "alter table $table_name add recurrence_id mediumint(9) NULL;");
235
+ maybe_add_column($table_name, 'event_contactperson_id', "alter table $table_name add event_contactperson_id mediumint(9) NULL;");
236
+ maybe_add_column($table_name, 'event_attributes', "alter table $table_name add event_attributes text NULL;");
237
+
238
+ // Fix buggy columns
239
+ $wpdb->query("ALTER TABLE $table_name MODIFY event_notes text ;");
240
+ $wpdb->query("ALTER TABLE $table_name MODIFY event_author mediumint(9);");
241
+ }
242
+ }
243
+
244
+ function dbem_create_recurrence_table() {
245
+
246
+ global $wpdb, $user_level;
247
+ $table_name = $wpdb->prefix.RECURRENCE_TBNAME;
248
+
249
+ if($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) {
250
+
251
+ $sql = "CREATE TABLE ".$table_name." (
252
+ recurrence_id mediumint(9) NOT NULL AUTO_INCREMENT,
253
+ recurrence_name tinytext NOT NULL,
254
+ recurrence_start_date date NOT NULL,
255
+ recurrence_end_date date NOT NULL,
256
+ recurrence_start_time time NOT NULL,
257
+ recurrence_end_time time NOT NULL,
258
+ recurrence_notes text NOT NULL,
259
+ location_id mediumint(9) NOT NULL,
260
+ recurrence_interval tinyint NOT NULL,
261
+ recurrence_freq tinytext NOT NULL,
262
+ recurrence_byday tinyint NOT NULL,
263
+ recurrence_byweekno tinyint NOT NULL,
264
+ event_contactperson_id mediumint(9) NULL,
265
+ UNIQUE KEY (recurrence_id)
266
+ );";
267
+ require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
268
+ dbDelta($sql);
269
+
270
+ }
271
+ }
272
+
273
+ function dbem_create_locations_table() {
274
+
275
+ global $wpdb, $user_level;
276
+ $table_name = $wpdb->prefix.LOCATIONS_TBNAME;
277
+
278
+ if($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) {
279
+
280
+ // check the user is allowed to make changes
281
+ // get_currentuserinfo();
282
+ // if ($user_level < 8) { return; }
283
+
284
+ // Creating the events table
285
+ $sql = "CREATE TABLE ".$table_name." (
286
+ location_id mediumint(9) NOT NULL AUTO_INCREMENT,
287
+ location_name tinytext NOT NULL,
288
+ location_address tinytext NOT NULL,
289
+ location_town tinytext NOT NULL,
290
+ location_province tinytext,
291
+ location_latitude float DEFAULT NULL,
292
+ location_longitude float DEFAULT NULL,
293
+ location_description text DEFAULT NULL,
294
+ UNIQUE KEY (location_id)
295
+ );";
296
+ require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
297
+ dbDelta($sql);
298
+
299
+ $wpdb->query("INSERT INTO ".$table_name." (location_name, location_address, location_town, location_latitude, location_longitude)
300
+ VALUES ('Arts Millenium Building', 'Newcastle Road','Galway', 53.275, -9.06532)");
301
+ $wpdb->query("INSERT INTO ".$table_name." (location_name, location_address, location_town, location_latitude, location_longitude)
302
+ VALUES ('The Crane Bar', '2, Sea Road','Galway', 53.2692, -9.06151)");
303
+ $wpdb->query("INSERT INTO ".$table_name." (location_name, location_address, location_town, location_latitude, location_longitude)
304
+ VALUES ('Taaffes Bar', '19 Shop Street','Galway', 53.2725, -9.05321)");
305
+ }
306
+ }
307
+
308
+ function dbem_create_bookings_table() {
309
+
310
+ global $wpdb, $user_level;
311
+ $table_name = $wpdb->prefix.BOOKINGS_TBNAME;
312
+
313
+ if($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) {
314
+
315
+ $sql = "CREATE TABLE ".$table_name." (
316
+ booking_id mediumint(9) NOT NULL AUTO_INCREMENT,
317
+ event_id tinyint NOT NULL,
318
+ person_id tinyint NOT NULL,
319
+ booking_seats tinyint NOT NULL,
320
+ booking_comment text DEFAULT NULL,
321
+ UNIQUE KEY (booking_id)
322
+ );";
323
+ require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
324
+ dbDelta($sql);
325
+ } else {
326
+ maybe_add_column($table_name, 'booking_comment', "ALTER TABLE $table_name add booking_comment text DEFAULT NULL;");
327
+ }
328
+ }
329
+
330
+ function dbem_create_people_table() {
331
+
332
+ global $wpdb, $user_level;
333
+ $table_name = $wpdb->prefix.PEOPLE_TBNAME;
334
+
335
+ if($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) {
336
+
337
+ $sql = "CREATE TABLE ".$table_name." (
338
+ person_id mediumint(9) NOT NULL AUTO_INCREMENT,
339
+ person_name tinytext NOT NULL,
340
+ person_email tinytext NOT NULL,
341
+ person_phone tinytext NOT NULL,
342
+ UNIQUE KEY (person_id)
343
+ );";
344
+ require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
345
+ dbDelta($sql);
346
+
347
+ }
348
+ }
349
+
350
+ function dbem_migrate_old_events() {
351
+
352
+
353
+ global $wpdb;
354
+
355
+ $events_table = $wpdb->prefix.EVENTS_TBNAME;
356
+ $sql = "SELECT event_id, event_time, event_venue, event_address, event_town FROM $events_table";
357
+ //echo $sql;
358
+ $events = $wpdb->get_results($sql, ARRAY_A);
359
+ foreach($events as $event) {
360
+
361
+ // Migrating location data to the location table
362
+ $location = array('location_name' => $event['event_venue'], 'location_address' => $event['event_address'], 'location_town' => $event['event_town']);
363
+ $related_location = dbem_get_identical_location($location);
364
+
365
+ if ($related_location) {
366
+ $event['location_id'] = $related_location['location_id'];
367
+ }
368
+ else {
369
+ $new_location = dbem_insert_location($location);
370
+ $event['location_id']= $new_location['location_id'];
371
+ }
372
+ // migrating event_time to event_start_date and event_start_time
373
+ $event['event_start_date'] = substr($event['event_time'],0,10);
374
+ $event['event_start_time'] = substr($event['event_time'],11,8);
375
+ $event['event_end_time'] = substr($event['event_time'],11,8);
376
+
377
+ $where = array('event_id' => $event['event_id']);
378
+ $wpdb->update($events_table, $event, $where);
379
+
380
+
381
+
382
+
383
+ }
384
+
385
+
386
+ }
387
+
388
+ function dbem_add_options() {
389
+ $contact_person_email_body_localizable = __("#_RESPNAME (#_RESPEMAIL) will attend #_NAME on #m #d, #Y. He wants to reserve #_SPACES spaces.<br/> Now there are #_RESERVEDSPACES spaces reserved, #_AVAILABLESPACES are still available.<br/>Yours faithfully,<br/>Events Manager",'dbem') ;
390
+ $respondent_email_body_localizable = __("Dear #_RESPNAME, <br/>you have successfully reserved #_SPACES space/spaces for #_NAME.<br/>Yours faithfully,<br/> #_CONTACTPERSON",'dbem');
391
+
392
+ $dbem_options = array('dbem_event_list_item_format' => DEFAULT_EVENT_LIST_ITEM_FORMAT,
393
+ 'dbem_display_calendar_in_events_page' => 0,
394
+ 'dbem_single_event_format' => DEFAULT_SINGLE_EVENT_FORMAT,
395
+ 'dbem_event_page_title_format' => DEFAULT_EVENT_PAGE_TITLE_FORMAT,
396
+ 'dbem_list_events_page' => 0,
397
+ 'dbem_events_page_title' => DEFAULT_EVENTS_PAGE_TITLE,
398
+ 'dbem_no_events_message' => __('No events','dbem'),
399
+ 'dbem_location_page_title_format' => DEFAULT_LOCATION_PAGE_TITLE_FORMAT,
400
+ 'dbem_location_baloon_format' => DEFAULT_LOCATION_BALOON_FORMAT,
401
+ 'dbem_location_event_list_item_format' => DEFAULT_LOCATION_EVENT_LIST_ITEM_FORMAT,
402
+ 'dbem_location_no_events_message' => DEFAULT_LOCATION_NO_EVENTS_MESSAGE,
403
+ 'dbem_single_location_format' => DEFAULT_SINGLE_LOCATION_FORMAT,
404
+ 'dbem_map_text_format' => DEFAULT_MAP_TEXT_FORMAT,
405
+ 'dbem_rss_main_title' => get_bloginfo('title')." - ".__('Events'),
406
+ 'dbem_rss_main_description' => get_bloginfo('description')." - ".__('Events'),
407
+ 'dbem_rss_description_format' => DEFAULT_RSS_DESCRIPTION_FORMAT,
408
+ 'dbem_rss_title_format' => DEFAULT_RSS_TITLE_FORMAT,
409
+ 'dbem_gmap_is_active'=>0,
410
+ 'dbem_gmap_key' => '',
411
+ 'dbem_default_contact_person' => 1,
412
+ 'dbem_rsvp_mail_notify_is_active' => 0 ,
413
+ 'dbem_contactperson_email_body' => __(str_replace("<br/>", "\n\r", $contact_person_email_body_localizable)),
414
+ 'dbem_respondent_email_body' => __(str_replace("<br>", "\n\r", $respondent_email_body_localizable)),
415
+ 'dbem_rsvp_mail_port' => 465,
416
+ 'dbem_smtp_host' => 'localhost',
417
+ 'dbem_mail_sender_name' => '',
418
+ 'dbem_rsvp_mail_send_method' => 'smtp',
419
+ 'dbem_rsvp_mail_SMTPAuth' => 1,
420
+ 'dbem_image_max_width' => DEFAULT_IMAGE_MAX_WIDTH,
421
+ 'dbem_image_max_height' => DEFAULT_IMAGE_MAX_HEIGHT,
422
+ 'dbem_image_max_size' => DEFAULT_IMAGE_MAX_SIZE,
423
+ 'dbem_full_calendar_event_format' => DEFAULT_FULL_CALENDAR_EVENT_FORMAT,
424
+ 'dbem_small_calendar_event_title_format' => DEFAULT_SMALL_CALENDAR_EVENT_TITLE_FORMAT,
425
+ 'dbem_small_calendar_event_title_separator' => DEFAULT_SMALL_CALENDAR_EVENT_TITLE_SEPARATOR,
426
+ 'dbem_hello_to_user' => 1);
427
+
428
+ foreach($dbem_options as $key => $value)
429
+ dbem_add_option($key, $value);
430
+
431
+ }
432
+ function dbem_add_option($key, $value) {
433
+ $option = get_option($key);
434
+ if (empty($option))
435
+ update_option($key, $value);
436
+ }
437
+
438
+ function dbem_create_events_page(){
439
+ echo "inserimento pagina";
440
+ global $wpdb,$current_user;
441
+ $page_name= DEFAULT_EVENT_PAGE_NAME;
442
+ $sql= "INSERT INTO $wpdb->posts (post_author, post_date, post_date_gmt, post_type, post_content, post_title, post_name, post_modified, post_modified_gmt, comment_count) VALUES ($current_user->ID, '$now', '$now_gmt', 'page','CONTENTS', '$page_name', '".$wpdb->escape(__('events','dbem'))."', '$now', '$now_gmt', '0')";
443
+ // echo($sql);
444
+ $wpdb->query($sql);
445
+
446
+ update_option('dbem_events_page', mysql_insert_id());
447
+ }
448
+
449
+ // Create the Manage Events and the Options submenus
450
+ add_action('admin_menu','dbem_create_events_submenu');
451
+ function dbem_create_events_submenu () {
452
+ if(function_exists('add_submenu_page')) {
453
+ add_object_page(__('Events', 'dbem'),__('Events', 'dbem'),MIN_CAPABILITY,__FILE__,dbem_events_subpanel, '../wp-content/plugins/events-manager/images/calendar-16.png');
454
+ // Add a submenu to the custom top-level menu:
455
+ $plugin_page = add_submenu_page(__FILE__, __('Edit'),__('Edit'),MIN_CAPABILITY,__FILE__,dbem_events_subpanel);
456
+ add_action( 'admin_head-'. $plugin_page, 'dbem_admin_general_script' );
457
+ $plugin_page = add_submenu_page(__FILE__, __('Add new', 'dbem'), __('Add new','dbem'), MIN_CAPABILITY, 'new_event', "dbem_new_event_page");
458
+ add_action( 'admin_head-'. $plugin_page, 'dbem_admin_general_script' );
459
+ $plugin_page = add_submenu_page(__FILE__, __('Locations', 'dbem'), __('Locations', 'dbem'), MIN_CAPABILITY, 'locations', "dbem_locations_page");
460
+ add_action( 'admin_head-'. $plugin_page, 'dbem_admin_general_script' );
461
+ $plugin_page = add_submenu_page(__FILE__, __('People', 'dbem'), __('People', 'dbem'), MIN_CAPABILITY, 'people', "dbem_people_page");
462
+ add_action( 'admin_head-'. $plugin_page, 'dbem_admin_general_script' );
463
+ //add_submenu_page(__FILE__, 'Test ', 'Test ', 8, 'test', 'dbem_recurrence_test');
464
+ $plugin_page = add_submenu_page(__FILE__, __('Events Manager Settings','dbem'),__('Settings','dbem'), SETTING_CAPABILITY, "events-manager-options", dbem_options_subpanel);
465
+ add_action( 'admin_head-'. $plugin_page, 'dbem_admin_general_script' );
466
+ }
467
+ }
468
+
469
+ function dbem_replace_placeholders($format, $event, $target="html") {
470
+ $event_string = $format;
471
+ preg_match_all("/#@?_?[A-Za-z0-9]+/", $format, $placeholders);
472
+ foreach($placeholders[0] as $result) {
473
+ // echo "RESULT: $result <br>";
474
+ // matches alla fields placeholder
475
+ //TODO CUSTOM FIX FOR Brian
476
+ // EVENTUALLY REMOVE
477
+ if (preg_match('/#_JCCSTARTTIME/', $result)) {
478
+ $time = substr($event['event_start_time'], 0,5);
479
+ $event_string = str_replace($result, $time , $event_string );
480
+ }
481
+ // END of REMOVE
482
+ if (preg_match('/#_EDITEVENTLINK/', $result)) {
483
+ $link = "";
484
+ if(is_user_logged_in())
485
+ $link = "<a href=' ".get_bloginfo('url')."/wp-admin/edit.php?page=events-manager/events-manager.php&action=edit_event&event_id=".$event['event_id']."'>".__('Edit')."</a>";
486
+ $event_string = str_replace($result, $link , $event_string );
487
+ }
488
+ if (preg_match('/#_24HSTARTTIME/', $result)) {
489
+ $time = substr($event['event_start_time'], 0,5);
490
+ $event_string = str_replace($result, $time , $event_string );
491
+ }
492
+ if (preg_match('/#_24HENDTIME/', $result)) {
493
+ $time = substr($event['event_end_time'], 0,5);
494
+ $event_string = str_replace($result, $time , $event_string );
495
+ }
496
+
497
+ if (preg_match('/#_12HSTARTTIME/', $result)) {
498
+ $AMorPM = "AM";
499
+ $hour = substr($event['event_start_time'], 0,2);
500
+ $minute = substr($event['event_start_time'], 3,2);
501
+ if ($hour > 12) {
502
+ $hour = $hour -12;
503
+ $AMorPM = "PM";
504
+ }
505
+ $time = "$hour:$minute $AMorPM";
506
+ $event_string = str_replace($result, $time , $event_string );
507
+ }
508
+ if (preg_match('/#_12HENDTIME/', $result)) {
509
+ $AMorPM = "AM";
510
+ $hour = substr($event['event_end_time'], 0,2);
511
+ $minute = substr($event['event_end_time'], 3,2);
512
+ if ($hour > 12) {
513
+ $hour = $hour -12;
514
+ $AMorPM = "PM";
515
+ }
516
+ $time = "$hour:$minute $AMorPM";
517
+ $event_string = str_replace($result, $time , $event_string );
518
+ }
519
+
520
+ if (preg_match('/#_MAP/', $result)) {
521
+ $location = dbem_get_location($event['location_id']);
522
+ $map_div = dbem_single_location_map($location);
523
+ $event_string = str_replace($result, $map_div , $event_string );
524
+
525
+ }
526
+ if (preg_match('/#_ADDBOOKINGFORM/', $result)) {
527
+ $rsvp_is_active = get_option('dbem_gmap_is_active');
528
+ if ($event['event_rsvp']) {
529
+ $rsvp_add_module .= dbem_add_booking_form();
530
+ } else {
531
+ $rsvp_add_module .= "";
532
+ }
533
+ $event_string = str_replace($result, $rsvp_add_module , $event_string );
534
+ }
535
+ if (preg_match('/#_REMOVEBOOKINGFORM/', $result)) {
536
+ $rsvp_is_active = get_option('dbem_gmap_is_active');
537
+ if ($event['event_rsvp']) {
538
+ $rsvp_delete_module .= dbem_delete_booking_form();
539
+ } else {
540
+ $rsvp_delete_module .= "";
541
+ }
542
+ $event_string = str_replace($result, $rsvp_delete_module , $event_string );
543
+ }
544
+ if (preg_match('/#_AVAILABLESEATS/', $result)) {
545
+ $rsvp_is_active = get_option('dbem_gmap_is_active');
546
+ if ($event['event_rsvp']) {
547
+ $availble_seats .= dbem_get_available_seats($event['event_id']);
548
+ } else {
549
+ $availble_seats .= "";
550
+ }
551
+ $event_string = str_replace($result, $availble_seats , $event_string );
552
+ }
553
+ if (preg_match('/#_LINKEDNAME/', $result)) {
554
+ $events_page_id = get_option('dbem_events_page');
555
+ $event_page_link = get_permalink($events_page_id);
556
+ if (stristr($event_page_link, "?"))
557
+ $joiner = "&amp;";
558
+ else
559
+ $joiner = "?";
560
+ $event_string = str_replace($result, "<a href='".get_permalink($events_page_id).$joiner."event_id=".$event['event_id']."' title='".$event['event_name']."'>".$event['event_name']."</a>" , $event_string );
561
+ }
562
+ if (preg_match('/#_EVENTPAGEURL(\[(.+\)]))?/', $result)) {
563
+ $events_page_id = get_option('dbem_events_page');
564
+ if (stristr($event_page_link, "?"))
565
+ $joiner = "&amp;";
566
+ else
567
+ $joiner = "?";
568
+ $event_string = str_replace($result, get_permalink($events_page_id).$joiner."event_id=".$event['event_id'] , $event_string );
569
+ }
570
+ if (preg_match('/#_(NAME|NOTES|SEATS|EXCERPT)/', $result)) {
571
+ $field = "event_".ltrim(strtolower($result), "#_");
572
+ $field_value = $event[$field];
573
+
574
+ if ($field == "event_notes" || $field == "event_excerpt") {
575
+ /* Marcus Begin Edit */
576
+ if ($target == "html"){
577
+ //If excerpt, we use more link text
578
+ if($field == "event_excerpt"){
579
+ $matches = explode('<!--more-->', $event['event_notes']);
580
+ $field_value = $matches[0];
581
+ $field_value = apply_filters('dbem_notes_excerpt', $field_value);
582
+ }else{
583
+ $field_value = apply_filters('dbem_notes', $field_value);
584
+ }
585
+ //$field_value = apply_filters('the_content', $field_value); - chucks a wobbly if we do this.
586
+ }else{
587
+ if ($target == "map"){
588
+ $field_value = apply_filters('dbem_notes_map', $field_value);
589
+ } else {
590
+ if($field == "event_excerpt"){
591
+ $matches = explode('<!--more-->', $event['event_notes']);
592
+ $field_value = htmlentities($matches[0]);
593
+ $field_value = apply_filters('dbem_notes_rss', $field_value);
594
+ }else{
595
+ $field_value = apply_filters('dbem_notes_rss', $field_value);
596
+ }
597
+ $field_value = apply_filters('the_content_rss', $field_value);
598
+ }
599
+ }
600
+ /* Marcus End Edit */
601
+ } else {
602
+ if ($target == "html"){
603
+ $field_value = apply_filters('dbem_general', $field_value);
604
+ }else{
605
+ $field_value = apply_filters('dbem_general_rss', $field_value);
606
+ }
607
+ }
608
+ $event_string = str_replace($result, $field_value , $event_string );
609
+ }
610
+
611
+ if (preg_match('/#_(ADDRESS|TOWN|PROVINCE)/', $result)) {
612
+ $field = "location_".ltrim(strtolower($result), "#_");
613
+ $field_value = $event[$field];
614
+
615
+ if ($field == "event_notes") {
616
+ if ($target == "html")
617
+ $field_value = apply_filters('dbem_notes', $field_value);
618
+ else
619
+ if ($target == "map")
620
+ $field_value = apply_filters('dbem_notes_map', $field_value);
621
+ else
622
+ $field_value = apply_filters('dbem_notes_rss', $field_value);
623
+ } else {
624
+ if ($target == "html")
625
+ $field_value = apply_filters('dbem_general', $field_value);
626
+ else
627
+ $field_value = apply_filters('dbem_general_rss', $field_value);
628
+ }
629
+ $event_string = str_replace($result, $field_value , $event_string );
630
+ }
631
+
632
+ if (preg_match('/#_(LOCATION)$/', $result)) {
633
+ $field = "location_name";
634
+ $field_value = $event[$field];
635
+ if ($target == "html")
636
+ $field_value = apply_filters('dbem_general', $field_value);
637
+ else
638
+ $field_value = apply_filters('dbem_general_rss', $field_value);
639
+
640
+ $event_string = str_replace($result, $field_value , $event_string );
641
+ }
642
+ if (preg_match('/#_CONTACTNAME$/', $result)) {
643
+ $event['event_contactperson_id'] ? $user_id = $event['event_contactperson_id'] : $user_id = get_option('dbem_default_contact_person');
644
+ $name = dbem_get_user_name($user_id);
645
+ $event_string = str_replace($result, $name, $event_string );
646
+ }
647
+ if (preg_match('/#_CONTACTEMAIL$/', $result)) {
648
+ $event['event_contactperson_id'] ? $user_id = $event['event_contactperson_id'] : $user_id = get_option('dbem_default_contact_person');
649
+ $email = dbem_get_user_email($user_id);
650
+ $event_string = str_replace($result, dbem_ascii_encode($email), $event_string );
651
+ }
652
+ if (preg_match('/#_CONTACTPHONE$/', $result)) {
653
+ $event['event_contactperson_id'] ? $user_id = $event['event_contactperson_id'] : $user_id = get_option('dbem_default_contact_person');
654
+ $phone = dbem_get_user_phone($user_id);
655
+ $event_string = str_replace($result, dbem_ascii_encode($phone), $event_string );
656
+ }
657
+ if (preg_match('/#_(IMAGE)/', $result)) {
658
+
659
+ if($event['location_image_url'] != '')
660
+ $location_image = "<img src='".$event['location_image_url']."' alt='".$event['location_name']."'/>";
661
+ else
662
+ $location_image = "";
663
+ $event_string = str_replace($result, $location_image , $event_string );
664
+ }
665
+
666
+ if (preg_match('/#_(LOCATIONPAGEURL)/', $result)) {
667
+ $events_page_link = dbem_get_events_page(true, false);
668
+ if (stristr($events_page_link, "?"))
669
+ $joiner = "&amp;";
670
+ else
671
+ $joiner = "?";
672
+ $venue_page_link = $events_page_link.$joiner."location_id=".$event['location_id'];
673
+ $event_string = str_replace($result, $venue_page_link , $event_string );
674
+ }
675
+ // matches all PHP time placeholders for endtime
676
+ if (preg_match('/^#@[dDjlNSwzWFmMntLoYy]$/', $result)) {
677
+ $event_string = str_replace($result, mysql2date(ltrim($result, "#@"), $event['event_end_date']), $event_string );
678
+ }
679
+
680
+ // matches all PHP date placeholders
681
+ if (preg_match('/^#[dDjlNSwzWFmMntLoYy]$/', $result)) {
682
+ // echo "-inizio-";
683
+ $event_string = str_replace($result, mysql2date(ltrim($result, "#"), $event['event_start_date']),$event_string );
684
+ // echo $event_string;
685
+ }
686
+
687
+ // matches all PHP time placeholders
688
+ if (preg_match('/^#@[aABgGhHisueIOPTZcrU]$/', $result)) {
689
+ $event_string = str_replace($result, mysql2date(ltrim($result, "#@"), "2000-10-10 ".$event['event_end_time']),$event_string );
690
+ // echo $event_string;
691
+ }
692
+
693
+ if (preg_match('/^#[aABgGhHisueIOPTZcrU]$/', $result)) {
694
+ $event_string = str_replace($result, mysql2date(ltrim($result, "#"), "2000-10-10 ".$event['event_start_time']),$event_string );
695
+ //echo $event['event_start_time'];
696
+ //echo mysql2date('h:i A', '2010-10-10 23:35:00')."<br/>";
697
+ // echo $event_string;
698
+ }
699
+
700
+ /* Marcus Begin Edit*/
701
+ //Add a placeholder for categories
702
+ if (preg_match('/^#_CATEGORY$/', $result)) {
703
+ $category = (dbem_get_event_category($event['event_id']));
704
+ $event_string = str_replace($result, $category['category_name'], $event_string );
705
+ }
706
+ /* Marcus End Edit */
707
+
708
+ }
709
+
710
+ /* Marcus Begin Edit */
711
+ preg_match_all("/#@?_\{[A-Za-z0-9 -\/,\.\\\]+\}/", $format, $results);
712
+ foreach($results[0] as $result) {
713
+ if(substr($result, 0, 3 ) == "#@_"){
714
+ $date = 'event_end_date';
715
+ $offset = 4;
716
+ }else{
717
+ $date = 'event_start_date';
718
+ $offset = 3;
719
+ }
720
+ if( $date == 'event_end_date' && $event[$date] == $event['event_start_date'] ){
721
+ $event_string = str_replace($result, '', $event_string);
722
+ }else{
723
+ $event_string = str_replace($result, mysql2date(substr($result, $offset, (strlen($result)-($offset+1)) ), $event[$date]),$event_string );
724
+ }
725
+ }
726
+ /* Marcus End Edit */
727
+ /* Marcus Begin Edit */
728
+ //This is for the custom attributes
729
+ preg_match_all("/#_ATT\{.+?\}(\{.+?\})?/", $format, $results);
730
+ foreach($results[0] as $resultKey => $result) {
731
+ //Strip string of placeholder and just leave the reference
732
+ $attRef = substr( substr($result, 0, strpos($result, '}')), 6 );
733
+ $attString = $event['event_attributes'][$attRef];
734
+ if( trim($attString) == '' && $results[1][$resultKey] != '' ){
735
+ //Check to see if we have a second set of braces;
736
+ $attString = substr( $results[1][$resultKey], 1, strlen(trim($results[1][$resultKey]))-2 );
737
+ }
738
+ $event_string = str_replace($result, $attString ,$event_string );
739
+ }
740
+ /* Marcus End Edit */
741
+
742
+ return $event_string;
743
+
744
+ }
745
+
746
+ function dbem_date_to_unix_time($date) {
747
+ $unix_time = mktime(0, 0, 0, substr($date,5,2), substr($date,8,2), substr($date,0,4));
748
+ return $unix_time;
749
+ }
750
+ function dbem_sanitize_request( $value ) {
751
+ if( get_magic_quotes_gpc() )
752
+ $value = stripslashes( $value );
753
+
754
+ //check if this function exists
755
+ if( function_exists( "mysql_real_escape_string" ) ) {
756
+ $value = mysql_real_escape_string( $value );
757
+ //for PHP version < 4.3.0 use addslashes
758
+ } else {
759
+ $value = addslashes( $value );
760
+ }
761
+ return $value;
762
+ }
763
  ?>
events_manager.css CHANGED
@@ -1,102 +1,138 @@
1
- table#dbem-bookings-table tfoot td.booking-result {
2
- font-weight: bold;
3
- background:#6D6D6D url(../../../wp-admin/images/menu-bits.gif) repeat-x scroll left top;
4
- color: #eee;
5
- }
6
-
7
- table#dbem-bookings-table tfoot th {
8
- text-align: right;
9
- padding-right: 1em;
10
-
11
- }
12
-
13
- table.dbem-rsvp-form {
14
- width: 80%;
15
- }
16
- table.dbem-rsvp-form th {
17
- text-align: right;
18
- width: 35%;
19
- }
20
-
21
- table.dbem-rsvp-form td {
22
- padding-left: 1em;
23
- text-align: left;
24
- }
25
-
26
- div.dbem-rsvp-message {
27
- margin-bottom: 1em;
28
- background-color: #FDDD73;
29
- padding: 5px;
30
- border: 2px solid #FF9100;
31
- }
32
-
33
- a.bookingdelbutton {
34
- background: url("../../../wp-admin/images/xit.gif") no-repeat;
35
- font-size: 11px;
36
- text-indent: -9999px;
37
- height: 10px;
38
- width: 10px;
39
- overflow:hidden;
40
- position:absolute;
41
-
42
- }
43
- a.bookingdelbutton:hover {
44
- background: url("../../../wp-admin/images/xit.gif") no-repeat -10px;
45
-
46
- }
47
- /* Printable stuff */
48
- body#printable {
49
- font-family: Gill Sans, Helvetica, Arial, sans-serif;
50
- text-align: center;
51
- }
52
- body#printable #container {
53
- margin: 0 auto;
54
- width: 780px;
55
- text-align: left;
56
- }
57
- table#bookings-table {
58
- width: 600px;
59
- border-spacing: 0px;
60
-
61
- }
62
- table#bookings-table td {
63
- padding: 5px 0;
64
- }
65
- table#bookings-table td.seats-number {
66
- text-align: right;
67
- padding-right: 20px;
68
- }
69
- table#bookings-table th {
70
- text-align: left;
71
- margin-left: 5px;
72
- }
73
- table#bookings-table tr#booked-seats td{
74
- border-top: 2px solid #999;
75
- }
76
-
77
- table#bookings-table td.total-label {
78
- text-align: right;
79
- }
80
-
81
- table#bookings-table tr#booked-seats td.seats-number, table#bookings-table tr#available-seats td.seats-number {
82
- font-weight: bold;
83
- }
84
-
85
- p#recurrence_warning {
86
- border: 2px solid #FD0000;
87
- background: #FF7146;
88
- color: #fff;
89
- font-weight: bold;
90
- padding: 5px;
91
- }
92
- div#icon-events{
93
- background:url('images/calendar-32.png') no-repeat center;
94
- }
95
-
96
- table#dbem-location-data th {
97
- text-align: right;
98
- width: 50px;
99
- }
100
- #dbem-location-map img {
101
- max-width: none;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  }
1
+ table#dbem-bookings-table tfoot td.booking-result {
2
+ font-weight: bold;
3
+ background:#6D6D6D url(../../../wp-admin/images/menu-bits.gif) repeat-x scroll left top;
4
+ color: #eee;
5
+ }
6
+
7
+ table#dbem-bookings-table tfoot th {
8
+ text-align: right;
9
+ padding-right: 1em;
10
+
11
+ }
12
+
13
+ table.dbem-rsvp-form {
14
+ width: 80%;
15
+ }
16
+ table.dbem-rsvp-form th {
17
+ text-align: right;
18
+ width: 35%;
19
+ }
20
+
21
+ table.dbem-rsvp-form td {
22
+ padding-left: 1em;
23
+ text-align: left;
24
+ }
25
+
26
+ div.dbem-rsvp-message {
27
+ margin-bottom: 1em;
28
+ background-color: #FDDD73;
29
+ padding: 5px;
30
+ border: 2px solid #FF9100;
31
+ }
32
+
33
+ a.bookingdelbutton {
34
+ background: url("../../../wp-admin/images/xit.gif") no-repeat;
35
+ font-size: 11px;
36
+ text-indent: -9999px;
37
+ height: 10px;
38
+ width: 10px;
39
+ overflow:hidden;
40
+ position:absolute;
41
+
42
+ }
43
+ a.bookingdelbutton:hover {
44
+ background: url("../../../wp-admin/images/xit.gif") no-repeat -10px;
45
+
46
+ }
47
+ /* Printable stuff */
48
+ body#printable {
49
+ font-family: Gill Sans, Helvetica, Arial, sans-serif;
50
+ text-align: center;
51
+ }
52
+ body#printable #container {
53
+ margin: 0 auto;
54
+ width: 780px;
55
+ text-align: left;
56
+ }
57
+ table#bookings-table {
58
+ width: 600px;
59
+ border-spacing: 0px;
60
+
61
+ }
62
+ table#bookings-table td {
63
+ padding: 5px 0;
64
+ }
65
+ table#bookings-table td.seats-number {
66
+ text-align: right;
67
+ padding-right: 20px;
68
+ }
69
+ table#bookings-table th {
70
+ text-align: left;
71
+ margin-left: 5px;
72
+ }
73
+ table#bookings-table tr#booked-seats td{
74
+ border-top: 2px solid #999;
75
+ }
76
+
77
+ table#bookings-table td.total-label {
78
+ text-align: right;
79
+ }
80
+
81
+ table#bookings-table tr#booked-seats td.seats-number, table#bookings-table tr#available-seats td.seats-number {
82
+ font-weight: bold;
83
+ }
84
+
85
+ p#recurrence_warning {
86
+ border: 2px solid #FD0000;
87
+ background: #FF7146;
88
+ color: #fff;
89
+ font-weight: bold;
90
+ padding: 5px;
91
+ }
92
+ div#icon-events{
93
+ background:url('images/calendar-32.png') no-repeat center;
94
+ }
95
+
96
+ table#dbem-location-data th {
97
+ text-align: right;
98
+ width: 50px;
99
+ }
100
+ #dbem-location-map img {
101
+ max-width: none;
102
+ }
103
+
104
+
105
+ table.dbem-calendar-table td {
106
+ padding: 2px 4px;
107
+ text-align: center;
108
+ }
109
+ table.dbem-calendar.table tr.days-names {
110
+ font-weight: bold;
111
+ }
112
+ table.dbem-calendar-table td.eventless-pre, .dbem-calendar td.eventless-post {
113
+ color: #ccc;
114
+ }
115
+ table.dbem-calendar-table td.eventful a, table.dbem-calendar-table td.eventful-today a {
116
+ font-weight: bold;
117
+ color: #FD7E29;
118
+ }
119
+ table.dbem-calendar-table td.eventless-today {
120
+ background-color: #CFCFCF;
121
+ }
122
+ table.dbem-calendar-table thead {
123
+ font-size: 120%;
124
+ font-weight: bold;
125
+ }
126
+ table.fullcalendar {
127
+ border-collapse: collapse;
128
+ }
129
+ table.fullcalendar td {
130
+ text-align: left;
131
+ width: 50px;
132
+ height: 50px;
133
+ border: 1px solid #888;
134
+ }
135
+ .dbem-calendar-full ul {
136
+ font-size: 80%;
137
+ list-style: none;
138
  }
images/baloon.png ADDED
Binary file
langs/dbem-it_IT.mo CHANGED
Binary file
langs/dbem-it_IT.po CHANGED
@@ -2,7 +2,7 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: events-manager\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2009-03-30 19:56+0100\n"
6
  "PO-Revision-Date: \n"
7
  "Last-Translator: Davide Benini <cno@cnomania.it>\n"
8
  "Language-Team: \n"
@@ -93,715 +93,792 @@ msgstr "ogni %s settimane"
93
  msgid "every %s months"
94
  msgstr "ogni %s mesi"
95
 
96
- #: dbem_events.php:6
97
- #: dbem_events.php:175
98
  msgid "Insert New Event"
99
  msgstr "Inserisci un nuovo evento"
100
 
101
- #: dbem_events.php:127
102
  msgid "New recurrent event inserted!"
103
  msgstr "Nuovo evento ricorrente inserito!"
104
 
105
- #: dbem_events.php:131
106
  msgid "New event successfully inserted!"
107
  msgstr "Nuovo evento inserito!"
108
 
109
- #: dbem_events.php:140
110
  msgid "Recurrence updated!"
111
  msgstr "Ricorrenza aggiornata!"
112
 
113
- #: dbem_events.php:142
114
  msgid "Something went wrong with the recurrence update..."
115
  msgstr "Caspita, si è verificato un problema durante l'aggiornamento della ricorrenza..."
116
 
117
- #: dbem_events.php:150
118
  msgid "updated"
119
  msgstr "aggiornato"
120
 
121
- #: dbem_events.php:167
122
  msgid "Ach, there's a problem here:"
123
  msgstr "Houston, abbiamo un problema:"
124
 
125
- #: dbem_events.php:178
 
126
  msgid "Edit Event"
127
  msgstr "Modifica l'evento"
128
 
129
- #: dbem_events.php:193
130
- #: dbem_events.php:969
131
- #: dbem_events.php:1146
132
  msgid "Reschedule"
133
  msgstr "Riprogramma"
134
 
135
- #: dbem_events.php:210
136
  msgid "Past Events"
137
  msgstr "Eventi passati"
138
 
139
- #: dbem_events.php:213
140
  msgid "All Events"
141
  msgstr "Tutti gli eventi"
142
 
143
- #: dbem_events.php:216
144
  msgid "Future Events"
145
  msgstr "Eventi futuri"
146
 
147
- #: dbem_events.php:250
148
  msgid "Event Manager Options"
149
  msgstr "Opzioni di Events Manager"
150
 
151
- #: dbem_events.php:252
152
- #: dbem_events.php:254
153
  msgid "Events page"
154
  msgstr "Pagina degli eventi"
155
 
156
- #: dbem_events.php:254
157
  msgid "This option allows you to select which page to use as an events page"
158
  msgstr "Questa opzione consente di selezionare quale pagina utilizzare come pagina degli eventi."
159
 
160
- #: dbem_events.php:255
 
 
 
 
 
 
 
 
161
  msgid "Display calendar in events page?"
162
  msgstr "Mostra il calendario nella pagina eventi?"
163
 
164
- #: dbem_events.php:255
165
  msgid "This options allows to display the calendar in the events page, instead of the default list. It is recommended not to display both the calendar widget and a calendar page."
166
  msgstr "Questa opzione consente di visualizzare il calndario nella pagina degli eventi, anziché la lista predefinita. Si raccomanda di non visualizzare contemporaneamente il calendario nel widget e sulla pagina."
167
 
168
- #: dbem_events.php:257
169
  msgid "Events format"
170
  msgstr "Formato eventi"
171
 
172
- #: dbem_events.php:260
 
 
 
 
 
 
 
 
173
  msgid "Default event list format"
174
  msgstr "Formato predefinito della lista eventi"
175
 
176
- #: dbem_events.php:260
177
- msgid "The format of any events in a list.<br/>Insert one or more of the following placeholders: <code>#_NAME</code>, <code>#_LOCATION</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, <code>#_NOTES</code>.<br/> Use <code>#_LINKEDNAME</code> for the event name with a link to the given event page.<br/> Use <code>#_EVENTPAGEURL</code> to print the event page URL and make your own customised links.<br/> Use <code>#_LOCATIONPAGEURL</code> to print the location page URL and make your own customised links.<br/>To insert date and time values, use <a href=\"http://www.php.net/manual/en/function.date.php\">PHP time format characters</a> with a <code>#</code> symbol before them, i.e. <code>#m</code>, <code>#M</code>, <code>#j</code>, etc.<br/> For the end time, put <code>#@</code> in front of the character, ie. <code>#@h</code>, <code>#@i</code>, etc.<br/> Feel free to use HTML tags as <code>li</code>, <code>br</code> and so on."
178
- msgstr "Il formato degli eventi in una lista.<br/>Inserire uno o più dei seguenti segnaposto: <code>#_NAME</code>, <code>#_LOCATION</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, <code>#_NOTES</code>.<br/> Utilizzare <code>#_LINKEDNAME</code> per visualizzare il nome dell'evento con un link alla pagina relativa.<br/> Utilizzare <code>#_EVENTPAGEURL</code> per ottenere l'URL della pagina e creare da un proprio link personalizzzato.<br/> Utilizzare <code>#_LOCATIONPAGEURL</code> per ottenere l'URL della pagina del luogo e creare un link personalizzato.<br/>Per inserire valori temporali, utilizzare i <a href=\"http://www.php.net/manual/it/function.date.php\">caratteri dells stringa formato PHP</a> anteponendo il carattere <code>#</code> , ad esempio <code>#m</code>, <code>#M</code>, <code>#j</code>, etc.<br/> Per l'ora di fine dell'evento anteporre il carattere <code>#@</code>, ad esempio <code>#@h</code>, <code>#@i</code>, etc.<br/> Utilizzare liberamente i tag HTML come <code>li</code>, <code>br</code> e così via."
 
 
 
 
 
 
 
 
179
 
180
- #: dbem_events.php:261
181
  msgid "Single event page title format"
182
  msgstr "Formato del titolo della pagina Evento singolo"
183
 
184
- #: dbem_events.php:261
185
  msgid "The format of a single event page title. Follow the previous formatting instructions."
186
  msgstr "Il formato della pagina di un singolo evento. Seguire le istruzioni di formattazione precedenti."
187
 
188
- #: dbem_events.php:262
189
  msgid "Default single event format"
190
  msgstr "Fomato predefinito di un singolo evento"
191
 
192
- #: dbem_events.php:262
193
  msgid "The format of a single event page.<br/>Follow the previous formatting instructions. <br/>Use <code>#_MAP</code> to insert a map.<br/>Use <code>#_CONTACTNAME</code>, <code>#_CONTACTEMAIL</code>, <code>#_CONTACTPHONE</code> to insert respectively the name, e-mail address and phone number of the designated contact person. <br/>Use <code>#_ADDBOOKINGFORM</code> to insert a form to allow the user to respond to your events reserving one or more places (RSVP).<br/> Use <code>#_REMOVEBOOKINGFORM</code> to insert a form where users, inserting their name and e-mail address, can remove their bookings."
194
  msgstr "Il formato delle pagine Evento singolo.<br/>Seguire le istruzioni di formattazione precedenti. <br/>Utilizzare <code>#_MAP</code> per inserire una mappa.<br/>Utilizzare <code>#_CONTACTNAME</code>, <code>#_CONTACTEMAIL</code>, <code>#_CONTACTPHONE</code> per inserire rispettivamente nome, e-mail e telefono del responsabile dell'evento. <br/>Utilizzare <code>#_ADDBOOKINGFORM</code> per inserire un modulo di registrazione per l'evento (RSVP).<br/> Utilizzare <code>#_REMOVEBOOKINGFORM</code> per inserire un modulo per cancellare le registrazioni."
195
 
196
- #: dbem_events.php:263
197
- msgid "Show events page in lists?"
198
- msgstr "Mostrare la pagina degli eventi nelle liste?"
199
-
200
- #: dbem_events.php:263
201
- msgid "Check this option if you want the events page to appear together with other pages in pages lists."
202
- msgstr "Selezionare questa opzione se si vuole che la pagina eventi appaia"
203
-
204
- #: dbem_events.php:264
205
  msgid "Events page title"
206
  msgstr "Titolo della pagina degli eventi"
207
 
208
- #: dbem_events.php:264
209
  msgid "The title on the multiple events page."
210
  msgstr "Il titolo della pagina che contiene più eventi."
211
 
212
- #: dbem_events.php:265
213
  msgid "No events message"
214
  msgstr "Messaggio Nessun evento"
215
 
216
- #: dbem_events.php:265
217
  msgid "The message displayed when no events are available."
218
  msgstr "Il messaggio visualizzato quando non ci sono eventi disponibili."
219
 
220
- #: dbem_events.php:266
221
- msgid "Map text format"
222
- msgstr "Formato del testo della mappa"
223
 
224
- #: dbem_events.php:266
225
- msgid "The format the text appearing in the event page map cloud.<br/>Follow the previous formatting instructions."
226
- msgstr "Il formato della testo che appare nel fumetto della mappa della pagina Evento singolo. Seguire le istruzioni di formattazione precedenti."
227
 
228
- #: dbem_events.php:270
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
229
  msgid "Locations format"
230
  msgstr "Formato del luogo"
231
 
232
- #: dbem_events.php:272
233
  msgid "Single location page title format"
234
  msgstr "Formato del titolo della pagina Luogo singolo"
235
 
236
- #: dbem_events.php:272
237
  msgid "The format of a single location page title.<br/>Follow the previous formatting instructions."
238
  msgstr "Il formato del titolo della pagina di un singolo evento.<br/>Seguire le istruzioni di formattazione precedenti."
239
 
240
- #: dbem_events.php:273
241
  msgid "Default single location page format"
242
  msgstr "Formato predefinito della pagina Luogo singolo"
243
 
244
- #: dbem_events.php:273
245
  msgid "The format of a single location page.<br/>Insert one or more of the following placeholders: <code>#_NAME</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, <code>#_DESCRIPTION</code>.<br/> Use <code>#_MAP</code> to display a map of the event location, and <code>#_IMAGE</code> to display an image of the location.<br/> Use <code>#_NEXTEVENTS</code> to insert a list of the upcoming events, <code>#_PASTEVENTS</code> for a list of past events, <code>#_ALLEVENTS</code> for a list of all events taking place in this location."
246
  msgstr "Il formato di una pagina Luogo singolo.<br/>Inserire uno o più dei seguenti segnaposto: <code>#_NAME</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, <code>#_DESCRIPTION</code>.<br/> Utilizzare <code>#_MAP</code> per visualizzare una mappa del luogo dell'evento, e <code>#_IMAGE</code> per visualizzare un'immagine del luogo.<br/> Utilizzare <code>#_NEXTEVENTS</code> per inserire un elenco degli eventi futuri, <code>#_PASTEVENTS</code> per un elenco degli eventi passati, <code>#_ALLEVENTS</code> per un elenco di tutti gli eventi che si tengono in un luogo."
247
 
248
- #: dbem_events.php:274
249
  msgid "Default location baloon format"
250
  msgstr "Fomato predefinito del fumetto predefinito di un luogo"
251
 
252
- #: dbem_events.php:274
253
  msgid "The format of of the text appearing in the baloon describing the location in the map.<br/>Insert one or more of the following placeholders: <code>#_NAME</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, <code>#_DESCRIPTION</code> or <code>#_IMAGE</code>."
254
  msgstr "Il formato del testo che appare nel fumetto che descrive l'ubicazione sulla mappa.<br/>Inserire uno o più dei seguenti segnaposto: <code>#_NAME</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, <code>#_DESCRIPTION</code> o <code>#_IMAGE</code>."
255
 
256
- #: dbem_events.php:275
257
  msgid "Default location event list format"
258
  msgstr "Formato predefinito della lista eventi del luogo"
259
 
260
- #: dbem_events.php:275
261
  msgid "The format of the events the list inserted in the location page through the <code>#_NEXTEVENTS</code>, <code>#_PASTEVENTS</code> and <code>#_ALLEVENTS</code> element. <br/> Follow the events formatting instructions"
262
  msgstr "Il formato dell'evento nell'elenco inserito nella pagina del luogo con gli elementi <code>#_NEXTEVENTS</code>, <code>#_PASTEVENTS</code> e <code>#_ALLEVENTS</code>. <br/> Seguire le istruzioni di formattazione precedenti."
263
 
264
- #: dbem_events.php:276
265
  msgid "Default no events message"
266
  msgstr "Messaggio Nessun evento "
267
 
268
- #: dbem_events.php:276
269
  msgid "The message to be displayed in the list generated by <code>#_NEXTEVENTS</code>, <code>#_PASTEVENTS</code> and <code>#_ALLEVENTS</code> when no events are available."
270
  msgstr "Il messaggio da visualizzare nell'elenco generato da <code>#_NEXTEVENTS</code>, <code>#_PASTEVENTS</code> e <code>#_ALLEVENTS</code> quando non sono disponibili eventi."
271
 
272
- #: dbem_events.php:281
273
  msgid "RSS feed format"
274
  msgstr "Formato del feed RSS"
275
 
276
- #: dbem_events.php:284
277
  msgid "RSS main title"
278
  msgstr "Titolo principale dell'RSS"
279
 
280
- #: dbem_events.php:284
281
  msgid "The main title of your RSS events feed."
282
  msgstr "Il titolo principale del feed RSS degli eventi."
283
 
284
- #: dbem_events.php:285
285
  msgid "RSS main description"
286
  msgstr "Descrizione principale dell'RSS"
287
 
288
- #: dbem_events.php:285
289
  msgid "The main description of your RSS events feed."
290
  msgstr "La descrizione principale del feed RSS degli eventi."
291
 
292
- #: dbem_events.php:286
293
  msgid "RSS title format"
294
  msgstr "Formato del titolo dell'RSS"
295
 
296
- #: dbem_events.php:286
297
  msgid "The format of the title of each item in the events RSS feed."
298
  msgstr "Il formato del titolo di ciascun elemento nel feed RSS."
299
 
300
- #: dbem_events.php:287
301
  msgid "RSS description format"
302
  msgstr "Formato della descrizione nell'RSS"
303
 
304
- #: dbem_events.php:287
305
  msgid "The format of the description of each item in the events RSS feed. Follow the previous formatting instructions."
306
  msgstr "Il formato della descrizione di ogni singolo elemento nel feed RSS. Seguire le istruzioni di formattazione precedenti."
307
 
308
- #: dbem_events.php:290
309
  msgid "Maps and geotagging"
310
  msgstr "Mappe e geotagging"
311
 
312
- #: dbem_events.php:295
313
  msgid "Enable Google Maps integration?"
314
  msgstr "Abilitare l'integrazione con Google Maps?"
315
 
316
- #: dbem_events.php:297
317
  #: dbem_UI_helpers.php:68
318
  msgid "Yes"
319
  msgstr "Sì"
320
 
321
- #: dbem_events.php:298
322
  #: dbem_UI_helpers.php:69
323
  msgid "No"
324
  msgstr "No"
325
 
326
- #: dbem_events.php:299
327
  msgid "Check this option to enable Goggle Map integration."
328
  msgstr "Selezionare questa opzione per abilitare l'integrazione con Google Maps."
329
 
330
- #: dbem_events.php:303
331
  msgid "Google Maps API Key"
332
  msgstr "Chiave API di Google Maps"
333
 
334
- #: dbem_events.php:303
335
  #, php-format
336
  msgid "To display Google Maps you need a Google Maps API key. Don't worry, it's free, you can get one <a href='%s'>here</a>."
337
  msgstr "Per visualizzare una mappa di Google Maps è necessaria una chiave API di Google Maps. Non preoccupatevi, è gratuita, è sufficiente andare su <a href='%s'>questa pagina</a>."
338
 
339
- #: dbem_events.php:307
 
 
 
 
 
 
 
 
340
  msgid "RSVP and bookings"
341
  msgstr "RSVP e prenotazioni"
342
 
343
- #: dbem_events.php:310
344
  msgid "Default contact person"
345
  msgstr "Responsabile degli eventi predefinito"
346
 
347
- #: dbem_events.php:310
348
  msgid "Select the default contact person. This user will be employed whenever a contact person is not explicitly specified for an event"
349
  msgstr "Selezionare il respondsponsabile predefinito degli eventi. Quando non verrà indicato esplicitamente un reponsabile per un evento, verrà utilizzato questo utente."
350
 
351
- #: dbem_events.php:311
352
  msgid "Enable the RSVP e-mail notifications?"
353
  msgstr "Abilitare le notifiche e-mail RSVP?"
354
 
355
- #: dbem_events.php:311
356
  msgid "Check this option if you want to receive an email when someone books places for your events."
357
  msgstr "Selezionare questa opzione se si vuole ricevere un'e-mail quando qualcuno prenota posti per un'evento."
358
 
359
- #: dbem_events.php:312
360
- #: dbem_events.php:313
361
  msgid "Contact person email format"
362
  msgstr "Formato dell'e-mail inviata al responsabile"
363
 
364
- #: dbem_events.php:312
365
- msgid "The format or the email which will be sent to the contact person. Follow the events formatting instructions. <br/>Use <code>#_RESPNAME</code>, <code>#_RESPEMAIL</code> and <code>#_RESPPHONE</code> to display respectively the name, e-mail, address and phone of the respondent.<br/>Use <code>#_SPACES</code> to display the number of spaces reserved by the respondent.<br/> Use <code>#_BOOKEDSEATS</code> and <code>#_AVAILABLESEATS</code> to display respectively the number of booked and available seats."
366
- msgstr "Il formato del'email cje verrà inviata al reponsabile.<br/>Seguire le istruzioni di formattazione precedenti. <br/>Utilizzare <code>#_RESPNAME</code>, <code>#_RESPEMAIL</code> e <code>#_RESPPHONE</code> per inserire rispettivamente il nome, l'email e l'indirizzo dell'utente che ha prenotato.<br/>Utilizzare <code>#_SPACES</code> per inserire il numero di posti prenotati dall'utente.<br/> Utilizzare <code>#_BOOKEDSEATS</code> e <code>#_AVAILABLESEATS</code> per inserire il numero di posti prenotati e liberi."
367
 
368
- #: dbem_events.php:313
369
- msgid "The format or the email which will be sent to reposdent. Follow the events formatting instructions. <br/>Use <code>#_RESPNAME</code> to display the name of the respondent.<br/>Use <code>#_CONTACTNAME</code> and <code>#_CONTACTMAIL</code> a to display respectively the name and e-mail of the contact person.<br/>Use <code>#_SPACES</code> to display the number of spaces reserved by the respondent."
370
  msgstr "Il formato dell'e-mail che verrà inviata all'utente che prenota. Seguire le istruzioni di formattazione precedenti. <br/>Utilizzare <code>#_RESPNAME</code> per visualizzare il nome dell'utente che prenota.<br/>Utilizzare <code>#_CONTACTNAME</code> e <code>#_CONTACTMAIL</code> per inserire rispettivamente il nome e l'e-mail del responsabile dell'evento.<br/>Utilizzare <code>#_SPACES</code> per visualizzare informazioni relative ai posti prenotato."
371
 
372
- #: dbem_events.php:314
373
  msgid "Notification sender name"
374
  msgstr "Nome del mittente della notifica"
375
 
376
- #: dbem_events.php:314
377
  msgid "Insert the display name of the notification sender."
378
  msgstr "Inserire il nome del mittente che verrà visualizzato."
379
 
380
- #: dbem_events.php:315
381
  msgid "Notification sender address"
382
  msgstr "Indirizzo del mittente della notifica"
383
 
384
- #: dbem_events.php:315
385
  msgid "Insert the address of the notification sender. It must corresponds with your gmail account user"
386
  msgstr "Inserire l'indirizzo del mittente della notifica. Se si utilizza GMail, deve corrispondere al nome utente Gmail"
387
 
388
- #: dbem_events.php:316
389
  msgid "Default notification receiver address"
390
  msgstr "Indirizzo di ricezione delle notifiche predefinito"
391
 
392
- #: dbem_events.php:316
393
  msgid "Insert the address of the receiver of your notifications"
394
  msgstr "Inserire l'indirizzo del destinatario delle notifiche"
395
 
396
- #: dbem_events.php:317
397
  msgid "The port through which you e-mail notifications will be sent. Make sure the firewall doesn't block this port"
398
  msgstr "La porta utilizzata per inviare le notifiche via e-mail. Accertarsi che la porta non sia bloccata da un firewall"
399
 
400
- #: dbem_events.php:318
401
  msgid "Mail sending method"
402
  msgstr "Metodo di invio delle e-mail"
403
 
404
- #: dbem_events.php:318
405
  msgid "PHP mail function"
406
  msgstr "Funzione mail di PHP"
407
 
408
- #: dbem_events.php:318
409
  msgid "Select the method to send email notification."
410
  msgstr "Selezionare il metoto per inviare le notifiche e-mail"
411
 
412
- #: dbem_events.php:319
413
  msgid "Use SMTP authentication?"
414
  msgstr "Utilizzare l'autenticazione SMTP?"
415
 
416
- #: dbem_events.php:319
417
  msgid "SMTP authenticatio is often needed. If you use GMail, make sure to set this parameter to Yes"
418
  msgstr "Spesso è necessario utilizzare l'autenticazione SMTP. Se si utilizza GMail, impostare questo parametro su Sì."
419
 
420
- #: dbem_events.php:320
421
  msgid "The SMTP host. Usually it corresponds to 'localhost'. If you use GMail, set this value to 'ssl://smtp.gmail.com:465'."
422
  msgstr "L'host SMTP. Generalmente corrisponde a 'localhost'. Se si utilizza GMail, impostare questo valore su 'ssl://smtp.gmail.com:465'."
423
 
424
- #: dbem_events.php:321
425
  msgid "SMTP username"
426
  msgstr "Nome utente SMTP"
427
 
428
- #: dbem_events.php:321
429
  msgid "Insert the username to be used to access your SMTP server."
430
  msgstr "Inserire il nome utente da utilizzare per l'accesso al server SMTP."
431
 
432
- #: dbem_events.php:322
433
  msgid "SMTP password"
434
  msgstr "PAssword SMTP"
435
 
436
- #: dbem_events.php:322
437
  msgid "Insert the password to be used to access your SMTP server"
438
  msgstr "Inserire la password da utilizzare per accedere al proprio server SMTP."
439
 
440
- #: dbem_events.php:328
441
  msgid "Images size"
442
  msgstr "Dimensioni immagini"
443
 
444
- #: dbem_events.php:330
445
  msgid "Maximum width (px)"
446
  msgstr "Larghezza massima (px)"
447
 
448
- #: dbem_events.php:330
449
  msgid "The maximum allowed width for images uploades"
450
  msgstr "La larghezza massima consentita per le immagini caricate"
451
 
452
- #: dbem_events.php:331
453
  msgid "Maximum height (px)"
454
  msgstr "Altezza massimaa (px)"
455
 
456
- #: dbem_events.php:331
457
  msgid "The maximum allowed width for images uploaded, in pixels"
458
  msgstr "La larghezza massima delle immagini caricate, in pixel"
459
 
460
- #: dbem_events.php:332
461
  msgid "Maximum size (bytes)"
462
  msgstr "Dimensioni massime (byte)"
463
 
464
- #: dbem_events.php:332
465
  msgid "The maximum allowed size for images uploaded, in pixels"
466
  msgstr "La dimensione massima consentita per le immmagini, in pixel"
467
 
468
- #: dbem_events.php:339
469
  msgid "Save Changes"
470
  msgstr "Salva le modifiche"
471
 
472
- #: dbem_events.php:821
473
  #, php-format
474
  msgid ""
475
- "<p>Hey, <strong>%s</strong>, welcome to <strong>Events Manager</strong>! We hope you like it around here.</p> \n"
476
- "\t<p>Now it's time to insert events lists through <a href='%s' title='Widgets page'>widgets</a>, <a href='%s' title='Template tags documentation'>template tags</a> or <a href='%s' title='Shortcodes documentation'>shortcodes</a>.</p>\n"
477
- "\t<p>By the way, have you taken a look at the <a href='%s' title='Change settings'>Settings page</a>? That's where you customize the way events and locations are displayed.</p>\n"
478
  "\t<p>What? Tired of seeing this advice? I hear you, <a href='%s' title='Don't show this advice again'>click here</a> and you won't see this again!</p>"
479
  msgstr ""
480
- "<p>Hey, <strong>%s</strong>, <strong>Events Manager</strong> ti dà il benvenuto a bordo! </p> \n"
481
- "\t<p>Ora è il momento di inserire un elenco degli eventi con <a href='%s' title='Pagina widget'>widgets</a>, <a href='%s' title='Template tag, documentazione'>template tag</a> o <a href='%s' title='Shortcode, documentaizone'>shortcode</a>.</p>\n"
482
- "\t<p>Dimenticavo, hai dato un'occhiata alla <a href='%s' title='Change settings'>pagina delle Impostazioni</a>? Troverai un sacco di parametri per ottimizzare la visualizzazione degli eventi.</p>\n"
483
  "\t<p>Cosa? Stufo di questa pappardella? Capisco, <a href='%s' title='Non mostrare più questo avviso'>fai clic qui</a> per non vedere più questo avviso.</p>"
484
 
485
- #: dbem_events.php:864
486
  msgid "New Event ..."
487
  msgstr "Nuovo evento..."
488
 
489
- #: dbem_events.php:868
490
- #: dbem_events.php:873
491
  #: dbem_widgets.php:90
492
  msgid "Past events"
493
  msgstr "Eventi passati"
494
 
495
- #: dbem_events.php:869
496
- #: dbem_events.php:874
497
  #: dbem_widgets.php:89
498
  msgid "All events"
499
  msgstr "Tutti gli eventi"
500
 
501
- #: dbem_events.php:870
502
- #: dbem_events.php:875
503
  #: dbem_widgets.php:88
504
  msgid "Future events"
505
  msgstr "Eventi futuri"
506
 
507
- #: dbem_events.php:882
508
  msgid "Total"
509
  msgstr "Totali"
510
 
511
- #: dbem_events.php:889
512
  msgid "Bulk Actions"
513
  msgstr "Azioni "
514
 
515
- #: dbem_events.php:890
516
  msgid "Delete selected"
517
  msgstr "Elimina selezionati"
518
 
519
- #: dbem_events.php:893
520
  msgid "Apply"
521
  msgstr "Applica"
522
 
523
- #: dbem_events.php:905
524
  msgid "Filter"
525
  msgstr "Filtro"
526
 
527
- #: dbem_events.php:920
528
- #: dbem_events.php:1196
529
- #: dbem_events.php:1514
530
- #: dbem_locations.php:225
531
- #: dbem_locations.php:233
532
  #: dbem_people.php:90
533
  #: dbem_rsvp.php:18
534
- #: dbem_rsvp.php:52
 
 
535
  msgid "Name"
536
  msgstr "Nome"
537
 
538
- #: dbem_events.php:921
539
- #: dbem_events.php:1249
540
- #: dbem_events.php:1514
541
  msgid "Location"
542
  msgstr "Luogo"
543
 
544
- #: dbem_events.php:924
545
  msgid "Date and time"
546
  msgstr "Giorno e ora"
547
 
548
- #: dbem_events.php:936
549
  msgid "D d M Y"
550
  msgstr "D d M Y"
551
 
552
- #: dbem_events.php:1062
 
 
 
 
 
 
 
 
 
553
  msgid "Daily"
554
  msgstr "Quotidiana"
555
 
556
- #: dbem_events.php:1062
557
  msgid "Weekly"
558
  msgstr "Settimanale"
559
 
560
- #: dbem_events.php:1062
561
  msgid "Monthly"
562
  msgstr "Mensile"
563
 
564
- #: dbem_events.php:1063
565
  msgid "Mon"
566
  msgstr "Lun"
567
 
568
- #: dbem_events.php:1063
569
  msgid "Tue"
570
  msgstr "Mar"
571
 
572
- #: dbem_events.php:1063
573
  msgid "Wed"
574
  msgstr "Mer"
575
 
576
- #: dbem_events.php:1063
577
  msgid "Thu"
578
  msgstr "Gio"
579
 
580
- #: dbem_events.php:1063
581
  msgid "Fri"
582
  msgstr "Ven"
583
 
584
- #: dbem_events.php:1063
585
  msgid "Sat"
586
  msgstr "Sab"
587
 
588
- #: dbem_events.php:1063
589
  msgid "Sun"
590
  msgstr "Dom"
591
 
592
- #: dbem_events.php:1065
593
  msgid "first"
594
  msgstr "primo"
595
 
596
- #: dbem_events.php:1065
597
  msgid "second"
598
  msgstr "secondo"
599
 
600
- #: dbem_events.php:1065
601
  msgid "third"
602
  msgstr "terzo"
603
 
604
- #: dbem_events.php:1065
605
  msgid "fourth"
606
  msgstr "quarto"
607
 
608
- #: dbem_events.php:1065
609
  msgid "last"
610
  msgstr "ultimo"
611
 
612
- #: dbem_events.php:1078
613
  msgid "WARNING: This is a recurrence."
614
  msgstr "ATTENZIONE: questa è una ricorrenza."
615
 
616
- #: dbem_events.php:1079
617
  msgid "Modifying these data all the events linked to this recurrence will be rescheduled"
618
  msgstr "Se si modificano i dati tutti gli eventi collegati a questa ricorrenza verranno riprogrammati"
619
 
620
- #: dbem_events.php:1082
621
  msgid "WARNING: This is a recurring event."
622
  msgstr "ATTENZIONE: questo è un'evento ricorrente"
623
 
624
- #: dbem_events.php:1083
625
  msgid "If you change these data and save, this will become an independent event."
626
  msgstr "Se si cambiano questi dati e si effettua un salvataggio, questo evento diverrà indipendente."
627
 
628
- #: dbem_events.php:1095
629
  msgid "Recurrence"
630
  msgstr "Ricorrenza"
631
 
632
- #: dbem_events.php:1106
633
  msgid "Repeated event"
634
  msgstr "Eventi ripetuti"
635
 
636
- #: dbem_events.php:1113
637
- #: dbem_events.php:1128
638
  msgid "Every"
639
  msgstr "Ogni"
640
 
641
- #: dbem_events.php:1115
642
  msgid "day"
643
  msgstr "giorno"
644
 
645
- #: dbem_events.php:1116
646
  msgid "days"
647
  msgstr "giorni"
648
 
649
- #: dbem_events.php:1117
650
  msgid "week"
651
  msgstr "settimana"
652
 
653
- #: dbem_events.php:1118
654
  msgid "weeks"
655
  msgstr "settimane"
656
 
657
- #: dbem_events.php:1119
658
  msgid "month"
659
  msgstr "mese"
660
 
661
- #: dbem_events.php:1120
662
  msgid "months"
663
  msgstr "mesi"
664
 
665
- #: dbem_events.php:1137
666
  msgid "Check if your event happens more than once according to a regular pattern"
667
  msgstr "Selezionare se l'evento si ripete secondo uno schema regolare"
668
 
669
- #: dbem_events.php:1142
670
  msgid "This is't a recurrent event"
671
  msgstr "Questo non è un evento ricorrente"
672
 
673
- #: dbem_events.php:1159
674
  msgid "Contact Person"
675
  msgstr "Responsabile dell'evento"
676
 
677
- #: dbem_events.php:1161
 
 
 
 
 
678
  msgid "Select..."
679
  msgstr "Seleziona..."
680
 
681
- #: dbem_events.php:1172
 
 
 
 
682
  msgid "Enable registration for this event"
683
  msgstr "Abilitare la registrazione per questo evento"
684
 
685
- #: dbem_events.php:1179
686
  #: dbem_rsvp.php:247
687
  msgid "Spaces"
688
  msgstr "Posti"
689
 
690
- #: dbem_events.php:1199
 
 
 
 
691
  msgid "The event name. Example: Birthday party"
692
  msgstr "Il nome dell'evento. Esempio: festa di compleanno."
693
 
694
- #: dbem_events.php:1206
695
  msgid "Event date"
696
  msgstr "Date dell'evento"
697
 
698
- #: dbem_events.php:1206
699
  msgid "Recurrence dates"
700
  msgstr "Date della ricorrenza"
701
 
702
- #: dbem_events.php:1215
703
  msgid "The event date."
704
  msgstr "La data dell'evento"
705
 
706
- #: dbem_events.php:1215
 
 
 
 
707
  msgid "The recurrence beginning and end date."
708
  msgstr "Le date di inizio e fine della ricorrenza"
709
 
710
- #: dbem_events.php:1225
711
  msgid "Event time"
712
  msgstr "Ora dell'evento"
713
 
714
- #: dbem_events.php:1231
715
  msgid "The time of the event beginning and end"
716
  msgstr "L'ora di inizio e fine dell'evento"
717
 
718
- #: dbem_events.php:1239
719
  msgid "Coordinates"
720
  msgstr "Coordinate"
721
 
722
- #: dbem_events.php:1253
723
  msgid "Name:"
724
  msgstr "Nome:"
725
 
726
- #: dbem_events.php:1258
727
  #: dbem_locations.php:160
728
- #: dbem_locations.php:312
729
  msgid "Map not found"
730
  msgstr "Mappa non trovata"
731
 
732
- #: dbem_events.php:1265
733
  msgid "The name of the location where the event takes place. You can use the name of a venue, a square, etc"
734
  msgstr "Il nome del locale dove avviene l'evento. È possibile usare il nome di un locale, di una piazza, ecc"
735
 
736
- #: dbem_events.php:1269
737
  msgid "Address:"
738
  msgstr "Indirizzo:"
739
 
740
- #: dbem_events.php:1273
741
  msgid "The address of the location where the event takes place. Example: 21, Dominick Street"
742
  msgstr "L'indirizzo del luogo dove si tiene l'evento. Esempio: Arena"
743
 
744
- #: dbem_events.php:1277
745
  msgid "Town:"
746
  msgstr "Città:"
747
 
748
- #: dbem_events.php:1281
749
  msgid "The town where the location is located. If you're using the Google Map integration and want to avoid geotagging ambiguities include the country in the town field. Example: Verona, Italy."
750
  msgstr "La città dell'evento. Se si utilizza Google Map e si vogliono evitare ambiguità, inserire anche lo stato. Esempio: Verona, Italy"
751
 
752
- #: dbem_events.php:1293
753
  msgid "Details"
754
  msgstr "Dettagli"
755
 
756
- #: dbem_events.php:1296
757
  msgid "Details about the event"
758
  msgstr "Note sull'evento"
759
 
760
- #: dbem_events.php:1300
 
 
 
 
761
  msgid "Submit Event"
762
  msgstr "Invia evento"
763
 
764
- #: dbem_events.php:1321
765
  msgid "Missing fields: "
766
  msgstr "Campi obbligatori mancanti:"
767
 
768
- #: dbem_events.php:1323
769
  msgid "Since the event is repeated, you must specify an event date."
770
  msgstr "Per gli eventi ripetuti è necessario specificare una data di fine."
771
 
772
- #: dbem_events.php:1514
773
  msgid "Date"
774
  msgstr "Data"
775
 
776
- #: dbem_events.php:1514
777
- #: dbem_locations.php:226
778
- #: dbem_locations.php:234
779
  msgid "Address"
780
  msgstr "Indirizzo"
781
 
782
- #: dbem_events.php:1514
783
- #: dbem_locations.php:227
784
- #: dbem_locations.php:235
785
  msgid "Town"
786
  msgstr "Città"
787
 
788
- #: dbem_events.php:1531
789
  msgid "Some required fields are missing:"
790
  msgstr "Mancano alcuni campi obbligatori:"
791
 
792
- #: dbem_events.php:1534
793
  msgid "Since the event is repeated, you must specify an end date"
794
  msgstr "Per gli eventi ripetuti è necessario specificare una data di fine"
795
 
796
- #: dbem_events.php:1689
797
  msgid "You cannot enable Google Maps integration without setting an appropriate API key."
798
  msgstr "Non è possibile abilitare l'integrazione con Google Maps senza impostare una chiave API."
799
 
800
- #: dbem_events.php:1828
801
  msgid "Add an event"
802
  msgstr "Aggiungi un evento"
803
 
804
- #: dbem_events.php:1883
805
  #, php-format
806
  msgid "This page corresponds to <strong>Events Manager</strong> events page. Its content will be overriden by <strong>Events Manager</strong>. If you want to display your content, you can can assign another page to <strong>Events Manager</strong> in the the <a href='%s'>Settings</a>. "
807
  msgstr "Questa pagina corriponde alla pagina eventi di <strong>Events Manager</strong>. Il suo contenuto verrà sovrascritto da <strong>Events Manager</strong>. Se vuoi visualizzare il tuo contenuto, puoi assegnare ad <strong>Events Manager</strong> un'altra pagina, tramite le <a href='%s'>Opzioni</a>. "
@@ -822,36 +899,36 @@ msgstr "La città del luogo"
822
  msgid "The location has been updated."
823
  msgstr "Il luogo è stato aggiornato."
824
 
825
- #: dbem_locations.php:112
826
  msgid "Edit location"
827
  msgstr "Modifica luogo"
828
 
829
- #: dbem_locations.php:129
830
- #: dbem_locations.php:278
831
  msgid "Location name"
832
  msgstr "Nome del uogo"
833
 
834
- #: dbem_locations.php:131
835
- #: dbem_locations.php:280
836
  msgid "The name of the location"
837
  msgstr "Il nome del luogo"
838
 
839
- #: dbem_locations.php:135
840
- #: dbem_locations.php:284
841
  msgid "Location address"
842
  msgstr "Indirizzo del luogo"
843
 
844
- #: dbem_locations.php:137
845
- #: dbem_locations.php:286
846
  msgid "The address of the location"
847
  msgstr "L'indirizzo del luogo"
848
 
849
- #: dbem_locations.php:142
850
- #: dbem_locations.php:290
851
  msgid "Location town"
852
  msgstr "Città del luogo"
853
 
854
- #: dbem_locations.php:144
855
  msgid "The town where the location is located"
856
  msgstr "La città del luogo"
857
 
@@ -859,79 +936,76 @@ msgstr "La città del luogo"
859
  msgid "Location map"
860
  msgstr "Mappa del luogo"
861
 
862
- #: dbem_locations.php:165
863
- #: dbem_locations.php:317
864
  msgid "Location description"
865
  msgstr "Descrizione del luogo"
866
 
867
- #: dbem_locations.php:167
 
868
  msgid "A description of the Location. You may include any kind of info here."
869
  msgstr "Una descrizione del luogo. In quetso campo è possibile includere qualsiasi tipo di informazione."
870
 
871
- #: dbem_locations.php:171
872
- #: dbem_locations.php:305
873
  msgid "Location image"
874
  msgstr "Immagine del luogo"
875
 
876
- #: dbem_locations.php:176
877
  msgid "No image uploaded for this location yet"
878
  msgstr "Nessuna immagine caricata per questo luogo"
879
 
880
- #: dbem_locations.php:182
881
  msgid "Upload/change picture"
882
  msgstr "Carica/cambia immagine"
883
 
884
- #: dbem_locations.php:186
885
  msgid "Update location"
886
  msgstr "Aggiorna il luogo"
887
 
888
- #: dbem_locations.php:203
889
- #: events-manager.php:448
890
  msgid "Locations"
891
  msgstr "Luoghi"
892
 
893
- #: dbem_locations.php:262
894
  msgid "No venues have been inserted yet!"
895
  msgstr "Non sono ancora stati inseriti luoghi!"
896
 
897
- #: dbem_locations.php:273
898
- #: dbem_locations.php:322
899
  msgid "Add location"
900
  msgstr "Aggiungi un luogo"
901
 
902
- #: dbem_locations.php:292
903
  msgid "The town of the location"
904
  msgstr "La città del luogo."
905
 
906
- #: dbem_locations.php:307
907
  msgid "Select an image to upload"
908
  msgstr "Selezionare un'immagine da caricare."
909
 
910
- #: dbem_locations.php:319
911
- msgid "A description of the location. You may include any kind of info here."
912
- msgstr "Una descrizione del luogo. In questo campo è possibile inserire qualsiasi tipo di informazione."
913
-
914
- #: dbem_locations.php:392
915
  msgid " is missing!"
916
  msgstr "non è presente!"
917
 
918
- #: dbem_locations.php:400
919
  msgid "The image file is too big! Maximum size:"
920
  msgstr "Il file dell'immagine è troppo grande! Dimensione massima:"
921
 
922
- #: dbem_locations.php:405
923
  msgid "The image is too big! Maximum size allowed:"
924
  msgstr "L'immagine è troppo grande! Dimensioni massime:"
925
 
926
- #: dbem_locations.php:407
927
  msgid "The image is in a wrong format!"
928
  msgstr "L'immagine non è nel formato corretto!"
929
 
930
- #: dbem_locations.php:414
931
  msgid "Ach, some problems here:"
932
  msgstr "Accidenti, ci sono dei problemi:"
933
 
934
- #: dbem_locations.php:475
935
  msgid "The image could not be loaded"
936
  msgstr "Impossibile caricare l'immagine"
937
 
@@ -944,8 +1018,8 @@ msgid "E-mail"
944
  msgstr "E-mail"
945
 
946
  #: dbem_people.php:92
947
- #: dbem_people.php:194
948
- #: dbem_people.php:197
949
  #: dbem_rsvp.php:20
950
  msgid "Phone number"
951
  msgstr "Numero di telefono"
@@ -955,23 +1029,28 @@ msgstr "Numero di telefono"
955
  msgid "Seats"
956
  msgstr "Posti"
957
 
958
- #: dbem_people.php:106
 
 
 
 
 
959
  msgid "Booked"
960
  msgstr "Prenotati"
961
 
962
- #: dbem_people.php:111
963
  msgid "Available"
964
  msgstr "Disponibili"
965
 
966
- #: dbem_people.php:126
967
  msgid "No people have responded to your events yet!"
968
  msgstr "Nessuno ha ancora risposto all'evento!"
969
 
970
- #: dbem_people.php:128
971
  msgid "This table collects the data about the people who responded to your events"
972
  msgstr "Questa tabella raccoglie le informazioni sugli utenti che si sono registrati per gli eventi"
973
 
974
- #: dbem_people.php:199
975
  msgid "The phone number used by Events Manager when the user is indicated as the contact person for an event."
976
  msgstr "Il numero telefonico utilizzato da Events Manager quando l'utente è indicato come contatto per l'evento."
977
 
@@ -980,32 +1059,32 @@ msgid "Book now!"
980
  msgstr "Prenota ora!"
981
 
982
  #: dbem_rsvp.php:19
983
- #: dbem_rsvp.php:53
984
  msgid "E-Mail"
985
  msgstr "E-Mail"
986
 
987
- #: dbem_rsvp.php:27
988
  msgid "Send your booking"
989
  msgstr "Invia la prenotazione"
990
 
991
- #: dbem_rsvp.php:44
992
- #: dbem_rsvp.php:56
993
  msgid "Cancel your booking"
994
  msgstr "Annulla una prenotazione"
995
 
996
- #: dbem_rsvp.php:88
997
  msgid "There are no bookings associated to this name and e-mail"
998
  msgstr "Non ci sono prenotazioni associate a questa combinazione nome/e-mail"
999
 
1000
- #: dbem_rsvp.php:113
1001
  msgid "Your booking has been recorded"
1002
  msgstr "La prenotazione è stata registrata"
1003
 
1004
- #: dbem_rsvp.php:120
1005
- msgid "Sorry, there aren't so many seats available!"
1006
- msgstr "Accidenti, non ci sono posti disponibili!"
1007
 
1008
- #: dbem_rsvp.php:163
1009
  msgid "Booking deleted"
1010
  msgstr "Prenotazione eliminata."
1011
 
@@ -1025,39 +1104,43 @@ msgstr "Posti prenotati"
1025
  msgid "Available spaces"
1026
  msgstr "Posti disponibili"
1027
 
1028
- #: dbem_rsvp.php:274
 
 
 
 
1029
  msgid "Printable view"
1030
  msgstr "Versione stampabile"
1031
 
1032
- #: dbem_rsvp.php:282
1033
  msgid "No responses yet!"
1034
  msgstr "Non c'è ancora nessuan risposta!"
1035
 
1036
- #: dbem_rsvp.php:353
1037
  msgid "New booking"
1038
  msgstr "Nuova prenotazione"
1039
 
1040
- #: dbem_rsvp.php:354
1041
  msgid "Reservation confirmed"
1042
  msgstr "Prenotazione confermata"
1043
 
1044
  #: dbem_widgets.php:10
1045
  #: dbem_widgets.php:35
1046
  #: events-manager.php:44
1047
- #: events-manager.php:398
1048
- #: events-manager.php:399
1049
- #: events-manager.php:444
1050
  msgid "Events"
1051
  msgstr "Eventi"
1052
 
1053
  #: dbem_widgets.php:19
1054
  #: events-manager.php:50
1055
- #: events-manager.php:391
1056
  msgid "No events"
1057
  msgstr "Nessun evento"
1058
 
1059
  #: dbem_widgets.php:78
1060
- #: dbem_widgets.php:156
1061
  msgid "Title"
1062
  msgstr "Titolo"
1063
 
@@ -1089,13 +1172,17 @@ msgstr "Formato degli elementi"
1089
  msgid "calendar"
1090
  msgstr "calendario "
1091
 
1092
- #: dbem_widgets.php:176
1093
- #: dbem_widgets.php:177
 
 
 
 
1094
  msgid "Events List"
1095
  msgstr "Lista eventi"
1096
 
1097
- #: dbem_widgets.php:178
1098
- #: dbem_widgets.php:179
1099
  msgid "Events Calendar"
1100
  msgstr "Calendario eventi"
1101
 
@@ -1103,66 +1190,144 @@ msgstr "Calendario eventi"
1103
  msgid "<li>No events in this location</li>"
1104
  msgstr "<li>Nessun evento in questo luogo</li>"
1105
 
1106
- #: events-manager.php:382
1107
  msgid "#_RESPNAME (#_RESPEMAIL) will attend #_NAME on #m #d, #Y. He wants to reserve #_SPACES spaces.<br/> Now there are #_RESERVEDSPACES spaces reserved, #_AVAILABLESPACES are still available.<br/>Yours faithfully,<br/>Events Manager"
1108
  msgstr "#_RESPNAME (#_RESPEMAIL) parteciperà all'evento #_NAME su #m #d, #Y. Vuole prenotare #_SPACES posti.<br/> Ora ci sono #_RESERVEDSPACES posti prenotati, #_AVAILABLESPACES sono ancora liberi.<br/>A presto,<br/>Events Manager"
1109
 
1110
- #: events-manager.php:383
1111
  msgid "Dear #_RESPNAME, <br/>you have successfully reserved #_SPACES space/spaces for #_NAME.<br/>Yours faithfully,<br/> #_CONTACTPERSON"
1112
  msgstr "#_RESPNAME, <br/>la prenotazione di #_SPACES posto/i a nome di #_NAME è andata a buon fine.<br/>A presto,<br/> #_CONTACTPERSON"
1113
 
1114
- #: events-manager.php:433
1115
  msgid "events"
1116
  msgstr "eventi"
1117
 
1118
- #: events-manager.php:446
 
1119
  msgid "Edit"
1120
  msgstr "Modifica"
1121
 
1122
- #: events-manager.php:447
1123
  msgid "Add new"
1124
  msgstr "Aggiungi nuovo"
1125
 
1126
- #: events-manager.php:449
1127
  msgid "People"
1128
  msgstr "Persone"
1129
 
1130
- #: events-manager.php:451
1131
  msgid "Events Manager Settings"
1132
  msgstr "Impostazioni di Events Manager"
1133
 
1134
- #: events-manager.php:451
1135
  msgid "Settings"
1136
  msgstr "Impostazioni"
1137
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1138
  #~ msgid "end date before begin date"
1139
  #~ msgstr "la data finale precede quella iniziale"
 
1140
  #~ msgid "Example:"
1141
  #~ msgstr "Esempio: "
 
1142
  #~ msgid "Example: 2008-11-28"
1143
  #~ msgstr "Esempio: 2008-11-28"
 
1144
  #~ msgid "The format the text appearing in the map cloud."
1145
  #~ msgstr "Il fomato del testo del fumetto che appare sulla mappa."
 
1146
  #~ msgid "Follow the previous formatting instructions."
1147
  #~ msgstr "Seguire le istruzioni di formattazione precedenti."
 
1148
  #~ msgid "here"
1149
  #~ msgstr "questa pagina"
 
1150
  #~ msgid "The format of a single location page title."
1151
  #~ msgstr "Il formato del titolo della pagina di un singolo luogo."
1152
 
1153
  #, fuzzy
1154
  #~ msgid "Location picture"
1155
  #~ msgstr "Luogo"
 
1156
  #~ msgid "M_Monday_initial"
1157
  #~ msgstr "L"
 
1158
  #~ msgid "T_Tuesday_initial"
1159
  #~ msgstr "M"
 
1160
  #~ msgid "F_Friday_initial"
1161
  #~ msgstr "V"
 
1162
  #~ msgid "S_Sunday_initial"
1163
  #~ msgstr "D"
 
1164
  #~ msgid "The format of any events in a list."
1165
  #~ msgstr "Il formato di ciascun evento della lista."
 
1166
  #~ msgid ""
1167
  #~ "Insert one or more of the following placeholders: <code>#_NAME</code>, "
1168
  #~ "<code>#_LOCATION</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, "
@@ -1175,6 +1340,7 @@ msgstr "Impostazioni"
1175
  #~ "<code>#_NOTES</code>. Utilizzare <code>#_LINKEDNAME</code> per il nome "
1176
  #~ "dell'evento con un link alla pagina corrispondente. Utilizzare #_URL per "
1177
  #~ "visualizzare l'URL dell'evento e creare link personalizzati."
 
1178
  #~ msgid ""
1179
  #~ "To insert date and time values, use <a href=\"http://www.php.net/manual/"
1180
  #~ "en/function.date.php\">PHP time format characters</a> with a # symbol "
@@ -1183,33 +1349,41 @@ msgstr "Impostazioni"
1183
  #~ "Per inserire valori di data e ora, utilizzare i <a href=\"http://www.php."
1184
  #~ "net/manual/it/function.date.php\">caratteri di stringa formato PHP</a> "
1185
  #~ "anteponendo ad essi un #, ad esempio #m. #M, #j, etc. "
 
1186
  #~ msgid "Use HTML tags as <code>li</code>, <code>br</code>, etc."
1187
  #~ msgstr ""
1188
  #~ "Utilizzare liberamente tag HTML come <code>li</code>, <code>br</code>, "
1189
  #~ "ecc."
 
1190
  #~ msgid "Use <code>#_MAP</code> to insert a map."
1191
  #~ msgstr "Utilizzare <code>#_MAP</code> per inserire una mappa."
 
1192
  #~ msgid "The format of the description of each item in the events RSS feed."
1193
  #~ msgstr "Il formato della descrizione di ciascun elemento nel feed RSS."
1194
- #~ msgid "ID"
1195
- #~ msgstr "ID"
1196
  #~ msgid "Time"
1197
  #~ msgstr "Ora"
 
1198
  #~ msgid "Latitude"
1199
  #~ msgstr "Latitudine"
 
1200
  #~ msgid "Longitude"
1201
  #~ msgstr "Longitudine"
 
1202
  #~ msgid "Are you sure?"
1203
  #~ msgstr "Sei sicuro?"
 
1204
  #~ msgid "Delete"
1205
  #~ msgstr "Elimina"
 
1206
  #~ msgid "Notes"
1207
  #~ msgstr "Note"
 
1208
  #~ msgid ""
1209
  #~ "You are about to delete this event.\\n 'Cancel' to stop, 'OK' to delete."
1210
  #~ msgstr ""
1211
  #~ "Stai per cancellare questo evento.\\n \\'Cancel\\' per annullare "
1212
  #~ "l'opererazione, \\'Ok\\' per cancellare."
 
1213
  #~ msgid "Widget Title"
1214
  #~ msgstr "Titolo"
1215
-
2
  msgstr ""
3
  "Project-Id-Version: events-manager\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2010-03-04 16:46+0100\n"
6
  "PO-Revision-Date: \n"
7
  "Last-Translator: Davide Benini <cno@cnomania.it>\n"
8
  "Language-Team: \n"
93
  msgid "every %s months"
94
  msgstr "ogni %s mesi"
95
 
96
+ #: dbem_events.php:5
97
+ #: dbem_events.php:191
98
  msgid "Insert New Event"
99
  msgstr "Inserisci un nuovo evento"
100
 
101
+ #: dbem_events.php:137
102
  msgid "New recurrent event inserted!"
103
  msgstr "Nuovo evento ricorrente inserito!"
104
 
105
+ #: dbem_events.php:141
106
  msgid "New event successfully inserted!"
107
  msgstr "Nuovo evento inserito!"
108
 
109
+ #: dbem_events.php:150
110
  msgid "Recurrence updated!"
111
  msgstr "Ricorrenza aggiornata!"
112
 
113
+ #: dbem_events.php:152
114
  msgid "Something went wrong with the recurrence update..."
115
  msgstr "Caspita, si è verificato un problema durante l'aggiornamento della ricorrenza..."
116
 
117
+ #: dbem_events.php:161
118
  msgid "updated"
119
  msgstr "aggiornato"
120
 
121
+ #: dbem_events.php:183
122
  msgid "Ach, there's a problem here:"
123
  msgstr "Houston, abbiamo un problema:"
124
 
125
+ #: dbem_events.php:194
126
+ #: marcus-extras.php:46
127
  msgid "Edit Event"
128
  msgstr "Modifica l'evento"
129
 
130
+ #: dbem_events.php:215
131
+ #: dbem_events.php:1116
132
+ #: dbem_events.php:1350
133
  msgid "Reschedule"
134
  msgstr "Riprogramma"
135
 
136
+ #: dbem_events.php:231
137
  msgid "Past Events"
138
  msgstr "Eventi passati"
139
 
140
+ #: dbem_events.php:234
141
  msgid "All Events"
142
  msgstr "Tutti gli eventi"
143
 
144
+ #: dbem_events.php:237
145
  msgid "Future Events"
146
  msgstr "Eventi futuri"
147
 
148
+ #: dbem_events.php:270
149
  msgid "Event Manager Options"
150
  msgstr "Opzioni di Events Manager"
151
 
152
+ #: dbem_events.php:274
153
+ #: dbem_events.php:278
154
  msgid "Events page"
155
  msgstr "Pagina degli eventi"
156
 
157
+ #: dbem_events.php:278
158
  msgid "This option allows you to select which page to use as an events page"
159
  msgstr "Questa opzione consente di selezionare quale pagina utilizzare come pagina degli eventi."
160
 
161
+ #: dbem_events.php:279
162
+ msgid "Show events page in lists?"
163
+ msgstr "Mostrare la pagina degli eventi nelle liste?"
164
+
165
+ #: dbem_events.php:279
166
+ msgid "Check this option if you want the events page to appear together with other pages in pages lists."
167
+ msgstr "Selezionare questa opzione se si vuole che la pagina eventi appaia"
168
+
169
+ #: dbem_events.php:280
170
  msgid "Display calendar in events page?"
171
  msgstr "Mostra il calendario nella pagina eventi?"
172
 
173
+ #: dbem_events.php:280
174
  msgid "This options allows to display the calendar in the events page, instead of the default list. It is recommended not to display both the calendar widget and a calendar page."
175
  msgstr "Questa opzione consente di visualizzare il calndario nella pagina degli eventi, anziché la lista predefinita. Si raccomanda di non visualizzare contemporaneamente il calendario nel widget e sulla pagina."
176
 
177
+ #: dbem_events.php:283
178
  msgid "Events format"
179
  msgstr "Formato eventi"
180
 
181
+ #: dbem_events.php:288
182
+ msgid "Default event list format header"
183
+ msgstr "Formato predefinito dell'header della lista eventi"
184
+
185
+ #: dbem_events.php:288
186
+ msgid "This content will appear just above your code for the default event list format. Default is blank"
187
+ msgstr "Questo contenuto appare in fondo alla lista eventi. Il valore predefinito è vuoto."
188
+
189
+ #: dbem_events.php:289
190
  msgid "Default event list format"
191
  msgstr "Formato predefinito della lista eventi"
192
 
193
+ #: dbem_events.php:289
194
+ msgid "The format of any events in a list.<br/>Insert one or more of the following placeholders: <code>#_NAME</code>, <code>#_LOCATION</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, <code>#_NOTES</code>.<br/> Use <code>#_EXCERPT</code> to show <code>#_NOTES</code> until you place a &lt;!&ndash;&ndash; more &ndash;&ndash;&gt; marker.<br/> Use <code>#_LINKEDNAME</code> for the event name with a link to the given event page.<br/> Use <code>#_EVENTPAGEURL</code> to print the event page URL and make your own customised links.<br/> Use <code>#_LOCATIONPAGEURL</code> to print the location page URL and make your own customised links.<br/>Use <code>#_EDITEVENTLINK</code> to add add a link to edit page for the event, which will appear only when a user is logged in.<br/>To insert date and time values, use <a href=\"http://www.php.net/manual/en/function.date.php\">PHP time format characters</a> with a <code>#</code> symbol before them, i.e. <code>#m</code>, <code>#M</code>, <code>#j</code>, etc.<br/> For the end time, put <code>#@</code> in front of the character, ie. <code>#@h</code>, <code>#@i</code>, etc.<br/> You can also create a date format without prepending <code>#</code> by wrapping it in #_{} or #@_{} (e.g. <code>#_{d/m/Y}</code>). If there is no end date, the value is not shown.<br/>Feel free to use HTML tags as <code>li</code>, <code>br</code> and so on.<br/>For custom attributes, you use <code>#_ATT{key}{alternative text}</code>, the second braces are optional and will appear if the attribute is not defined or left blank for that event. This key will appear as an option when adding attributes to your event."
195
+ msgstr "Il formato degli eventi in una lista.<br/>Inserire uno o più dei seguenti segnaposto: <code>#_NAME</code>, <code>#_LOCATION</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, <code>#_NOTES</code>.<br/> Utilizzare <code>#_EXCERPT</code> per mostrare <code>#_NOTES</code> fino al marker &lt;!&ndash;&ndash; more &ndash;&ndash;&gt;.<br/> Utilizzare <code>#_LINKEDNAME</code> per inserire il nome dell'evento con un link alla pagina dell'evento stesso.<br/> Utilizzare <code>#_EVENTPAGEURL</code> per stampare l'URL della pagina dell'evento e creare i propri link personalizzati.<br/> Utilizzare <code>#_LOCATIONPAGEURL</code> per stampare l'URL della pagina del luogo e creare i propri link personalizzati.<br/>Utilizzare <code>#_EDITEVENTLINK</code> per inserire un link alla pagina modifica evento; verrà visualizzato solo se un utente è autenticato. <br/>Per inserire valori temporali, utilizzare i <a href=\"http://www.php.net/manual/it/function.date.php\">caratteri della stringa formato PHP</a> anteponendo il carattere <code>#</code> , ad esempio <code>#m</code>, <code>#M</code>, <code>#j</code>, etc.<br/> Per l'ora di fine dell'evento anteporre il carattere <code>#@</code>, ad esempio <code>#@h</code>, <code>#@i</code>, etc. È inoltre possibile creare un formato di data senza inserire <code>#</code> per ogni segnaposto, utilizzando la sintassi in <code>#_{}</code> o <code>#@_{}</code> (es. <code>#_{d/m/Y}</code>). Se la data finale non è impostata, non verrà visualizzata.<br/> <br/> Utilizzare liberamente i tag HTML come <code>li</code>, <code>br</code> e così via.<br/> Per gli attributi personalizzati, utilizzare <code>#_ATT{chiave}{testo alternativo}</code>; il secondo parametro è opzionale e apparirà se l'attributo non è definito o è vuoto. La chiave apparirà tra le opzioni quando si aggiungono attributi all'evento."
196
+
197
+ #: dbem_events.php:290
198
+ msgid "Default event list format footer"
199
+ msgstr "Formato predefinito del footer della lista eventi"
200
+
201
+ #: dbem_events.php:290
202
+ msgid "This content will appear just below your code for the default event list format. Default is blank"
203
+ msgstr "Questo contenuto appare in fondo alla lista eventi. Il calore predefinito è vuoto"
204
 
205
+ #: dbem_events.php:293
206
  msgid "Single event page title format"
207
  msgstr "Formato del titolo della pagina Evento singolo"
208
 
209
+ #: dbem_events.php:293
210
  msgid "The format of a single event page title. Follow the previous formatting instructions."
211
  msgstr "Il formato della pagina di un singolo evento. Seguire le istruzioni di formattazione precedenti."
212
 
213
+ #: dbem_events.php:294
214
  msgid "Default single event format"
215
  msgstr "Fomato predefinito di un singolo evento"
216
 
217
+ #: dbem_events.php:294
218
  msgid "The format of a single event page.<br/>Follow the previous formatting instructions. <br/>Use <code>#_MAP</code> to insert a map.<br/>Use <code>#_CONTACTNAME</code>, <code>#_CONTACTEMAIL</code>, <code>#_CONTACTPHONE</code> to insert respectively the name, e-mail address and phone number of the designated contact person. <br/>Use <code>#_ADDBOOKINGFORM</code> to insert a form to allow the user to respond to your events reserving one or more places (RSVP).<br/> Use <code>#_REMOVEBOOKINGFORM</code> to insert a form where users, inserting their name and e-mail address, can remove their bookings."
219
  msgstr "Il formato delle pagine Evento singolo.<br/>Seguire le istruzioni di formattazione precedenti. <br/>Utilizzare <code>#_MAP</code> per inserire una mappa.<br/>Utilizzare <code>#_CONTACTNAME</code>, <code>#_CONTACTEMAIL</code>, <code>#_CONTACTPHONE</code> per inserire rispettivamente nome, e-mail e telefono del responsabile dell'evento. <br/>Utilizzare <code>#_ADDBOOKINGFORM</code> per inserire un modulo di registrazione per l'evento (RSVP).<br/> Utilizzare <code>#_REMOVEBOOKINGFORM</code> per inserire un modulo per cancellare le registrazioni."
220
 
221
+ #: dbem_events.php:295
 
 
 
 
 
 
 
 
222
  msgid "Events page title"
223
  msgstr "Titolo della pagina degli eventi"
224
 
225
+ #: dbem_events.php:295
226
  msgid "The title on the multiple events page."
227
  msgstr "Il titolo della pagina che contiene più eventi."
228
 
229
+ #: dbem_events.php:296
230
  msgid "No events message"
231
  msgstr "Messaggio Nessun evento"
232
 
233
+ #: dbem_events.php:296
234
  msgid "The message displayed when no events are available."
235
  msgstr "Il messaggio visualizzato quando non ci sono eventi disponibili."
236
 
237
+ #: dbem_events.php:299
238
+ msgid "Calendar format"
239
+ msgstr "Formato del calendario grande"
240
 
241
+ #: dbem_events.php:302
242
+ msgid "Small calendar title"
243
+ msgstr "Attributo title del calendario compatto"
244
 
245
+ #: dbem_events.php:302
246
+ msgid "The format of the title, corresponding to the text that appears when hovering on an eventful calendar day."
247
+ msgstr "Il formato dell'attributi <code>title</code>, corrispondente al testo che compare quando si passa col mouse su un giorno del calendario."
248
+
249
+ #: dbem_events.php:303
250
+ msgid "Small calendar title separator"
251
+ msgstr "Separatore dell'attributo title del calendario compasso"
252
+
253
+ #: dbem_events.php:303
254
+ msgid "The separator appearing on the above title when more than one events are taking place on the same day."
255
+ msgstr "Relativo all'attributo title sopra definito; è il separatore che appare quando gli eventi relativ a uno stesso giorno sono più di uno."
256
+
257
+ #: dbem_events.php:304
258
+ msgid "Full calendar events format"
259
+ msgstr "Fomato evento nel calendario grande"
260
+
261
+ #: dbem_events.php:304
262
+ msgid "The format of each event when displayed in the full calendar. Remember to include <code>li</code> tags before and after the event."
263
+ msgstr "Il formato di ciascun evento quando viene mostrato nel calendario grande. Inserire i tag <code>li</code> prima e dopo l'evento."
264
+
265
+ #: dbem_events.php:311
266
  msgid "Locations format"
267
  msgstr "Formato del luogo"
268
 
269
+ #: dbem_events.php:314
270
  msgid "Single location page title format"
271
  msgstr "Formato del titolo della pagina Luogo singolo"
272
 
273
+ #: dbem_events.php:314
274
  msgid "The format of a single location page title.<br/>Follow the previous formatting instructions."
275
  msgstr "Il formato del titolo della pagina di un singolo evento.<br/>Seguire le istruzioni di formattazione precedenti."
276
 
277
+ #: dbem_events.php:315
278
  msgid "Default single location page format"
279
  msgstr "Formato predefinito della pagina Luogo singolo"
280
 
281
+ #: dbem_events.php:315
282
  msgid "The format of a single location page.<br/>Insert one or more of the following placeholders: <code>#_NAME</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, <code>#_DESCRIPTION</code>.<br/> Use <code>#_MAP</code> to display a map of the event location, and <code>#_IMAGE</code> to display an image of the location.<br/> Use <code>#_NEXTEVENTS</code> to insert a list of the upcoming events, <code>#_PASTEVENTS</code> for a list of past events, <code>#_ALLEVENTS</code> for a list of all events taking place in this location."
283
  msgstr "Il formato di una pagina Luogo singolo.<br/>Inserire uno o più dei seguenti segnaposto: <code>#_NAME</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, <code>#_DESCRIPTION</code>.<br/> Utilizzare <code>#_MAP</code> per visualizzare una mappa del luogo dell'evento, e <code>#_IMAGE</code> per visualizzare un'immagine del luogo.<br/> Utilizzare <code>#_NEXTEVENTS</code> per inserire un elenco degli eventi futuri, <code>#_PASTEVENTS</code> per un elenco degli eventi passati, <code>#_ALLEVENTS</code> per un elenco di tutti gli eventi che si tengono in un luogo."
284
 
285
+ #: dbem_events.php:316
286
  msgid "Default location baloon format"
287
  msgstr "Fomato predefinito del fumetto predefinito di un luogo"
288
 
289
+ #: dbem_events.php:316
290
  msgid "The format of of the text appearing in the baloon describing the location in the map.<br/>Insert one or more of the following placeholders: <code>#_NAME</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, <code>#_DESCRIPTION</code> or <code>#_IMAGE</code>."
291
  msgstr "Il formato del testo che appare nel fumetto che descrive l'ubicazione sulla mappa.<br/>Inserire uno o più dei seguenti segnaposto: <code>#_NAME</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, <code>#_DESCRIPTION</code> o <code>#_IMAGE</code>."
292
 
293
+ #: dbem_events.php:317
294
  msgid "Default location event list format"
295
  msgstr "Formato predefinito della lista eventi del luogo"
296
 
297
+ #: dbem_events.php:317
298
  msgid "The format of the events the list inserted in the location page through the <code>#_NEXTEVENTS</code>, <code>#_PASTEVENTS</code> and <code>#_ALLEVENTS</code> element. <br/> Follow the events formatting instructions"
299
  msgstr "Il formato dell'evento nell'elenco inserito nella pagina del luogo con gli elementi <code>#_NEXTEVENTS</code>, <code>#_PASTEVENTS</code> e <code>#_ALLEVENTS</code>. <br/> Seguire le istruzioni di formattazione precedenti."
300
 
301
+ #: dbem_events.php:318
302
  msgid "Default no events message"
303
  msgstr "Messaggio Nessun evento "
304
 
305
+ #: dbem_events.php:318
306
  msgid "The message to be displayed in the list generated by <code>#_NEXTEVENTS</code>, <code>#_PASTEVENTS</code> and <code>#_ALLEVENTS</code> when no events are available."
307
  msgstr "Il messaggio da visualizzare nell'elenco generato da <code>#_NEXTEVENTS</code>, <code>#_PASTEVENTS</code> e <code>#_ALLEVENTS</code> quando non sono disponibili eventi."
308
 
309
+ #: dbem_events.php:324
310
  msgid "RSS feed format"
311
  msgstr "Formato del feed RSS"
312
 
313
+ #: dbem_events.php:328
314
  msgid "RSS main title"
315
  msgstr "Titolo principale dell'RSS"
316
 
317
+ #: dbem_events.php:328
318
  msgid "The main title of your RSS events feed."
319
  msgstr "Il titolo principale del feed RSS degli eventi."
320
 
321
+ #: dbem_events.php:329
322
  msgid "RSS main description"
323
  msgstr "Descrizione principale dell'RSS"
324
 
325
+ #: dbem_events.php:329
326
  msgid "The main description of your RSS events feed."
327
  msgstr "La descrizione principale del feed RSS degli eventi."
328
 
329
+ #: dbem_events.php:330
330
  msgid "RSS title format"
331
  msgstr "Formato del titolo dell'RSS"
332
 
333
+ #: dbem_events.php:330
334
  msgid "The format of the title of each item in the events RSS feed."
335
  msgstr "Il formato del titolo di ciascun elemento nel feed RSS."
336
 
337
+ #: dbem_events.php:331
338
  msgid "RSS description format"
339
  msgstr "Formato della descrizione nell'RSS"
340
 
341
+ #: dbem_events.php:331
342
  msgid "The format of the description of each item in the events RSS feed. Follow the previous formatting instructions."
343
  msgstr "Il formato della descrizione di ogni singolo elemento nel feed RSS. Seguire le istruzioni di formattazione precedenti."
344
 
345
+ #: dbem_events.php:336
346
  msgid "Maps and geotagging"
347
  msgstr "Mappe e geotagging"
348
 
349
+ #: dbem_events.php:345
350
  msgid "Enable Google Maps integration?"
351
  msgstr "Abilitare l'integrazione con Google Maps?"
352
 
353
+ #: dbem_events.php:353
354
  #: dbem_UI_helpers.php:68
355
  msgid "Yes"
356
  msgstr "Sì"
357
 
358
+ #: dbem_events.php:360
359
  #: dbem_UI_helpers.php:69
360
  msgid "No"
361
  msgstr "No"
362
 
363
+ #: dbem_events.php:363
364
  msgid "Check this option to enable Goggle Map integration."
365
  msgstr "Selezionare questa opzione per abilitare l'integrazione con Google Maps."
366
 
367
+ #: dbem_events.php:367
368
  msgid "Google Maps API Key"
369
  msgstr "Chiave API di Google Maps"
370
 
371
+ #: dbem_events.php:367
372
  #, php-format
373
  msgid "To display Google Maps you need a Google Maps API key. Don't worry, it's free, you can get one <a href='%s'>here</a>."
374
  msgstr "Per visualizzare una mappa di Google Maps è necessaria una chiave API di Google Maps. Non preoccupatevi, è gratuita, è sufficiente andare su <a href='%s'>questa pagina</a>."
375
 
376
+ #: dbem_events.php:369
377
+ msgid "Map text format"
378
+ msgstr "Formato del testo della mappa"
379
+
380
+ #: dbem_events.php:369
381
+ msgid "The format the text appearing in the event page map cloud.<br/>Follow the previous formatting instructions."
382
+ msgstr "Il formato della testo che appare nel fumetto della mappa della pagina Evento singolo. Seguire le istruzioni di formattazione precedenti."
383
+
384
+ #: dbem_events.php:374
385
  msgid "RSVP and bookings"
386
  msgstr "RSVP e prenotazioni"
387
 
388
+ #: dbem_events.php:378
389
  msgid "Default contact person"
390
  msgstr "Responsabile degli eventi predefinito"
391
 
392
+ #: dbem_events.php:378
393
  msgid "Select the default contact person. This user will be employed whenever a contact person is not explicitly specified for an event"
394
  msgstr "Selezionare il respondsponsabile predefinito degli eventi. Quando non verrà indicato esplicitamente un reponsabile per un evento, verrà utilizzato questo utente."
395
 
396
+ #: dbem_events.php:379
397
  msgid "Enable the RSVP e-mail notifications?"
398
  msgstr "Abilitare le notifiche e-mail RSVP?"
399
 
400
+ #: dbem_events.php:379
401
  msgid "Check this option if you want to receive an email when someone books places for your events."
402
  msgstr "Selezionare questa opzione se si vuole ricevere un'e-mail quando qualcuno prenota posti per un'evento."
403
 
404
+ #: dbem_events.php:380
405
+ #: dbem_events.php:381
406
  msgid "Contact person email format"
407
  msgstr "Formato dell'e-mail inviata al responsabile"
408
 
409
+ #: dbem_events.php:380
410
+ msgid "The format or the email which will be sent to the contact person. Follow the events formatting instructions. <br/>Use <code>#_RESPNAME</code>, <code>#_RESPEMAIL</code> and <code>#_RESPPHONE</code> to display respectively the name, e-mail, address and phone of the respondent.<br/>Use <code>#_SPACES</code> to display the number of spaces reserved by the respondent. Use <code>#_COMMENT</code> to display the respondent's comment. <br/> Use <code>#_BOOKEDSEATS</code> and <code>#_AVAILABLESEATS</code> to display respectively the number of booked and available seats."
411
+ msgstr "Il formato del'email che verrà inviata al reponsabile.<br/>Seguire le istruzioni di formattazione precedenti. <br/>Utilizzare <code>#_RESPNAME</code>, <code>#_RESPEMAIL</code> e <code>#_RESPPHONE</code> per inserire rispettivamente il nome, l'email e l'indirizzo dell'utente che ha prenotato.<br/>Utilizzare <code>#_SPACES</code> per inserire il numero di posti prenotati dall'utente.<br/> Utilizzare <code>#_BOOKEDSEATS</code> e <code>#_AVAILABLESEATS</code> per inserire rispettivamente il numero di posti prenotati e liberi."
412
 
413
+ #: dbem_events.php:381
414
+ msgid "The format or the email which will be sent to reposdent. Follow the events formatting instructions. <br/>Use <code>#_RESPNAME</code> to display the name of the respondent.<br/>Use <code>#_CONTACTNAME</code> and <code>#_CONTACTMAIL</code> a to display respectively the name and e-mail of the contact person.<br/>Use <code>#_SPACES</code> to display the number of spaces reserved by the respondent. Use <code>#_COMMENT</code> to display the respondent's comment."
415
  msgstr "Il formato dell'e-mail che verrà inviata all'utente che prenota. Seguire le istruzioni di formattazione precedenti. <br/>Utilizzare <code>#_RESPNAME</code> per visualizzare il nome dell'utente che prenota.<br/>Utilizzare <code>#_CONTACTNAME</code> e <code>#_CONTACTMAIL</code> per inserire rispettivamente il nome e l'e-mail del responsabile dell'evento.<br/>Utilizzare <code>#_SPACES</code> per visualizzare informazioni relative ai posti prenotato."
416
 
417
+ #: dbem_events.php:382
418
  msgid "Notification sender name"
419
  msgstr "Nome del mittente della notifica"
420
 
421
+ #: dbem_events.php:382
422
  msgid "Insert the display name of the notification sender."
423
  msgstr "Inserire il nome del mittente che verrà visualizzato."
424
 
425
+ #: dbem_events.php:383
426
  msgid "Notification sender address"
427
  msgstr "Indirizzo del mittente della notifica"
428
 
429
+ #: dbem_events.php:383
430
  msgid "Insert the address of the notification sender. It must corresponds with your gmail account user"
431
  msgstr "Inserire l'indirizzo del mittente della notifica. Se si utilizza GMail, deve corrispondere al nome utente Gmail"
432
 
433
+ #: dbem_events.php:384
434
  msgid "Default notification receiver address"
435
  msgstr "Indirizzo di ricezione delle notifiche predefinito"
436
 
437
+ #: dbem_events.php:384
438
  msgid "Insert the address of the receiver of your notifications"
439
  msgstr "Inserire l'indirizzo del destinatario delle notifiche"
440
 
441
+ #: dbem_events.php:385
442
  msgid "The port through which you e-mail notifications will be sent. Make sure the firewall doesn't block this port"
443
  msgstr "La porta utilizzata per inviare le notifiche via e-mail. Accertarsi che la porta non sia bloccata da un firewall"
444
 
445
+ #: dbem_events.php:386
446
  msgid "Mail sending method"
447
  msgstr "Metodo di invio delle e-mail"
448
 
449
+ #: dbem_events.php:386
450
  msgid "PHP mail function"
451
  msgstr "Funzione mail di PHP"
452
 
453
+ #: dbem_events.php:386
454
  msgid "Select the method to send email notification."
455
  msgstr "Selezionare il metoto per inviare le notifiche e-mail"
456
 
457
+ #: dbem_events.php:387
458
  msgid "Use SMTP authentication?"
459
  msgstr "Utilizzare l'autenticazione SMTP?"
460
 
461
+ #: dbem_events.php:387
462
  msgid "SMTP authenticatio is often needed. If you use GMail, make sure to set this parameter to Yes"
463
  msgstr "Spesso è necessario utilizzare l'autenticazione SMTP. Se si utilizza GMail, impostare questo parametro su Sì."
464
 
465
+ #: dbem_events.php:388
466
  msgid "The SMTP host. Usually it corresponds to 'localhost'. If you use GMail, set this value to 'ssl://smtp.gmail.com:465'."
467
  msgstr "L'host SMTP. Generalmente corrisponde a 'localhost'. Se si utilizza GMail, impostare questo valore su 'ssl://smtp.gmail.com:465'."
468
 
469
+ #: dbem_events.php:389
470
  msgid "SMTP username"
471
  msgstr "Nome utente SMTP"
472
 
473
+ #: dbem_events.php:389
474
  msgid "Insert the username to be used to access your SMTP server."
475
  msgstr "Inserire il nome utente da utilizzare per l'accesso al server SMTP."
476
 
477
+ #: dbem_events.php:390
478
  msgid "SMTP password"
479
  msgstr "PAssword SMTP"
480
 
481
+ #: dbem_events.php:390
482
  msgid "Insert the password to be used to access your SMTP server"
483
  msgstr "Inserire la password da utilizzare per accedere al proprio server SMTP."
484
 
485
+ #: dbem_events.php:398
486
  msgid "Images size"
487
  msgstr "Dimensioni immagini"
488
 
489
+ #: dbem_events.php:401
490
  msgid "Maximum width (px)"
491
  msgstr "Larghezza massima (px)"
492
 
493
+ #: dbem_events.php:401
494
  msgid "The maximum allowed width for images uploades"
495
  msgstr "La larghezza massima consentita per le immagini caricate"
496
 
497
+ #: dbem_events.php:402
498
  msgid "Maximum height (px)"
499
  msgstr "Altezza massimaa (px)"
500
 
501
+ #: dbem_events.php:402
502
  msgid "The maximum allowed width for images uploaded, in pixels"
503
  msgstr "La larghezza massima delle immagini caricate, in pixel"
504
 
505
+ #: dbem_events.php:403
506
  msgid "Maximum size (bytes)"
507
  msgstr "Dimensioni massime (byte)"
508
 
509
+ #: dbem_events.php:403
510
  msgid "The maximum allowed size for images uploaded, in pixels"
511
  msgstr "La dimensione massima consentita per le immmagini, in pixel"
512
 
513
+ #: dbem_events.php:411
514
  msgid "Save Changes"
515
  msgstr "Salva le modifiche"
516
 
517
+ #: dbem_events.php:911
518
  #, php-format
519
  msgid ""
520
+ "<p>Hey, <strong>%s</strong>, welcome to <strong>Events Manager</strong>! We hope you like it around here.</p> \r\n"
521
+ "\t<p>Now it's time to insert events lists through <a href='%s' title='Widgets page'>widgets</a>, <a href='%s' title='Template tags documentation'>template tags</a> or <a href='%s' title='Shortcodes documentation'>shortcodes</a>.</p>\r\n"
522
+ "\t<p>By the way, have you taken a look at the <a href='%s' title='Change settings'>Settings page</a>? That's where you customize the way events and locations are displayed.</p>\r\n"
523
  "\t<p>What? Tired of seeing this advice? I hear you, <a href='%s' title='Don't show this advice again'>click here</a> and you won't see this again!</p>"
524
  msgstr ""
525
+ "<p>Hey, <strong>%s</strong>, <strong>Events Manager</strong> ti dà il benvenuto a bordo! </p> \r\n"
526
+ "\t<p>Ora è il momento di inserire un elenco degli eventi con <a href='%s' title='Pagina widget'>widgets</a>, <a href='%s' title='Template tag, documentazione'>template tag</a> o <a href='%s' title='Shortcode, documentaizone'>shortcode</a>.</p>\r\n"
527
+ "\t<p>Dimenticavo, hai dato un'occhiata alla <a href='%s' title='Change settings'>pagina delle Impostazioni</a>? Troverai un sacco di parametri per ottimizzare la visualizzazione degli eventi.</p>\r\n"
528
  "\t<p>Cosa? Stufo di questa pappardella? Capisco, <a href='%s' title='Non mostrare più questo avviso'>fai clic qui</a> per non vedere più questo avviso.</p>"
529
 
530
+ #: dbem_events.php:955
531
  msgid "New Event ..."
532
  msgstr "Nuovo evento..."
533
 
534
+ #: dbem_events.php:960
535
+ #: dbem_events.php:965
536
  #: dbem_widgets.php:90
537
  msgid "Past events"
538
  msgstr "Eventi passati"
539
 
540
+ #: dbem_events.php:961
541
+ #: dbem_events.php:966
542
  #: dbem_widgets.php:89
543
  msgid "All events"
544
  msgstr "Tutti gli eventi"
545
 
546
+ #: dbem_events.php:962
547
+ #: dbem_events.php:967
548
  #: dbem_widgets.php:88
549
  msgid "Future events"
550
  msgstr "Eventi futuri"
551
 
552
+ #: dbem_events.php:975
553
  msgid "Total"
554
  msgstr "Totali"
555
 
556
+ #: dbem_events.php:987
557
  msgid "Bulk Actions"
558
  msgstr "Azioni "
559
 
560
+ #: dbem_events.php:990
561
  msgid "Delete selected"
562
  msgstr "Elimina selezionati"
563
 
564
+ #: dbem_events.php:994
565
  msgid "Apply"
566
  msgstr "Applica"
567
 
568
+ #: dbem_events.php:1009
569
  msgid "Filter"
570
  msgstr "Filtro"
571
 
572
+ #: dbem_events.php:1024
573
+ #: dbem_events.php:1459
574
+ #: dbem_events.php:1919
575
+ #: dbem_locations.php:229
576
+ #: dbem_locations.php:237
577
  #: dbem_people.php:90
578
  #: dbem_rsvp.php:18
579
+ #: dbem_rsvp.php:53
580
+ #: marcus-extras.php:148
581
+ #: marcus-extras.php:155
582
  msgid "Name"
583
  msgstr "Nome"
584
 
585
+ #: dbem_events.php:1030
586
+ #: dbem_events.php:1562
587
+ #: dbem_events.php:1921
588
  msgid "Location"
589
  msgstr "Luogo"
590
 
591
+ #: dbem_events.php:1033
592
  msgid "Date and time"
593
  msgstr "Giorno e ora"
594
 
595
+ #: dbem_events.php:1043
596
  msgid "D d M Y"
597
  msgstr "D d M Y"
598
 
599
+ #: dbem_events.php:1070
600
+ #: dbem_events.php:1425
601
+ msgid "Category"
602
+ msgstr "Categoria"
603
+
604
+ #: dbem_events.php:1081
605
+ msgid "Duplicate this event"
606
+ msgstr "Duplica questo evento"
607
+
608
+ #: dbem_events.php:1210
609
  msgid "Daily"
610
  msgstr "Quotidiana"
611
 
612
+ #: dbem_events.php:1210
613
  msgid "Weekly"
614
  msgstr "Settimanale"
615
 
616
+ #: dbem_events.php:1210
617
  msgid "Monthly"
618
  msgstr "Mensile"
619
 
620
+ #: dbem_events.php:1211
621
  msgid "Mon"
622
  msgstr "Lun"
623
 
624
+ #: dbem_events.php:1211
625
  msgid "Tue"
626
  msgstr "Mar"
627
 
628
+ #: dbem_events.php:1211
629
  msgid "Wed"
630
  msgstr "Mer"
631
 
632
+ #: dbem_events.php:1211
633
  msgid "Thu"
634
  msgstr "Gio"
635
 
636
+ #: dbem_events.php:1211
637
  msgid "Fri"
638
  msgstr "Ven"
639
 
640
+ #: dbem_events.php:1211
641
  msgid "Sat"
642
  msgstr "Sab"
643
 
644
+ #: dbem_events.php:1211
645
  msgid "Sun"
646
  msgstr "Dom"
647
 
648
+ #: dbem_events.php:1213
649
  msgid "first"
650
  msgstr "primo"
651
 
652
+ #: dbem_events.php:1213
653
  msgid "second"
654
  msgstr "secondo"
655
 
656
+ #: dbem_events.php:1213
657
  msgid "third"
658
  msgstr "terzo"
659
 
660
+ #: dbem_events.php:1213
661
  msgid "fourth"
662
  msgstr "quarto"
663
 
664
+ #: dbem_events.php:1213
665
  msgid "last"
666
  msgstr "ultimo"
667
 
668
+ #: dbem_events.php:1228
669
  msgid "WARNING: This is a recurrence."
670
  msgstr "ATTENZIONE: questa è una ricorrenza."
671
 
672
+ #: dbem_events.php:1231
673
  msgid "Modifying these data all the events linked to this recurrence will be rescheduled"
674
  msgstr "Se si modificano i dati tutti gli eventi collegati a questa ricorrenza verranno riprogrammati"
675
 
676
+ #: dbem_events.php:1234
677
  msgid "WARNING: This is a recurring event."
678
  msgstr "ATTENZIONE: questo è un'evento ricorrente"
679
 
680
+ #: dbem_events.php:1235
681
  msgid "If you change these data and save, this will become an independent event."
682
  msgstr "Se si cambiano questi dati e si effettua un salvataggio, questo evento diverrà indipendente."
683
 
684
+ #: dbem_events.php:1256
685
  msgid "Recurrence"
686
  msgstr "Ricorrenza"
687
 
688
+ #: dbem_events.php:1274
689
  msgid "Repeated event"
690
  msgstr "Eventi ripetuti"
691
 
692
+ #: dbem_events.php:1287
693
+ #: dbem_events.php:1312
694
  msgid "Every"
695
  msgstr "Ogni"
696
 
697
+ #: dbem_events.php:1294
698
  msgid "day"
699
  msgstr "giorno"
700
 
701
+ #: dbem_events.php:1296
702
  msgid "days"
703
  msgstr "giorni"
704
 
705
+ #: dbem_events.php:1298
706
  msgid "week"
707
  msgstr "settimana"
708
 
709
+ #: dbem_events.php:1300
710
  msgid "weeks"
711
  msgstr "settimane"
712
 
713
+ #: dbem_events.php:1302
714
  msgid "month"
715
  msgstr "mese"
716
 
717
+ #: dbem_events.php:1304
718
  msgid "months"
719
  msgstr "mesi"
720
 
721
+ #: dbem_events.php:1328
722
  msgid "Check if your event happens more than once according to a regular pattern"
723
  msgstr "Selezionare se l'evento si ripete secondo uno schema regolare"
724
 
725
+ #: dbem_events.php:1334
726
  msgid "This is't a recurrent event"
727
  msgstr "Questo non è un evento ricorrente"
728
 
729
+ #: dbem_events.php:1366
730
  msgid "Contact Person"
731
  msgstr "Responsabile dell'evento"
732
 
733
+ #: dbem_events.php:1370
734
+ msgid "Contact"
735
+ msgstr "Contatto"
736
+
737
+ #: dbem_events.php:1372
738
+ #: dbem_events.php:1433
739
  msgid "Select..."
740
  msgstr "Seleziona..."
741
 
742
+ #: dbem_events.php:1380
743
+ msgid "RSVP"
744
+ msgstr "RSVP"
745
+
746
+ #: dbem_events.php:1387
747
  msgid "Enable registration for this event"
748
  msgstr "Abilitare la registrazione per questo evento"
749
 
750
+ #: dbem_events.php:1398
751
  #: dbem_rsvp.php:247
752
  msgid "Spaces"
753
  msgstr "Posti"
754
 
755
+ #: dbem_events.php:1428
756
+ msgid "Category:"
757
+ msgstr "Categoria:"
758
+
759
+ #: dbem_events.php:1468
760
  msgid "The event name. Example: Birthday party"
761
  msgstr "Il nome dell'evento. Esempio: festa di compleanno."
762
 
763
+ #: dbem_events.php:1474
764
  msgid "Event date"
765
  msgstr "Date dell'evento"
766
 
767
+ #: dbem_events.php:1479
768
  msgid "Recurrence dates"
769
  msgstr "Date della ricorrenza"
770
 
771
+ #: dbem_events.php:1503
772
  msgid "The event date."
773
  msgstr "La data dell'evento"
774
 
775
+ #: dbem_events.php:1506
776
+ msgid "When not reoccurring, this event spans between the beginning and end date."
777
+ msgstr "Quando non ripetuto, le date di inizio e fine indicano la durata dell'evento,"
778
+
779
+ #: dbem_events.php:1512
780
  msgid "The recurrence beginning and end date."
781
  msgstr "Le date di inizio e fine della ricorrenza"
782
 
783
+ #: dbem_events.php:1519
784
  msgid "Event time"
785
  msgstr "Ora dell'evento"
786
 
787
+ #: dbem_events.php:1536
788
  msgid "The time of the event beginning and end"
789
  msgstr "L'ora di inizio e fine dell'evento"
790
 
791
+ #: dbem_events.php:1542
792
  msgid "Coordinates"
793
  msgstr "Coordinate"
794
 
795
+ #: dbem_events.php:1569
796
  msgid "Name:"
797
  msgstr "Nome:"
798
 
799
+ #: dbem_events.php:1584
800
  #: dbem_locations.php:160
801
+ #: dbem_locations.php:314
802
  msgid "Map not found"
803
  msgstr "Mappa non trovata"
804
 
805
+ #: dbem_events.php:1597
806
  msgid "The name of the location where the event takes place. You can use the name of a venue, a square, etc"
807
  msgstr "Il nome del locale dove avviene l'evento. È possibile usare il nome di un locale, di una piazza, ecc"
808
 
809
+ #: dbem_events.php:1602
810
  msgid "Address:"
811
  msgstr "Indirizzo:"
812
 
813
+ #: dbem_events.php:1612
814
  msgid "The address of the location where the event takes place. Example: 21, Dominick Street"
815
  msgstr "L'indirizzo del luogo dove si tiene l'evento. Esempio: Arena"
816
 
817
+ #: dbem_events.php:1617
818
  msgid "Town:"
819
  msgstr "Città:"
820
 
821
+ #: dbem_events.php:1626
822
  msgid "The town where the location is located. If you're using the Google Map integration and want to avoid geotagging ambiguities include the country in the town field. Example: Verona, Italy."
823
  msgstr "La città dell'evento. Se si utilizza Google Map e si vogliono evitare ambiguità, inserire anche lo stato. Esempio: Verona, Italy"
824
 
825
+ #: dbem_events.php:1635
826
  msgid "Details"
827
  msgstr "Dettagli"
828
 
829
+ #: dbem_events.php:1646
830
  msgid "Details about the event"
831
  msgstr "Note sull'evento"
832
 
833
+ #: dbem_events.php:1653
834
+ msgid "Attributes"
835
+ msgstr "Attributi"
836
+
837
+ #: dbem_events.php:1665
838
  msgid "Submit Event"
839
  msgstr "Invia evento"
840
 
841
+ #: dbem_events.php:1687
842
  msgid "Missing fields: "
843
  msgstr "Campi obbligatori mancanti:"
844
 
845
+ #: dbem_events.php:1689
846
  msgid "Since the event is repeated, you must specify an event date."
847
  msgstr "Per gli eventi ripetuti è necessario specificare una data di fine."
848
 
849
+ #: dbem_events.php:1920
850
  msgid "Date"
851
  msgstr "Data"
852
 
853
+ #: dbem_events.php:1922
854
+ #: dbem_locations.php:230
855
+ #: dbem_locations.php:238
856
  msgid "Address"
857
  msgstr "Indirizzo"
858
 
859
+ #: dbem_events.php:1923
860
+ #: dbem_locations.php:231
861
+ #: dbem_locations.php:239
862
  msgid "Town"
863
  msgstr "Città"
864
 
865
+ #: dbem_events.php:1941
866
  msgid "Some required fields are missing:"
867
  msgstr "Mancano alcuni campi obbligatori:"
868
 
869
+ #: dbem_events.php:1945
870
  msgid "Since the event is repeated, you must specify an end date"
871
  msgstr "Per gli eventi ripetuti è necessario specificare una data di fine"
872
 
873
+ #: dbem_events.php:2106
874
  msgid "You cannot enable Google Maps integration without setting an appropriate API key."
875
  msgstr "Non è possibile abilitare l'integrazione con Google Maps senza impostare una chiave API."
876
 
877
+ #: dbem_events.php:2247
878
  msgid "Add an event"
879
  msgstr "Aggiungi un evento"
880
 
881
+ #: dbem_events.php:2265
882
  #, php-format
883
  msgid "This page corresponds to <strong>Events Manager</strong> events page. Its content will be overriden by <strong>Events Manager</strong>. If you want to display your content, you can can assign another page to <strong>Events Manager</strong> in the the <a href='%s'>Settings</a>. "
884
  msgstr "Questa pagina corriponde alla pagina eventi di <strong>Events Manager</strong>. Il suo contenuto verrà sovrascritto da <strong>Events Manager</strong>. Se vuoi visualizzare il tuo contenuto, puoi assegnare ad <strong>Events Manager</strong> un'altra pagina, tramite le <a href='%s'>Opzioni</a>. "
899
  msgid "The location has been updated."
900
  msgstr "Il luogo è stato aggiornato."
901
 
902
+ #: dbem_locations.php:113
903
  msgid "Edit location"
904
  msgstr "Modifica luogo"
905
 
906
+ #: dbem_locations.php:128
907
+ #: dbem_locations.php:279
908
  msgid "Location name"
909
  msgstr "Nome del uogo"
910
 
911
+ #: dbem_locations.php:130
912
+ #: dbem_locations.php:281
913
  msgid "The name of the location"
914
  msgstr "Il nome del luogo"
915
 
916
+ #: dbem_locations.php:134
917
+ #: dbem_locations.php:285
918
  msgid "Location address"
919
  msgstr "Indirizzo del luogo"
920
 
921
+ #: dbem_locations.php:136
922
+ #: dbem_locations.php:287
923
  msgid "The address of the location"
924
  msgstr "L'indirizzo del luogo"
925
 
926
+ #: dbem_locations.php:141
927
+ #: dbem_locations.php:291
928
  msgid "Location town"
929
  msgstr "Città del luogo"
930
 
931
+ #: dbem_locations.php:143
932
  msgid "The town where the location is located"
933
  msgstr "La città del luogo"
934
 
936
  msgid "Location map"
937
  msgstr "Mappa del luogo"
938
 
939
+ #: dbem_locations.php:168
940
+ #: dbem_locations.php:319
941
  msgid "Location description"
942
  msgstr "Descrizione del luogo"
943
 
944
+ #: dbem_locations.php:174
945
+ #: dbem_locations.php:324
946
  msgid "A description of the Location. You may include any kind of info here."
947
  msgstr "Una descrizione del luogo. In quetso campo è possibile includere qualsiasi tipo di informazione."
948
 
949
+ #: dbem_locations.php:179
950
+ #: dbem_locations.php:306
951
  msgid "Location image"
952
  msgstr "Immagine del luogo"
953
 
954
+ #: dbem_locations.php:184
955
  msgid "No image uploaded for this location yet"
956
  msgstr "Nessuna immagine caricata per questo luogo"
957
 
958
+ #: dbem_locations.php:189
959
  msgid "Upload/change picture"
960
  msgstr "Carica/cambia immagine"
961
 
962
+ #: dbem_locations.php:193
963
  msgid "Update location"
964
  msgstr "Aggiorna il luogo"
965
 
966
+ #: dbem_locations.php:209
967
+ #: events-manager.php:459
968
  msgid "Locations"
969
  msgstr "Luoghi"
970
 
971
+ #: dbem_locations.php:264
972
  msgid "No venues have been inserted yet!"
973
  msgstr "Non sono ancora stati inseriti luoghi!"
974
 
975
+ #: dbem_locations.php:274
976
+ #: dbem_locations.php:327
977
  msgid "Add location"
978
  msgstr "Aggiungi un luogo"
979
 
980
+ #: dbem_locations.php:293
981
  msgid "The town of the location"
982
  msgstr "La città del luogo."
983
 
984
+ #: dbem_locations.php:308
985
  msgid "Select an image to upload"
986
  msgstr "Selezionare un'immagine da caricare."
987
 
988
+ #: dbem_locations.php:395
 
 
 
 
989
  msgid " is missing!"
990
  msgstr "non è presente!"
991
 
992
+ #: dbem_locations.php:403
993
  msgid "The image file is too big! Maximum size:"
994
  msgstr "Il file dell'immagine è troppo grande! Dimensione massima:"
995
 
996
+ #: dbem_locations.php:408
997
  msgid "The image is too big! Maximum size allowed:"
998
  msgstr "L'immagine è troppo grande! Dimensioni massime:"
999
 
1000
+ #: dbem_locations.php:410
1001
  msgid "The image is in a wrong format!"
1002
  msgstr "L'immagine non è nel formato corretto!"
1003
 
1004
+ #: dbem_locations.php:417
1005
  msgid "Ach, some problems here:"
1006
  msgstr "Accidenti, ci sono dei problemi:"
1007
 
1008
+ #: dbem_locations.php:478
1009
  msgid "The image could not be loaded"
1010
  msgstr "Impossibile caricare l'immagine"
1011
 
1018
  msgstr "E-mail"
1019
 
1020
  #: dbem_people.php:92
1021
+ #: dbem_people.php:196
1022
+ #: dbem_people.php:199
1023
  #: dbem_rsvp.php:20
1024
  msgid "Phone number"
1025
  msgstr "Numero di telefono"
1029
  msgid "Seats"
1030
  msgstr "Posti"
1031
 
1032
+ #: dbem_people.php:94
1033
+ #: dbem_rsvp.php:26
1034
+ msgid "Comment"
1035
+ msgstr "Commento"
1036
+
1037
+ #: dbem_people.php:108
1038
  msgid "Booked"
1039
  msgstr "Prenotati"
1040
 
1041
+ #: dbem_people.php:113
1042
  msgid "Available"
1043
  msgstr "Disponibili"
1044
 
1045
+ #: dbem_people.php:128
1046
  msgid "No people have responded to your events yet!"
1047
  msgstr "Nessuno ha ancora risposto all'evento!"
1048
 
1049
+ #: dbem_people.php:130
1050
  msgid "This table collects the data about the people who responded to your events"
1051
  msgstr "Questa tabella raccoglie le informazioni sugli utenti che si sono registrati per gli eventi"
1052
 
1053
+ #: dbem_people.php:201
1054
  msgid "The phone number used by Events Manager when the user is indicated as the contact person for an event."
1055
  msgstr "Il numero telefonico utilizzato da Events Manager quando l'utente è indicato come contatto per l'evento."
1056
 
1059
  msgstr "Prenota ora!"
1060
 
1061
  #: dbem_rsvp.php:19
1062
+ #: dbem_rsvp.php:54
1063
  msgid "E-Mail"
1064
  msgstr "E-Mail"
1065
 
1066
+ #: dbem_rsvp.php:28
1067
  msgid "Send your booking"
1068
  msgstr "Invia la prenotazione"
1069
 
1070
+ #: dbem_rsvp.php:45
1071
+ #: dbem_rsvp.php:57
1072
  msgid "Cancel your booking"
1073
  msgstr "Annulla una prenotazione"
1074
 
1075
+ #: dbem_rsvp.php:89
1076
  msgid "There are no bookings associated to this name and e-mail"
1077
  msgstr "Non ci sono prenotazioni associate a questa combinazione nome/e-mail"
1078
 
1079
+ #: dbem_rsvp.php:115
1080
  msgid "Your booking has been recorded"
1081
  msgstr "La prenotazione è stata registrata"
1082
 
1083
+ #: dbem_rsvp.php:122
1084
+ msgid "Booking cannot be made not enough seats available!"
1085
+ msgstr "Impossibile prenotare - non ci sono abbastanza posti disponibili."
1086
 
1087
+ #: dbem_rsvp.php:164
1088
  msgid "Booking deleted"
1089
  msgstr "Prenotazione eliminata."
1090
 
1104
  msgid "Available spaces"
1105
  msgstr "Posti disponibili"
1106
 
1107
+ #: dbem_rsvp.php:258
1108
+ msgid "Comment:"
1109
+ msgstr "Commento:"
1110
+
1111
+ #: dbem_rsvp.php:275
1112
  msgid "Printable view"
1113
  msgstr "Versione stampabile"
1114
 
1115
+ #: dbem_rsvp.php:283
1116
  msgid "No responses yet!"
1117
  msgstr "Non c'è ancora nessuan risposta!"
1118
 
1119
+ #: dbem_rsvp.php:354
1120
  msgid "New booking"
1121
  msgstr "Nuova prenotazione"
1122
 
1123
+ #: dbem_rsvp.php:355
1124
  msgid "Reservation confirmed"
1125
  msgstr "Prenotazione confermata"
1126
 
1127
  #: dbem_widgets.php:10
1128
  #: dbem_widgets.php:35
1129
  #: events-manager.php:44
1130
+ #: events-manager.php:405
1131
+ #: events-manager.php:406
1132
+ #: events-manager.php:453
1133
  msgid "Events"
1134
  msgstr "Eventi"
1135
 
1136
  #: dbem_widgets.php:19
1137
  #: events-manager.php:50
1138
+ #: events-manager.php:398
1139
  msgid "No events"
1140
  msgstr "Nessun evento"
1141
 
1142
  #: dbem_widgets.php:78
1143
+ #: dbem_widgets.php:158
1144
  msgid "Title"
1145
  msgstr "Titolo"
1146
 
1172
  msgid "calendar"
1173
  msgstr "calendario "
1174
 
1175
+ #: dbem_widgets.php:163
1176
+ msgid "Show Long Events?"
1177
+ msgstr "Mostra event lunghi?"
1178
+
1179
+ #: dbem_widgets.php:182
1180
+ #: dbem_widgets.php:183
1181
  msgid "Events List"
1182
  msgstr "Lista eventi"
1183
 
1184
+ #: dbem_widgets.php:184
1185
+ #: dbem_widgets.php:185
1186
  msgid "Events Calendar"
1187
  msgstr "Calendario eventi"
1188
 
1190
  msgid "<li>No events in this location</li>"
1191
  msgstr "<li>Nessun evento in questo luogo</li>"
1192
 
1193
+ #: events-manager.php:389
1194
  msgid "#_RESPNAME (#_RESPEMAIL) will attend #_NAME on #m #d, #Y. He wants to reserve #_SPACES spaces.<br/> Now there are #_RESERVEDSPACES spaces reserved, #_AVAILABLESPACES are still available.<br/>Yours faithfully,<br/>Events Manager"
1195
  msgstr "#_RESPNAME (#_RESPEMAIL) parteciperà all'evento #_NAME su #m #d, #Y. Vuole prenotare #_SPACES posti.<br/> Ora ci sono #_RESERVEDSPACES posti prenotati, #_AVAILABLESPACES sono ancora liberi.<br/>A presto,<br/>Events Manager"
1196
 
1197
+ #: events-manager.php:390
1198
  msgid "Dear #_RESPNAME, <br/>you have successfully reserved #_SPACES space/spaces for #_NAME.<br/>Yours faithfully,<br/> #_CONTACTPERSON"
1199
  msgstr "#_RESPNAME, <br/>la prenotazione di #_SPACES posto/i a nome di #_NAME è andata a buon fine.<br/>A presto,<br/> #_CONTACTPERSON"
1200
 
1201
+ #: events-manager.php:442
1202
  msgid "events"
1203
  msgstr "eventi"
1204
 
1205
+ #: events-manager.php:455
1206
+ #: events-manager.php:485
1207
  msgid "Edit"
1208
  msgstr "Modifica"
1209
 
1210
+ #: events-manager.php:457
1211
  msgid "Add new"
1212
  msgstr "Aggiungi nuovo"
1213
 
1214
+ #: events-manager.php:461
1215
  msgid "People"
1216
  msgstr "Persone"
1217
 
1218
+ #: events-manager.php:464
1219
  msgid "Events Manager Settings"
1220
  msgstr "Impostazioni di Events Manager"
1221
 
1222
+ #: events-manager.php:464
1223
  msgid "Settings"
1224
  msgstr "Impostazioni"
1225
 
1226
+ #: marcus-extras.php:27
1227
+ msgid "Event Categories"
1228
+ msgstr "Categorie evento"
1229
+
1230
+ #: marcus-extras.php:27
1231
+ #: marcus-extras.php:124
1232
+ msgid "Categories"
1233
+ msgstr "Categorie"
1234
+
1235
+ #: marcus-extras.php:147
1236
+ #: marcus-extras.php:154
1237
+ msgid "ID"
1238
+ msgstr "ID"
1239
+
1240
+ #: marcus-extras.php:181
1241
+ msgid "No categories have been inserted yet!"
1242
+ msgstr "Non è ancora stata inserita alcuna categoria!"
1243
+
1244
+ #: marcus-extras.php:194
1245
+ #: marcus-extras.php:202
1246
+ msgid "Add category"
1247
+ msgstr "Aggiungi una categoria"
1248
+
1249
+ #: marcus-extras.php:198
1250
+ #: marcus-extras.php:243
1251
+ msgid "Category name"
1252
+ msgstr "Nome della categoria"
1253
+
1254
+ #: marcus-extras.php:200
1255
+ #: marcus-extras.php:245
1256
+ msgid "The name of the category"
1257
+ msgstr "Il nome della categoria"
1258
+
1259
+ #: marcus-extras.php:225
1260
+ msgid "Edit category"
1261
+ msgstr "Modifica la categoria"
1262
+
1263
+ #: marcus-extras.php:248
1264
+ msgid "Update category"
1265
+ msgstr "Aggiorna la categoria"
1266
+
1267
+ #: marcus-extras.php:328
1268
+ msgid "Not defined in templates"
1269
+ msgstr "Non definito nei template"
1270
+
1271
+ #: marcus-extras.php:371
1272
+ msgid "In order to use attributes, you must define some in your templates, otherwise they'll never show. Go to Events > Settings to add attribute placeholders."
1273
+ msgstr "Per utilizzare gli attributi è necessario definirli nei template, altrimenti non verranno visualizzate. Cliccare su Eventi > Impostazioni per aggiungere segnaposti per gli attributi."
1274
+
1275
+ #~ msgid ""
1276
+ #~ "This content will appear just above your code for the default event list "
1277
+ #~ "format. Default is <code>&lt;ul class='dbem_events_list'&gt;</code>"
1278
+ #~ msgstr ""
1279
+ #~ "Questo contenuto appare in cima alla lista eventi. Il calore predefinito "
1280
+ #~ "è <code>&lt;ul class='dbem_events_list'&gt;</code>"
1281
+
1282
+ #~ msgid "Sorry, there aren't so many seats available!"
1283
+ #~ msgstr "Accidenti, non ci sono posti disponibili!"
1284
+
1285
+ #~ msgid ""
1286
+ #~ "A description of the location. You may include any kind of info here."
1287
+ #~ msgstr ""
1288
+ #~ "Una descrizione del luogo. In questo campo è possibile inserire qualsiasi "
1289
+ #~ "tipo di informazione."
1290
+
1291
  #~ msgid "end date before begin date"
1292
  #~ msgstr "la data finale precede quella iniziale"
1293
+
1294
  #~ msgid "Example:"
1295
  #~ msgstr "Esempio: "
1296
+
1297
  #~ msgid "Example: 2008-11-28"
1298
  #~ msgstr "Esempio: 2008-11-28"
1299
+
1300
  #~ msgid "The format the text appearing in the map cloud."
1301
  #~ msgstr "Il fomato del testo del fumetto che appare sulla mappa."
1302
+
1303
  #~ msgid "Follow the previous formatting instructions."
1304
  #~ msgstr "Seguire le istruzioni di formattazione precedenti."
1305
+
1306
  #~ msgid "here"
1307
  #~ msgstr "questa pagina"
1308
+
1309
  #~ msgid "The format of a single location page title."
1310
  #~ msgstr "Il formato del titolo della pagina di un singolo luogo."
1311
 
1312
  #, fuzzy
1313
  #~ msgid "Location picture"
1314
  #~ msgstr "Luogo"
1315
+
1316
  #~ msgid "M_Monday_initial"
1317
  #~ msgstr "L"
1318
+
1319
  #~ msgid "T_Tuesday_initial"
1320
  #~ msgstr "M"
1321
+
1322
  #~ msgid "F_Friday_initial"
1323
  #~ msgstr "V"
1324
+
1325
  #~ msgid "S_Sunday_initial"
1326
  #~ msgstr "D"
1327
+
1328
  #~ msgid "The format of any events in a list."
1329
  #~ msgstr "Il formato di ciascun evento della lista."
1330
+
1331
  #~ msgid ""
1332
  #~ "Insert one or more of the following placeholders: <code>#_NAME</code>, "
1333
  #~ "<code>#_LOCATION</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, "
1340
  #~ "<code>#_NOTES</code>. Utilizzare <code>#_LINKEDNAME</code> per il nome "
1341
  #~ "dell'evento con un link alla pagina corrispondente. Utilizzare #_URL per "
1342
  #~ "visualizzare l'URL dell'evento e creare link personalizzati."
1343
+
1344
  #~ msgid ""
1345
  #~ "To insert date and time values, use <a href=\"http://www.php.net/manual/"
1346
  #~ "en/function.date.php\">PHP time format characters</a> with a # symbol "
1349
  #~ "Per inserire valori di data e ora, utilizzare i <a href=\"http://www.php."
1350
  #~ "net/manual/it/function.date.php\">caratteri di stringa formato PHP</a> "
1351
  #~ "anteponendo ad essi un #, ad esempio #m. #M, #j, etc. "
1352
+
1353
  #~ msgid "Use HTML tags as <code>li</code>, <code>br</code>, etc."
1354
  #~ msgstr ""
1355
  #~ "Utilizzare liberamente tag HTML come <code>li</code>, <code>br</code>, "
1356
  #~ "ecc."
1357
+
1358
  #~ msgid "Use <code>#_MAP</code> to insert a map."
1359
  #~ msgstr "Utilizzare <code>#_MAP</code> per inserire una mappa."
1360
+
1361
  #~ msgid "The format of the description of each item in the events RSS feed."
1362
  #~ msgstr "Il formato della descrizione di ciascun elemento nel feed RSS."
1363
+
 
1364
  #~ msgid "Time"
1365
  #~ msgstr "Ora"
1366
+
1367
  #~ msgid "Latitude"
1368
  #~ msgstr "Latitudine"
1369
+
1370
  #~ msgid "Longitude"
1371
  #~ msgstr "Longitudine"
1372
+
1373
  #~ msgid "Are you sure?"
1374
  #~ msgstr "Sei sicuro?"
1375
+
1376
  #~ msgid "Delete"
1377
  #~ msgstr "Elimina"
1378
+
1379
  #~ msgid "Notes"
1380
  #~ msgstr "Note"
1381
+
1382
  #~ msgid ""
1383
  #~ "You are about to delete this event.\\n 'Cancel' to stop, 'OK' to delete."
1384
  #~ msgstr ""
1385
  #~ "Stai per cancellare questo evento.\\n \\'Cancel\\' per annullare "
1386
  #~ "l'opererazione, \\'Ok\\' per cancellare."
1387
+
1388
  #~ msgid "Widget Title"
1389
  #~ msgstr "Titolo"
 
langs/dbem-pt_BR.mo ADDED
Binary file
langs/dbem-pt_BR.po ADDED
@@ -0,0 +1,1370 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: events-manager\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2009-12-07 19:11+0100\n"
6
+ "PO-Revision-Date: 2010-02-20 03:34-0300\n"
7
+ "Last-Translator: Heavyworks <heavyworks@heavyworks.net>\n"
8
+ "Language-Team: \n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-Language: Portuguese\n"
13
+ "X-Poedit-Country: BRAZIL\n"
14
+ "X-Poedit-SourceCharset: utf-8\n"
15
+ "X-Poedit-Basepath: .\n"
16
+ "X-Poedit-KeywordsList: _e;__\n"
17
+ "X-Poedit-SearchPath-0: .\n"
18
+
19
+ #: dbem-recurrence.php:225
20
+ msgid "Monday"
21
+ msgstr "Segunda-Feira"
22
+
23
+ #: dbem-recurrence.php:225
24
+ msgid "Tuesday"
25
+ msgstr "Terça-Feira"
26
+
27
+ #: dbem-recurrence.php:225
28
+ msgid "Wednesday"
29
+ msgstr "Quarta-Feira"
30
+
31
+ #: dbem-recurrence.php:225
32
+ msgid "Thursday"
33
+ msgstr "Quinta-Feira"
34
+
35
+ #: dbem-recurrence.php:225
36
+ msgid "Friday"
37
+ msgstr "Sexta-Feira"
38
+
39
+ #: dbem-recurrence.php:225
40
+ msgid "Saturday"
41
+ msgstr "Sábado"
42
+
43
+ #: dbem-recurrence.php:225
44
+ msgid "Sunday"
45
+ msgstr "Domingo"
46
+
47
+ #: dbem-recurrence.php:226
48
+ #, php-format
49
+ msgid "the first %s of the month"
50
+ msgstr "A primeira %s do mês"
51
+
52
+ #: dbem-recurrence.php:226
53
+ #, php-format
54
+ msgid "the second %s of the month"
55
+ msgstr "A segunda %s do mês"
56
+
57
+ #: dbem-recurrence.php:226
58
+ #, php-format
59
+ msgid "the third %s of the month"
60
+ msgstr "A terceira %s do mês"
61
+
62
+ #: dbem-recurrence.php:226
63
+ #, php-format
64
+ msgid "the fourth %s of the month"
65
+ msgstr "A quarta %s do mês"
66
+
67
+ #: dbem-recurrence.php:226
68
+ #, php-format
69
+ msgid "the last %s of the month"
70
+ msgstr "A última %s do mês"
71
+
72
+ #: dbem-recurrence.php:227
73
+ #, php-format
74
+ msgid "From %1$s to %2$s"
75
+ msgstr "Das %1$s as %2$s"
76
+
77
+ #: dbem-recurrence.php:230
78
+ msgid "everyday"
79
+ msgstr "todo dia"
80
+
81
+ #: dbem-recurrence.php:232
82
+ #, php-format
83
+ msgid "every %s days"
84
+ msgstr "a cada %s dias"
85
+
86
+ #: dbem-recurrence.php:242
87
+ #, php-format
88
+ msgid "every %s weeks"
89
+ msgstr "a cada %s semanas"
90
+
91
+ #: dbem-recurrence.php:253
92
+ #, php-format
93
+ msgid "every %s months"
94
+ msgstr "a cada %s meses"
95
+
96
+ #: dbem_events.php:5
97
+ #: dbem_events.php:191
98
+ msgid "Insert New Event"
99
+ msgstr "Inserir Novo Evento"
100
+
101
+ #: dbem_events.php:137
102
+ msgid "New recurrent event inserted!"
103
+ msgstr "Novo evento recorrente inserido!"
104
+
105
+ #: dbem_events.php:141
106
+ msgid "New event successfully inserted!"
107
+ msgstr "Novo evento inserido!"
108
+
109
+ #: dbem_events.php:150
110
+ msgid "Recurrence updated!"
111
+ msgstr "Recorrência atualizada!"
112
+
113
+ #: dbem_events.php:152
114
+ msgid "Something went wrong with the recurrence update..."
115
+ msgstr "Hovue um erro ao atualizar a recorrência..."
116
+
117
+ #: dbem_events.php:161
118
+ msgid "updated"
119
+ msgstr "atualizado"
120
+
121
+ #: dbem_events.php:183
122
+ msgid "Ach, there's a problem here:"
123
+ msgstr "Argh, temos um problema aqui:"
124
+
125
+ #: dbem_events.php:194
126
+ #: marcus-extras.php:46
127
+ msgid "Edit Event"
128
+ msgstr "Editar Evento"
129
+
130
+ #: dbem_events.php:215
131
+ #: dbem_events.php:1085
132
+ #: dbem_events.php:1319
133
+ msgid "Reschedule"
134
+ msgstr "Reagendar"
135
+
136
+ #: dbem_events.php:231
137
+ msgid "Past Events"
138
+ msgstr "Eventos passados"
139
+
140
+ #: dbem_events.php:234
141
+ msgid "All Events"
142
+ msgstr "Todos os eventos"
143
+
144
+ #: dbem_events.php:237
145
+ msgid "Future Events"
146
+ msgstr "Eventos futuros"
147
+
148
+ #: dbem_events.php:270
149
+ msgid "Event Manager Options"
150
+ msgstr "Opções do Events Manager"
151
+
152
+ #: dbem_events.php:274
153
+ #: dbem_events.php:278
154
+ msgid "Events page"
155
+ msgstr "Página do evento"
156
+
157
+ #: dbem_events.php:278
158
+ msgid "This option allows you to select which page to use as an events page"
159
+ msgstr "Esta opção lhe permite escolher qual página será usado como página de eventos"
160
+
161
+ #: dbem_events.php:279
162
+ msgid "Display calendar in events page?"
163
+ msgstr "Mostrar calendário nas páginas de eventos?"
164
+
165
+ #: dbem_events.php:279
166
+ msgid "This options allows to display the calendar in the events page, instead of the default list. It is recommended not to display both the calendar widget and a calendar page."
167
+ msgstr "Esta opção lhe permite mostrar o calendário na página de eventos ao inves da lista padrão. Não é recomendado mostrar ambos o widget do calendário e uma página de calendário."
168
+
169
+ #: dbem_events.php:282
170
+ msgid "Events format"
171
+ msgstr "Formato dos eventos"
172
+
173
+ #: dbem_events.php:287
174
+ msgid "Default event list format"
175
+ msgstr "Formato padrão da lista de eventos"
176
+
177
+ #: dbem_events.php:288
178
+ msgid "Default event list format header"
179
+ msgstr "Formato padrão do cabecalho da lista de eventos"
180
+
181
+ #: dbem_events.php:288
182
+ msgid "This content will appear just above your code for the default event list format. Default is <code>&lt;ul class=\"dbem_events_list\"&gt;</code>"
183
+ msgstr "Este conteúdo irá aparecer acima do código para formato padrão de lista de eventos. O padrão é <code>&lt;ul class=\"dbem_events_list\"&gt;</code>"
184
+
185
+ #: dbem_events.php:290
186
+ msgid "Default event list format footer"
187
+ msgstr "Formato padrão do rodapé da lista de eventos"
188
+
189
+ #: dbem_events.php:290
190
+ msgid "This content will appear just below your code for the default event list format. Default is <code>&lt;/ul&gt;</code>"
191
+ msgstr "Este conteúdo irá aparecer abaixo do código para formato padrão de lista de eventos. O padrão é <code>&lt;/ul&gt;</code>"
192
+
193
+ #: dbem_events.php:287
194
+ msgid "The format of any events in a list.<br/>Insert one or more of the following placeholders: <code>#_NAME</code>, <code>#_LOCATION</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, <code>#_NOTES</code>.<br/> Use <code>#_EXCERPT</code> to show <code>#_NOTES</code> until you place a &lt;!&ndash;&ndash; more &ndash;&ndash;&gt; marker.<br/> Use <code>#_LINKEDNAME</code> for the event name with a link to the given event page.<br/> Use <code>#_EVENTPAGEURL</code> to print the event page URL and make your own customised links.<br/> Use <code>#_LOCATIONPAGEURL</code> to print the location page URL and make your own customised links.<br/>To insert date and time values, use <a href=\"http://www.php.net/manual/en/function.date.php\">PHP time format characters</a> with a <code>#</code> symbol before them, i.e. <code>#m</code>, <code>#M</code>, <code>#j</code>, etc.<br/> For the end time, put <code>#@</code> in front of the character, ie. <code>#@h</code>, <code>#@i</code>, etc.<br/> You can also create a date format without prepending <code>#</code> by wrapping it in #_{} or #@_{} (e.g. <code>#_{d/m/Y}</code>). If there is no end date, the value is not shown.<br/> Feel free to use HTML tags as <code>li</code>, <code>br</code> and so on.<br/>For custom attributes, you use <code>#_ATT{key}{alternative text}</code>, the second braces are optional and will appear if the attribute is not defined or left blank for that event. This key will appear as an option when adding attributes to your event."
195
+ msgstr "O formato de qualquer evento em uma lista.<br/>Insira uma ou mais dos seguintes marcadores: <code>#_NAME</code>, <code>#_LOCATION</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, <code>#_NOTES</code>.<br/> Utilize <code>#_EXCERPT</code> para mostrar <code>#_NOTES</code> até o marcador &lt;!&ndash;&ndash; more &ndash;&ndash;&gt;.<br/> Utilize <code>#_LINKEDNAME</code> para inserir o nome do evento com um link para sua respectiva página.<br/> Utilize <code>#_EVENTPAGEURL</code> para mostrar a URL da página do evento e criar seus próprios links personalizados.<br/> Utilize <code>#_LOCATIONPAGEURL</code> para mostrar o endereço da página da localização e criar seus próprios links personalizados.<br/>Para inserir valores de data e hora, utilize os <a href=\"http://www.php.net/manual/pt_BR/function.date.php\">os caracteres de data e hora do PHP</a> precedido pelo caractere <code>#</code> , por ex. <code>#m</code>, <code>#M</code>, <code>#j</code>, etc.<br/> Para a hora final do evento, preceda com um <code>#@</code> o caractere, por ex <code>#@h</code>, <code>#@i</code>, etc. É também possível criar um formato de data sem preceder <code>#</code>, envolvendo a data em <code>#_{}</code> ou <code>#@_{}</code> (ex. <code>#_{d/m/Y}</code>). Se a data final não estiver definida, não será exibida.<br/> <br/> Utilize livremente tags como <code>li</code>, <code>br</code> etc.<br/> Para os atributos personalizados utilize <code>#_ATT{chave}{texto alternativo}</code>; O segundo par de chaves é opcional e só aparecerá se o atributo estiver em branco ou não estiver definido no evento. A chave aparecerá como uma opção quando for adicionar atributos para seu evento."
196
+
197
+ #: dbem_events.php:289
198
+ msgid "Single event page title format"
199
+ msgstr "Formato do título da página do evento"
200
+
201
+ #: dbem_events.php:289
202
+ msgid "The format of a single event page title. Follow the previous formatting instructions."
203
+ msgstr "O formato do título da página do evento. Use as instruções de formatação passadas."
204
+
205
+ #: dbem_events.php:290
206
+ msgid "Default single event format"
207
+ msgstr "Formato de um evento"
208
+
209
+ #: dbem_events.php:290
210
+ msgid "The format of a single event page.<br/>Follow the previous formatting instructions. <br/>Use <code>#_MAP</code> to insert a map.<br/>Use <code>#_CONTACTNAME</code>, <code>#_CONTACTEMAIL</code>, <code>#_CONTACTPHONE</code> to insert respectively the name, e-mail address and phone number of the designated contact person. <br/>Use <code>#_ADDBOOKINGFORM</code> to insert a form to allow the user to respond to your events reserving one or more places (RSVP).<br/> Use <code>#_REMOVEBOOKINGFORM</code> to insert a form where users, inserting their name and e-mail address, can remove their bookings."
211
+ msgstr "O formato da página de um evento.<br/> Utilize as informações de formatação anteriores. <br/>Use <code>#_MAP</code> para inserir o mapa GoogleMaps.<br/>Use <code>#_CONTACTNAME</code>, <code>#_CONTACTEMAIL</code>, <code>#_CONTACTPHONE</code> para inserir respectivamente o nome, e-mail e telefone do responsável pelo evento. <br/>Use <code>#_ADDBOOKINGFORM</code> para inserir o módulo de cadastro no evento (RSVP).<br/> Use <code>#_REMOVEBOOKINGFORM</code> para inserir o módulo de cancelamento."
212
+
213
+ #: dbem_events.php:291
214
+ msgid "Show events page in lists?"
215
+ msgstr "Mostrar páginas de eventos nas listas?"
216
+
217
+ #: dbem_events.php:291
218
+ msgid "Check this option if you want the events page to appear together with other pages in pages lists."
219
+ msgstr "Marque esta opção caso deseje que as páginas de eventos apareçam juntas com outras páginas nas listagens de páginas."
220
+
221
+ #: dbem_events.php:292
222
+ msgid "Events page title"
223
+ msgstr "Título da página de eventos"
224
+
225
+ #: dbem_events.php:292
226
+ msgid "The title on the multiple events page."
227
+ msgstr "Título da página de múltiplos eventos."
228
+
229
+ #: dbem_events.php:293
230
+ msgid "No events message"
231
+ msgstr "Mensagem de \"sem eventos\""
232
+
233
+ #: dbem_events.php:293
234
+ msgid "The message displayed when no events are available."
235
+ msgstr "Mensagem exibida quando nenhum evento está disponível."
236
+
237
+ #: dbem_events.php:296
238
+ msgid "Calendar format"
239
+ msgstr "Formato do calendário grande"
240
+
241
+ #: dbem_events.php:302
242
+ msgid "Small calendar title"
243
+ msgstr "Título do calendário pequeno"
244
+
245
+ #: dbem_events.php:302
246
+ msgid "The format of the title that appears when hovering on an eventful calendar day."
247
+ msgstr "O formato do título que aparece ao passar o mouse em cima de um dia com eventos no calendário."
248
+
249
+ #: dbem_events.php:303
250
+ msgid "Small calendar title separator"
251
+ msgstr "Separador do título do calendário pequeno"
252
+
253
+ #: dbem_events.php:303
254
+ msgid "The separator appearing on the above title when more than one events are taking place on the same day."
255
+ msgstr "O separador que aparecerá no título acima quando mais de um evento acontecer no mesmo dia."
256
+
257
+ #: dbem_events.php:299
258
+ msgid "Full calendar events format"
259
+ msgstr "Formato dos eventos no calendário grande"
260
+
261
+ #: dbem_events.php:299
262
+ msgid "The format of each event when displayed in the full calendar. Remember to include <code>li</code> tags before and after the event."
263
+ msgstr "O formato de cada evento quando mostrado no calendário grande. Lembre-se de inserir tags <code>li</code> antes e depois do evento."
264
+
265
+ #: dbem_events.php:305
266
+ msgid "Locations format"
267
+ msgstr "Formato dos locais"
268
+
269
+ #: dbem_events.php:308
270
+ msgid "Single location page title format"
271
+ msgstr "Formato do título da página de local"
272
+
273
+ #: dbem_events.php:308
274
+ msgid "The format of a single location page title.<br/>Follow the previous formatting instructions."
275
+ msgstr "O formato da página do local.<br/> Siga as instruções de formatação anteriores."
276
+
277
+ #: dbem_events.php:309
278
+ msgid "Default single location page format"
279
+ msgstr "Formato padrão da página de local"
280
+
281
+ #: dbem_events.php:309
282
+ msgid "The format of a single location page.<br/>Insert one or more of the following placeholders: <code>#_NAME</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, <code>#_DESCRIPTION</code>.<br/> Use <code>#_MAP</code> to display a map of the event location, and <code>#_IMAGE</code> to display an image of the location.<br/> Use <code>#_NEXTEVENTS</code> to insert a list of the upcoming events, <code>#_PASTEVENTS</code> for a list of past events, <code>#_ALLEVENTS</code> for a list of all events taking place in this location."
283
+ msgstr "O formato da página de um local.<br/>Insira um ou mais marcadores: <code>#_NAME</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, <code>#_DESCRIPTION</code>.<br/> Use <code>#_MAP</code> para inserir o mapa GoogleMaps do local, e <code>#_IMAGE</code> para visualizar uma imagem do local.<br/> Use <code>#_NEXTEVENTS</code> para inserir uma lista de eventos futuros, <code>#_PASTEVENTS</code> para inserir uma lista de eventos passados e <code>#_ALLEVENTS</code> para inserir uma lista de todos os eventos."
284
+
285
+ #: dbem_events.php:310
286
+ msgid "Default location baloon format"
287
+ msgstr "Formato padrão do balão de local"
288
+
289
+ #: dbem_events.php:310
290
+ msgid "The format of of the text appearing in the baloon describing the location in the map.<br/>Insert one or more of the following placeholders: <code>#_NAME</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, <code>#_DESCRIPTION</code> or <code>#_IMAGE</code>."
291
+ msgstr "O formato do texto que aparece no balão descrevendo a localização do mapa.<br/>Insira um ou mais marcadores : <code>#_NAME</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, <code>#_DESCRIPTION</code> ou <code>#_IMAGE</code>."
292
+
293
+ #: dbem_events.php:311
294
+ msgid "Default location event list format"
295
+ msgstr "O formato padrão da lista de eventos"
296
+
297
+ #: dbem_events.php:311
298
+ msgid "The format of the events the list inserted in the location page through the <code>#_NEXTEVENTS</code>, <code>#_PASTEVENTS</code> and <code>#_ALLEVENTS</code> element. <br/> Follow the events formatting instructions"
299
+ msgstr "O formato dos eventos listados na página de localização através do marcador <code>#_NEXTEVENTS</code>, <code>#_PASTEVENTS</code> e <code>#_ALLEVENTS</code>. <br/> Siga as instruções de formatação de evento"
300
+
301
+ #: dbem_events.php:312
302
+ msgid "Default no events message"
303
+ msgstr "Mensagem padrão de \"sem eventos\""
304
+
305
+ #: dbem_events.php:312
306
+ msgid "The message to be displayed in the list generated by <code>#_NEXTEVENTS</code>, <code>#_PASTEVENTS</code> and <code>#_ALLEVENTS</code> when no events are available."
307
+ msgstr "Mensagem a ser exibida na lista gerada por <code>#_NEXTEVENTS</code>, <code>#_PASTEVENTS</code> e <code>#_ALLEVENTS</code> quando nenhum evento está disponível."
308
+
309
+ #: dbem_events.php:318
310
+ msgid "RSS feed format"
311
+ msgstr "Formato do feed RSS"
312
+
313
+ #: dbem_events.php:322
314
+ msgid "RSS main title"
315
+ msgstr "Título principal do RSS"
316
+
317
+ #: dbem_events.php:322
318
+ msgid "The main title of your RSS events feed."
319
+ msgstr "O título principal de seu feed RSS de eventos."
320
+
321
+ #: dbem_events.php:323
322
+ msgid "RSS main description"
323
+ msgstr "Descrição principal do RSS"
324
+
325
+ #: dbem_events.php:323
326
+ msgid "The main description of your RSS events feed."
327
+ msgstr "A descrição principal de seu feed RSS de eventos."
328
+
329
+ #: dbem_events.php:324
330
+ msgid "RSS title format"
331
+ msgstr "Formato do título do RSS"
332
+
333
+ #: dbem_events.php:324
334
+ msgid "The format of the title of each item in the events RSS feed."
335
+ msgstr "Formato do título de cada item no feed RSS de eventos."
336
+
337
+ #: dbem_events.php:325
338
+ msgid "RSS description format"
339
+ msgstr "Formato da descrição do RSS"
340
+
341
+ #: dbem_events.php:325
342
+ msgid "The format of the description of each item in the events RSS feed. Follow the previous formatting instructions."
343
+ msgstr "Formato da descrição de cada item no feed RSS de eventos. Siga as instruções de formatação anteriores."
344
+
345
+ #: dbem_events.php:330
346
+ msgid "Maps and geotagging"
347
+ msgstr "Mapas e GeoTagging"
348
+
349
+ #: dbem_events.php:339
350
+ msgid "Enable Google Maps integration?"
351
+ msgstr "Habilitar integração com Google Maps?"
352
+
353
+ #: dbem_events.php:347
354
+ #: dbem_UI_helpers.php:68
355
+ msgid "Yes"
356
+ msgstr "Sìm"
357
+
358
+ #: dbem_events.php:354
359
+ #: dbem_UI_helpers.php:69
360
+ msgid "No"
361
+ msgstr "Não"
362
+
363
+ #: dbem_events.php:357
364
+ msgid "Check this option to enable Goggle Map integration."
365
+ msgstr "Selecione esta opção para habilitar integração com Google Maps."
366
+
367
+ #: dbem_events.php:361
368
+ msgid "Google Maps API Key"
369
+ msgstr "Chave API do Google Maps"
370
+
371
+ #: dbem_events.php:361
372
+ #, php-format
373
+ msgid "To display Google Maps you need a Google Maps API key. Don't worry, it's free, you can get one <a href='%s'>here</a>."
374
+ msgstr "Para visualizar um mapa Google Maps é necessario uma chave API do Google Maps. Não se preocupe, é grátis, você pode adquirir uma <a href='%s'>aqui</a>."
375
+
376
+ #: dbem_events.php:363
377
+ msgid "Map text format"
378
+ msgstr "Formato do texto do mapa"
379
+
380
+ #: dbem_events.php:363
381
+ msgid "The format the text appearing in the event page map cloud.<br/>Follow the previous formatting instructions."
382
+ msgstr "Formato do texto aparecendo na nuvem de mapas página de eventos.<br />Siga as instruções de formatação anteriores."
383
+
384
+ #: dbem_events.php:368
385
+ msgid "RSVP and bookings"
386
+ msgstr "RSVP e reservas"
387
+
388
+ #: dbem_events.php:372
389
+ msgid "Default contact person"
390
+ msgstr "Pessoa de contato padrão"
391
+
392
+ #: dbem_events.php:372
393
+ msgid "Select the default contact person. This user will be employed whenever a contact person is not explicitly specified for an event"
394
+ msgstr "Selecione a pessoa padrão responsável pelos eventos. Este usuário será utilizado toda vez que uma pessoa não for configurada para um evento específico."
395
+
396
+ #: dbem_events.php:373
397
+ msgid "Enable the RSVP e-mail notifications?"
398
+ msgstr "Habilitar reservas (RSVP) e notificações por e-mail?"
399
+
400
+ #: dbem_events.php:373
401
+ msgid "Check this option if you want to receive an email when someone books places for your events."
402
+ msgstr "Selecione esta opção se você deseja receber um email toda vez que alguém reservar assentos para seus eventos."
403
+
404
+ #: dbem_events.php:374
405
+ #: dbem_events.php:375
406
+ msgid "Contact person email format"
407
+ msgstr "Formato do email da pessoa de contato"
408
+
409
+ #: dbem_events.php:381
410
+ msgid "Respondent email format"
411
+ msgstr "Formato do email do requisitante"
412
+
413
+ #: dbem_events.php:374
414
+ msgid "The format or the email which will be sent to the contact person. Follow the events formatting instructions. <br/>Use <code>#_RESPNAME</code>, <code>#_RESPEMAIL</code> and <code>#_RESPPHONE</code> to display respectively the name, e-mail, address and phone of the respondent.<br/>Use <code>#_SPACES</code> to display the number of spaces reserved by the respondent. Use <code>#_COMMENT</code> to display the respondent's comment. <br/> Use <code>#_BOOKEDSEATS</code> and <code>#_AVAILABLESEATS</code> to display respectively the number of booked and available seats."
415
+ msgstr "O formato do email que será enviado para a pessoa de contato.<br/>Siga as informações de formatação de eventos. <br/>Use <code>#_RESPNAME</code>, <code>#_RESPEMAIL</code> e <code>#_RESPPHONE</code> para inserir respectivamente o nome, o e-mail e o endereço e telefone do responsável.<br/>Use <code>#_SPACES</code> para inserir o número de lugares reservados pelo requisitante.<br/> Use <code>#_BOOKEDSEATS</code> e <code>#_AVAILABLESEATS</code> para inserir respectivamente o número de lugares reservados e livres."
416
+
417
+ #: dbem_events.php:375
418
+ msgid "The format or the email which will be sent to reposdent. Follow the events formatting instructions. <br/>Use <code>#_RESPNAME</code> to display the name of the respondent.<br/>Use <code>#_CONTACTNAME</code> and <code>#_CONTACTMAIL</code> a to display respectively the name and e-mail of the contact person.<br/>Use <code>#_SPACES</code> to display the number of spaces reserved by the respondent. Use <code>#_COMMENT</code> to display the respondent's comment."
419
+ msgstr "O formato do email que será enviado para o requisitante. Siga as informações de formatação de eventos. <br/>Use <code>#_RESPNAME</code> para visualizar o nome do requisitante.<br/>Use <code>#_CONTACTNAME</code> e <code>#_CONTACTMAIL</code> para inserir o nome e email respectivamente do responsável pelo evento.<br/>Use <code>#_SPACES</code> para mostrar o número de lugares reservados pelo requisitante."
420
+
421
+ #: dbem_events.php:376
422
+ msgid "Notification sender name"
423
+ msgstr "Nome do remetente da notificação"
424
+
425
+ #: dbem_events.php:376
426
+ msgid "Insert the display name of the notification sender."
427
+ msgstr "Insira o nome de exibição do remetente da notificação."
428
+
429
+ #: dbem_events.php:377
430
+ msgid "Notification sender address"
431
+ msgstr "Email do remetente da notificação"
432
+
433
+ #: dbem_events.php:377
434
+ msgid "Insert the address of the notification sender. It must corresponds with your gmail account user"
435
+ msgstr "Insira o endereço de email de exibição do remetente da notificação. Deve corresponder ao seu usuário da conta do gmail."
436
+
437
+ #: dbem_events.php:378
438
+ msgid "Default notification receiver address"
439
+ msgstr "Endereço de notificação padrão"
440
+
441
+ #: dbem_events.php:378
442
+ msgid "Insert the address of the receiver of your notifications"
443
+ msgstr "Insira o endereço do responsável pelas notificações"
444
+
445
+ #: dbem_events.php:379
446
+ msgid "The port through which you e-mail notifications will be sent. Make sure the firewall doesn't block this port"
447
+ msgstr "A porta onde as notificações de email serão enviadas. Certifique-se que seu firewall não bloqueie este porta"
448
+
449
+ #: dbem_events.php:385
450
+ msgid "Mail sending port"
451
+ msgstr "Porta para envio de email"
452
+
453
+ #: dbem_events.php:380
454
+ msgid "Mail sending method"
455
+ msgstr "Método de envio de email"
456
+
457
+ #: dbem_events.php:380
458
+ msgid "PHP mail function"
459
+ msgstr "Função mail() do PHP"
460
+
461
+ #: dbem_events.php:380
462
+ msgid "Select the method to send email notification."
463
+ msgstr "Selecione o método para enviar os emails de notificação"
464
+
465
+ #: dbem_events.php:381
466
+ msgid "Use SMTP authentication?"
467
+ msgstr "Utilizar autenticação SMTP?"
468
+
469
+ #: dbem_events.php:381
470
+ msgid "SMTP authentication is often needed. If you use GMail, make sure to set this parameter to Yes"
471
+ msgstr "Autenticação de SMTP é comumente necessária. Se você utiliza GMail para ENVIAR os emails, certifique-se de marcar este parâmetro para Sim."
472
+
473
+ #: dbem_events.php:382
474
+ msgid "SMTP host"
475
+ msgstr "Host SMTP"
476
+
477
+ #: dbem_events.php:382
478
+ msgid "The SMTP host. Usually it corresponds to 'localhost'. If you use GMail, set this value to 'ssl://smtp.gmail.com:465'."
479
+ msgstr "Host do SMTP. Geralmente corresponde a 'localhost'. Se você utiliza o GMail, marque este valor para 'ssl://smtp.gmail.com:465'."
480
+
481
+ #: dbem_events.php:383
482
+ msgid "SMTP username"
483
+ msgstr "Usuário SMTP"
484
+
485
+ #: dbem_events.php:383
486
+ msgid "Insert the username to be used to access your SMTP server."
487
+ msgstr "Insira o usuário para ser utilizado no acesso ao servidor SMTP"
488
+
489
+ #: dbem_events.php:384
490
+ msgid "SMTP password"
491
+ msgstr "Senha SMTP"
492
+
493
+ #: dbem_events.php:384
494
+ msgid "Insert the password to be used to access your SMTP server"
495
+ msgstr "Insira a senha para ser utilizada no acesso ao servidor SMTP"
496
+
497
+ #: dbem_events.php:392
498
+ msgid "Images size"
499
+ msgstr "Dimensões da imagem"
500
+
501
+ #: dbem_events.php:395
502
+ msgid "Maximum width (px)"
503
+ msgstr "Largura máxima (px)"
504
+
505
+ #: dbem_events.php:395
506
+ msgid "The maximum allowed width for images uploades"
507
+ msgstr "A largura máxima permitida para upload de imagens, em pixels"
508
+
509
+ #: dbem_events.php:396
510
+ msgid "Maximum height (px)"
511
+ msgstr "Altura máxima (px)"
512
+
513
+ #: dbem_events.php:396
514
+ msgid "The maximum allowed width for images uploaded, in pixels"
515
+ msgstr "A altura máxima permitida para upload de imagens, em pixels"
516
+
517
+ #: dbem_events.php:397
518
+ msgid "Maximum size (bytes)"
519
+ msgstr "Tamanho máximo do arquivo (bytes)"
520
+
521
+ #: dbem_events.php:397
522
+ msgid "The maximum allowed size for images uploaded, in pixels"
523
+ msgstr "O tamanho máximo de arquivo permitido para imagens carregadas, em pixels"
524
+
525
+ #: dbem_events.php:405
526
+ msgid "Save Changes"
527
+ msgstr "Salvar Modificações"
528
+
529
+ #: dbem_events.php:885
530
+ #, php-format
531
+ msgid ""
532
+ "<p>Hey, <strong>%s</strong>, welcome to <strong>Events Manager</strong>! We hope you like it around here.</p> \r\n"
533
+ "\t<p>Now it's time to insert events lists through <a href='%s' title='Widgets page'>widgets</a>, <a href='%s' title='Template tags documentation'>template tags</a> or <a href='%s' title='Shortcodes documentation'>shortcodes</a>.</p>\r\n"
534
+ "\t<p>By the way, have you taken a look at the <a href='%s' title='Change settings'>Settings page</a>? That's where you customize the way events and locations are displayed.</p>\r\n"
535
+ "\t<p>What? Tired of seeing this advice? I hear you, <a href='%s' title='Don't show this advice again'>click here</a> and you won't see this again!</p>"
536
+ msgstr ""
537
+ "<p>Olá, <strong>%s</strong>, <strong>seja bem-vindo ao Gerenciador de Eventos</strong>!</p> \r\n"
538
+ "\t<p>Agora é hora de inserir listas de eventos por <a href='%s' title='Pagina widgets'>widgets</a>, <a href='%s' title='Documentação de tags de template'>tags de templates</a> ou <a href='%s' title='Documentação de shortcode'>shortcodes</a>.</p>\r\n"
539
+ "\t<p>Falando nisso, você já olhou a <a href='%s' title='Mudar configurações'>página de configurações</a>? É assim que customizamos o modo em que os eventos e localidades são exibidos.</p>\r\n"
540
+ "\t<p>O que? Cansado de ver este aviso? Entendo, <a href='%s' title='Não mostrar mais este aviso'>clique aqui</a> e você não o verá novamente.</p>"
541
+
542
+ #: dbem_events.php:929
543
+ msgid "New Event ..."
544
+ msgstr "Novo evento..."
545
+
546
+ #: dbem_events.php:934
547
+ #: dbem_events.php:939
548
+ #: dbem_widgets.php:90
549
+ msgid "Past events"
550
+ msgstr "Eventos passados"
551
+
552
+ #: dbem_events.php:935
553
+ #: dbem_events.php:940
554
+ #: dbem_widgets.php:89
555
+ msgid "All events"
556
+ msgstr "Todos os eventos"
557
+
558
+ #: dbem_events.php:936
559
+ #: dbem_events.php:941
560
+ #: dbem_widgets.php:88
561
+ msgid "Future events"
562
+ msgstr "Eventos futuros"
563
+
564
+ #: dbem_events.php:949
565
+ msgid "Total"
566
+ msgstr "Total"
567
+
568
+ #: dbem_events.php:961
569
+ msgid "Bulk Actions"
570
+ msgstr "Ações em lote"
571
+
572
+ #: dbem_events.php:964
573
+ msgid "Delete selected"
574
+ msgstr "Remover selecionados"
575
+
576
+ #: dbem_events.php:968
577
+ msgid "Apply"
578
+ msgstr "Aplicar"
579
+
580
+ #: dbem_events.php:983
581
+ msgid "Filter"
582
+ msgstr "Filtro"
583
+
584
+ #: dbem_events.php:998
585
+ #: dbem_events.php:1428
586
+ #: dbem_events.php:1888
587
+ #: dbem_locations.php:229
588
+ #: dbem_locations.php:237
589
+ #: dbem_people.php:90
590
+ #: dbem_rsvp.php:18
591
+ #: dbem_rsvp.php:52
592
+ #: marcus-extras.php:148
593
+ #: marcus-extras.php:155
594
+ msgid "Name"
595
+ msgstr "Nome"
596
+
597
+ #: dbem_events.php:1004
598
+ #: dbem_events.php:1531
599
+ #: dbem_events.php:1890
600
+ msgid "Location"
601
+ msgstr "Localização"
602
+
603
+ #: dbem_events.php:1007
604
+ msgid "Date and time"
605
+ msgstr "Data e Hora"
606
+
607
+ #: dbem_events.php:1017
608
+ msgid "D d M Y"
609
+ msgstr "D d M Y"
610
+
611
+ #: dbem_events.php:1050
612
+ msgid "Duplicate this event"
613
+ msgstr "Duplicar este evento"
614
+
615
+ #: dbem_events.php:1179
616
+ msgid "Daily"
617
+ msgstr "Diáriamente"
618
+
619
+ #: dbem_events.php:1179
620
+ msgid "Weekly"
621
+ msgstr "Semanalmente"
622
+
623
+ #: dbem_events.php:1179
624
+ msgid "Monthly"
625
+ msgstr "Mensalmente"
626
+
627
+ #: dbem_events.php:1180
628
+ msgid "Mon"
629
+ msgstr "Seg"
630
+
631
+ #: dbem_events.php:1180
632
+ msgid "Tue"
633
+ msgstr "Ter"
634
+
635
+ #: dbem_events.php:1180
636
+ msgid "Wed"
637
+ msgstr "Qua"
638
+
639
+ #: dbem_events.php:1180
640
+ msgid "Thu"
641
+ msgstr "Qui"
642
+
643
+ #: dbem_events.php:1180
644
+ msgid "Fri"
645
+ msgstr "Sex"
646
+
647
+ #: dbem_events.php:1180
648
+ msgid "Sat"
649
+ msgstr "Sab"
650
+
651
+ #: dbem_events.php:1180
652
+ msgid "Sun"
653
+ msgstr "Dom"
654
+
655
+ #: dbem_events.php:1182
656
+ msgid "first"
657
+ msgstr "primeiro"
658
+
659
+ #: dbem_events.php:1182
660
+ msgid "second"
661
+ msgstr "segundo"
662
+
663
+ #: dbem_events.php:1182
664
+ msgid "third"
665
+ msgstr "terceiro"
666
+
667
+ #: dbem_events.php:1182
668
+ msgid "fourth"
669
+ msgstr "quarto"
670
+
671
+ #: dbem_events.php:1182
672
+ msgid "last"
673
+ msgstr "último"
674
+
675
+ #: dbem_events.php:1197
676
+ msgid "WARNING: This is a recurrence."
677
+ msgstr "ATENÇÃO: Está é uma recorrência"
678
+
679
+ #: dbem_events.php:1200
680
+ msgid "Modifying these data all the events linked to this recurrence will be rescheduled"
681
+ msgstr "Modificar este dados fará com que todos os eventos ligados a esta recorrência sejam reagendados."
682
+
683
+ #: dbem_events.php:1203
684
+ msgid "WARNING: This is a recurring event."
685
+ msgstr "ATENÇÃO: Está é um evento recorrente."
686
+
687
+ #: dbem_events.php:1204
688
+ msgid "If you change these data and save, this will become an independent event."
689
+ msgstr "Se modificar algo e salvar, este evento se tornará independente."
690
+
691
+ #: dbem_events.php:1225
692
+ msgid "Recurrence"
693
+ msgstr "Recorrência"
694
+
695
+ #: dbem_events.php:1243
696
+ msgid "Repeated event"
697
+ msgstr "Evento repetido"
698
+
699
+ #: dbem_events.php:1256
700
+ #: dbem_events.php:1281
701
+ msgid "Every"
702
+ msgstr "A cada"
703
+
704
+ #: dbem_events.php:1263
705
+ msgid "day"
706
+ msgstr "dia"
707
+
708
+ #: dbem_events.php:1265
709
+ msgid "days"
710
+ msgstr "dias"
711
+
712
+ #: dbem_events.php:1267
713
+ msgid "week"
714
+ msgstr "semana"
715
+
716
+ #: dbem_events.php:1269
717
+ msgid "weeks"
718
+ msgstr "semanas"
719
+
720
+ #: dbem_events.php:1271
721
+ msgid "month"
722
+ msgstr "mês"
723
+
724
+ #: dbem_events.php:1273
725
+ msgid "months"
726
+ msgstr "meses"
727
+
728
+ #: dbem_events.php:1297
729
+ msgid "Check if your event happens more than once according to a regular pattern"
730
+ msgstr "Selecione se seu evento repete mais de uma vez em um padrão regular"
731
+
732
+ #: dbem_events.php:1303
733
+ msgid "This is't a recurrent event"
734
+ msgstr "Este não é um evento recorrente"
735
+
736
+ #: dbem_events.php:1335
737
+ msgid "Contact Person"
738
+ msgstr "Responsável pelo evento"
739
+
740
+ #: dbem_events.php:1341
741
+ msgid "Select..."
742
+ msgstr "Selecione..."
743
+
744
+ #: dbem_events.php:1356
745
+ msgid "Enable registration for this event"
746
+ msgstr "Habilitar reserva para este evento"
747
+
748
+ #: dbem_events.php:1367
749
+ #: dbem_rsvp.php:246
750
+ #: dbem_events.php:1395
751
+ msgid "Spaces"
752
+ msgstr "Lugares"
753
+
754
+ #: dbem_events.php:1275
755
+ msgid "Frequency"
756
+ msgstr "Frequência"
757
+
758
+ #: dbem_events.php:1394
759
+ msgid "Category"
760
+ msgstr "Categoria"
761
+
762
+ #: dbem_events.php:1437
763
+ msgid "The event name. Example: Birthday party"
764
+ msgstr "Nome do evento. Exemplo: Festa de Aniversário"
765
+
766
+ #: dbem_events.php:1443
767
+ msgid "Event date"
768
+ msgstr "Data do evento"
769
+
770
+ #: dbem_events.php:1448
771
+ msgid "Recurrence dates"
772
+ msgstr "Datas recorrentes"
773
+
774
+ #: dbem_events.php:1472
775
+ msgid "The event date."
776
+ msgstr "Data do evento"
777
+
778
+ #: dbem_events.php:1475
779
+ msgid "When not reoccurring, this event spans between the beginning and end date."
780
+ msgstr "Quando não recorrente, este evento irá se prolongar ao longo das datas de ínicio e fim"
781
+
782
+ #: dbem_events.php:1481
783
+ msgid "The recurrence beginning and end date."
784
+ msgstr "A data de início e fim da recorrência."
785
+
786
+ #: dbem_events.php:1488
787
+ msgid "Event time"
788
+ msgstr "Hora do evento"
789
+
790
+ #: dbem_events.php:1505
791
+ msgid "The time of the event beginning and end"
792
+ msgstr "A hora do início e fim do evento"
793
+
794
+ #: dbem_events.php:1511
795
+ msgid "Coordinates"
796
+ msgstr "Coordenadas"
797
+
798
+ #: dbem_events.php:1538
799
+ msgid "Name:"
800
+ msgstr "Nome:"
801
+
802
+ #: dbem_events.php:1553
803
+ #: dbem_locations.php:160
804
+ #: dbem_locations.php:314
805
+ msgid "Map not found"
806
+ msgstr "Mapa não encontrado"
807
+
808
+ #: dbem_events.php:1566
809
+ msgid "The name of the location where the event takes place. You can use the name of a venue, a square, etc"
810
+ msgstr "Nome do lugar onde o evento será realizado. Voce pode usar o nome de uma rua, praça etc"
811
+
812
+ #: dbem_events.php:1571
813
+ msgid "Address:"
814
+ msgstr "Endereço:"
815
+
816
+ #: dbem_events.php:1581
817
+ msgid "The address of the location where the event takes place. Example: 21, Dominick Street"
818
+ msgstr "O enderço de onde o evento será realizado. Exemplo: Av. Brasil, 200"
819
+
820
+ #: dbem_events.php:1586
821
+ msgid "Town:"
822
+ msgstr "Cidade:"
823
+
824
+ #: dbem_events.php:1595
825
+ msgid "The town where the location is located. If you're using the Google Map integration and want to avoid geotagging ambiguities include the country in the town field. Example: Verona, Italy."
826
+ msgstr "A cidade onde o evento será realizado. Se você está usando a integração com Gogole Maps e quer evitar ambiguidades de GeoTagging inclua o nome do País também: Exemplo: Rio de Janeiro, Brasil."
827
+
828
+ #: dbem_events.php:1604
829
+ msgid "Details"
830
+ msgstr "Detalhes"
831
+
832
+ #: dbem_events.php:1615
833
+ msgid "Details about the event"
834
+ msgstr "Detalhes sobre o evento"
835
+
836
+ #: dbem_events.php:1622
837
+ #: marcus-extras.php:308
838
+ msgid "Attributes"
839
+ msgstr "Atributos"
840
+
841
+ #: dbem_events.php:1634
842
+ msgid "Submit Event"
843
+ msgstr "Enviar evento"
844
+
845
+ #: dbem_events.php:1656
846
+ msgid "Missing fields: "
847
+ msgstr "Campos obrigatórios faltando:"
848
+
849
+ #: dbem_events.php:1658
850
+ msgid "Since the event is repeated, you must specify an event date."
851
+ msgstr "Como este evento é recorrente, você deve especificar uma data do evento."
852
+
853
+ #: dbem_events.php:1889
854
+ msgid "Date"
855
+ msgstr "Data"
856
+
857
+ #: dbem_events.php:1891
858
+ #: dbem_locations.php:230
859
+ #: dbem_locations.php:238
860
+ msgid "Address"
861
+ msgstr "Endereço"
862
+
863
+ #: dbem_events.php:1892
864
+ #: dbem_locations.php:231
865
+ #: dbem_locations.php:239
866
+ msgid "Town"
867
+ msgstr "Cidade"
868
+
869
+ #: dbem_events.php:1910
870
+ msgid "Some required fields are missing:"
871
+ msgstr "Alguns campos obrigatórios estão faltando:"
872
+
873
+ #: dbem_events.php:1914
874
+ msgid "Since the event is repeated, you must specify an end date"
875
+ msgstr "Como o evento é recorrente, você deve especificar uma data de fim."
876
+
877
+ #: dbem_events.php:2075
878
+ msgid "You cannot enable Google Maps integration without setting an appropriate API key."
879
+ msgstr "Não é possível habilitar a integração com GoogleMaps sem configurar uma chave de API apropriada."
880
+
881
+ #: dbem_events.php:2216
882
+ msgid "Add an event"
883
+ msgstr "Adicionar um evento"
884
+
885
+ #: dbem_events.php:2234
886
+ #, php-format
887
+ msgid "This page corresponds to <strong>Events Manager</strong> events page. Its content will be overriden by <strong>Events Manager</strong>. If you want to display your content, you can can assign another page to <strong>Events Manager</strong> in the the <a href='%s'>Settings</a>. "
888
+ msgstr "Esta página corresponde à página de eventos do <strong>Gerenciador de Eventos</strong>. Seu conteúdo será sobrescrito pelo <strong>Gerenciador de Eventos</strong>. Se você quer exibir seu conteúdo, você pode associar uma outra página para o <strong>Gerenciador de Eventos</strong> nas <a href='%s'>Configurações</a>. "
889
+
890
+ #: dbem_locations.php:4
891
+ msgid "The location name"
892
+ msgstr "O nome do local"
893
+
894
+ #: dbem_locations.php:4
895
+ msgid "The location address"
896
+ msgstr "O endereço do local"
897
+
898
+ #: dbem_locations.php:4
899
+ msgid "The location town"
900
+ msgstr "A cidade do local"
901
+
902
+ #: dbem_locations.php:53
903
+ msgid "The location has been updated."
904
+ msgstr "A localização foi atualizada."
905
+
906
+ #: dbem_locations.php:113
907
+ msgid "Edit location"
908
+ msgstr "Editar local"
909
+
910
+ #: dbem_locations.php:128
911
+ #: dbem_locations.php:279
912
+ msgid "Location name"
913
+ msgstr "Nome do local"
914
+
915
+ #: dbem_locations.php:130
916
+ #: dbem_locations.php:281
917
+ msgid "The name of the location"
918
+ msgstr "O nome do local onde o evento será realizado"
919
+
920
+ #: dbem_locations.php:134
921
+ #: dbem_locations.php:285
922
+ msgid "Location address"
923
+ msgstr "Endereço do local"
924
+
925
+ #: dbem_locations.php:136
926
+ #: dbem_locations.php:287
927
+ msgid "The address of the location"
928
+ msgstr "O endereço do local"
929
+
930
+ #: dbem_locations.php:141
931
+ #: dbem_locations.php:291
932
+ msgid "Location town"
933
+ msgstr "Cidade do local"
934
+
935
+ #: dbem_locations.php:143
936
+ msgid "The town where the location is located"
937
+ msgstr "A cidade onde o evento será realizado"
938
+
939
+ #: dbem_locations.php:158
940
+ msgid "Location map"
941
+ msgstr "Mapa do local"
942
+
943
+ #: dbem_locations.php:168
944
+ #: dbem_locations.php:319
945
+ msgid "Location description"
946
+ msgstr "Descrição do local"
947
+
948
+ #: dbem_locations.php:174
949
+ #: dbem_locations.php:324
950
+ msgid "A description of the Location. You may include any kind of info here."
951
+ msgstr "Uma descrição do local. Você pode inserir qualquer informação aqui."
952
+
953
+ #: dbem_locations.php:179
954
+ #: dbem_locations.php:306
955
+ msgid "Location image"
956
+ msgstr "Imagem do local"
957
+
958
+ #: dbem_locations.php:184
959
+ msgid "No image uploaded for this location yet"
960
+ msgstr "Nenhuma imagem foi carregada para este local ainda"
961
+
962
+ #: dbem_locations.php:189
963
+ msgid "Upload/change picture"
964
+ msgstr "Carregar/modificar imagem"
965
+
966
+ #: dbem_locations.php:193
967
+ msgid "Update location"
968
+ msgstr "Atualizar local"
969
+
970
+ #: dbem_locations.php:209
971
+ #: events-manager.php:451
972
+ msgid "Locations"
973
+ msgstr "Locais"
974
+
975
+ #: dbem_locations.php:264
976
+ msgid "No venues have been inserted yet!"
977
+ msgstr "Nenhum local foi inserido ainda!"
978
+
979
+ #: dbem_locations.php:274
980
+ #: dbem_locations.php:327
981
+ msgid "Add location"
982
+ msgstr "Adicionar local"
983
+
984
+ #: dbem_locations.php:293
985
+ msgid "The town of the location"
986
+ msgstr "A cidade do local"
987
+
988
+ #: dbem_locations.php:308
989
+ msgid "Select an image to upload"
990
+ msgstr "Selecione uma imagem para upload"
991
+
992
+ #: dbem_locations.php:396
993
+ msgid " is missing!"
994
+ msgstr "não está presente!"
995
+
996
+ #: dbem_locations.php:404
997
+ msgid "The image file is too big! Maximum size:"
998
+ msgstr "O arquivo de imagem é muito grande! Tamanho máximo:"
999
+
1000
+ #: dbem_locations.php:409
1001
+ msgid "The image is too big! Maximum size allowed:"
1002
+ msgstr "As dimensões da imagem são muito grandes! Tamanho máximo permitido:"
1003
+
1004
+ #: dbem_locations.php:411
1005
+ msgid "The image is in a wrong format!"
1006
+ msgstr "A imagem está em um formato incorreto!"
1007
+
1008
+ #: dbem_locations.php:418
1009
+ msgid "Ach, some problems here:"
1010
+ msgstr "Argh, alguns problemas aqui:"
1011
+
1012
+ #: dbem_locations.php:479
1013
+ msgid "The image could not be loaded"
1014
+ msgstr "A imagem não pode ser carregada"
1015
+
1016
+ #: dbem_people.php:87
1017
+ msgid "Bookings data"
1018
+ msgstr "Informações de reservas"
1019
+
1020
+ #: dbem_people.php:91
1021
+ msgid "E-mail"
1022
+ msgstr "E-mail"
1023
+
1024
+ #: dbem_people.php:92
1025
+ #: dbem_people.php:194
1026
+ #: dbem_people.php:197
1027
+ #: dbem_rsvp.php:20
1028
+ msgid "Phone number"
1029
+ msgstr "Telefone"
1030
+
1031
+ #: dbem_people.php:93
1032
+ #: dbem_rsvp.php:21
1033
+ msgid "Seats"
1034
+ msgstr "N# de reservas"
1035
+
1036
+ #: dbem_people.php:106
1037
+ msgid "Booked"
1038
+ msgstr "Reservado"
1039
+
1040
+ #: dbem_people.php:111
1041
+ msgid "Available"
1042
+ msgstr "Disponível"
1043
+
1044
+ #: dbem_people.php:126
1045
+ msgid "No people have responded to your events yet!"
1046
+ msgstr "Ninguém respondeu aos eventos ainda!"
1047
+
1048
+ #: dbem_people.php:128
1049
+ msgid "This table collects the data about the people who responded to your events"
1050
+ msgstr "Esta tabela coleta os dados sobre as pessoas que responderam aos seus eventos"
1051
+
1052
+ #: dbem_people.php:199
1053
+ msgid "The phone number used by Events Manager when the user is indicated as the contact person for an event."
1054
+ msgstr "O número telefônico utilizado pelo Gerenciador de Eventos quando o usuário é indicado como responsável por um evento."
1055
+
1056
+ #: dbem_rsvp.php:9
1057
+ msgid "Book now!"
1058
+ msgstr "Inscreva-se!"
1059
+
1060
+ #: dbem_rsvp.php:19
1061
+ #: dbem_rsvp.php:53
1062
+ msgid "E-Mail"
1063
+ msgstr "E-Mail"
1064
+
1065
+ #: dbem_rsvp.php:27
1066
+ msgid "Send your booking"
1067
+ msgstr "Enviar sua reserva"
1068
+
1069
+ #: dbem_rsvp.php:44
1070
+ #: dbem_rsvp.php:56
1071
+ msgid "Cancel your booking"
1072
+ msgstr "Cancele sua reserva"
1073
+
1074
+ #: dbem_rsvp.php:88
1075
+ msgid "There are no bookings associated to this name and e-mail"
1076
+ msgstr "Não há reservas associadas a este nome e e-email"
1077
+
1078
+ #: dbem_rsvp.php:113
1079
+ msgid "Your booking has been recorded"
1080
+ msgstr "Sua reserva foi efetuada"
1081
+
1082
+ #: dbem_rsvp.php:120
1083
+ msgid "Sorry, there aren't so many seats available!"
1084
+ msgstr "Desculpe, não há mais vagas disponíveis!"
1085
+
1086
+ #: dbem_rsvp.php:163
1087
+ msgid "Booking deleted"
1088
+ msgstr "Reserva removida"
1089
+
1090
+ #: dbem_rsvp.php:239
1091
+ msgid "responses so far"
1092
+ msgstr "respostas até agora"
1093
+
1094
+ #: dbem_rsvp.php:245
1095
+ msgid "Responder"
1096
+ msgstr "Responder"
1097
+
1098
+ #: dbem_rsvp.php:251
1099
+ msgid "Booked spaces"
1100
+ msgstr "Lugares reservados"
1101
+
1102
+ #: dbem_rsvp.php:252
1103
+ msgid "Available spaces"
1104
+ msgstr "Lugares disponíveis"
1105
+
1106
+ #: dbem_rsvp.php:273
1107
+ msgid "Printable view"
1108
+ msgstr "Versão para impressão"
1109
+
1110
+ #: dbem_rsvp.php:281
1111
+ msgid "No responses yet!"
1112
+ msgstr "Nenhuma resposta até agora"
1113
+
1114
+ #: dbem_rsvp.php:352
1115
+ msgid "New booking"
1116
+ msgstr "Nova reserva"
1117
+
1118
+ #: dbem_rsvp.php:353
1119
+ msgid "Reservation confirmed"
1120
+ msgstr "Reserva confirmada"
1121
+
1122
+ #: dbem_widgets.php:10
1123
+ #: dbem_widgets.php:35
1124
+ #: events-manager.php:44
1125
+ #: events-manager.php:399
1126
+ #: events-manager.php:400
1127
+ #: events-manager.php:445
1128
+ msgid "Events"
1129
+ msgstr "Eventos"
1130
+
1131
+ #: dbem_widgets.php:19
1132
+ #: events-manager.php:50
1133
+ #: events-manager.php:392
1134
+ msgid "No events"
1135
+ msgstr "Nenhum evento"
1136
+
1137
+ #: dbem_widgets.php:78
1138
+ #: dbem_widgets.php:156
1139
+ msgid "Title"
1140
+ msgstr "Título"
1141
+
1142
+ #: dbem_widgets.php:82
1143
+ msgid "Number of events"
1144
+ msgstr "Número de eventos"
1145
+
1146
+ #: dbem_widgets.php:86
1147
+ msgid "Scope of the events"
1148
+ msgstr "Escopo dos eventos"
1149
+
1150
+ #: dbem_widgets.php:94
1151
+ msgid "Order of the events"
1152
+ msgstr "Ordem dos eventos"
1153
+
1154
+ #: dbem_widgets.php:96
1155
+ msgid "Ascendant"
1156
+ msgstr "Crescente"
1157
+
1158
+ #: dbem_widgets.php:97
1159
+ msgid "Descendant"
1160
+ msgstr "Decrescente"
1161
+
1162
+ #: dbem_widgets.php:101
1163
+ msgid "List item format"
1164
+ msgstr "Formato do item da lista"
1165
+
1166
+ #: dbem_widgets.php:122
1167
+ msgid "calendar"
1168
+ msgstr "Calendário "
1169
+
1170
+ #: dbem_widgets.php:176
1171
+ #: dbem_widgets.php:177
1172
+ msgid "Events List"
1173
+ msgstr "Lista de Eventos"
1174
+
1175
+ #: dbem_widgets.php:178
1176
+ #: dbem_widgets.php:179
1177
+ msgid "Events Calendar"
1178
+ msgstr "Calendário de Eventos"
1179
+
1180
+ #: events-manager.php:55
1181
+ msgid "<li>No events in this location</li>"
1182
+ msgstr "<li>Não há eventos neste local</li>"
1183
+
1184
+ #: events-manager.php:383
1185
+ msgid "#_RESPNAME (#_RESPEMAIL) will attend #_NAME on #m #d, #Y. He wants to reserve #_SPACES spaces.<br/> Now there are #_RESERVEDSPACES spaces reserved, #_AVAILABLESPACES are still available.<br/>Yours faithfully,<br/>Events Manager"
1186
+ msgstr "#_RESPNAME (#_RESPEMAIL) participará do evento #_NAME em #d/#m/#Y. Ele deseja reservar #_SPACES vagas.<br/> Agora há #_RESERVEDSPACES vagas reservadas, #_AVAILABLESPACES vagas ainda estão disponíveis.<br/>Atenciosamente,<br/>Gerenciador de Eventos"
1187
+
1188
+ #: events-manager.php:384
1189
+ msgid "Dear #_RESPNAME, <br/>you have successfully reserved #_SPACES space/spaces for #_NAME.<br/>Yours faithfully,<br/> #_CONTACTPERSON"
1190
+ msgstr "#_RESPNAME, <br/>você reservou com sucesso #_SPACES vaga/vagas em nome de #_NAME.<br/>Atenciosamente,<br/> #_CONTACTPERSON"
1191
+
1192
+ #: events-manager.php:434
1193
+ msgid "events"
1194
+ msgstr "eventos"
1195
+
1196
+ #: events-manager.php:447
1197
+ msgid "Edit"
1198
+ msgstr "Editar"
1199
+
1200
+ #: events-manager.php:449
1201
+ msgid "Add new"
1202
+ msgstr "Adicionar novo"
1203
+
1204
+ #: events-manager.php:453
1205
+ msgid "People"
1206
+ msgstr "Pessoas"
1207
+
1208
+ #: events-manager.php:456
1209
+ msgid "Events Manager Settings"
1210
+ msgstr "Configurações do Gerenciador de Eventos"
1211
+
1212
+ #: events-manager.php:456
1213
+ msgid "Settings"
1214
+ msgstr "Configurações"
1215
+
1216
+ #: marcus-extras.php:27
1217
+ msgid "Event Categories"
1218
+ msgstr "Categorias de Eventos"
1219
+
1220
+ #: marcus-extras.php:27
1221
+ #: marcus-extras.php:124
1222
+ msgid "Categories"
1223
+ msgstr "Categorias"
1224
+
1225
+ #: marcus-extras.php:147
1226
+ #: marcus-extras.php:154
1227
+ msgid "ID"
1228
+ msgstr "ID"
1229
+
1230
+ #: marcus-extras.php:181
1231
+ msgid "No categories have been inserted yet!"
1232
+ msgstr "Nenhuma categoria foi inserida ainda!"
1233
+
1234
+ #: marcus-extras.php:194
1235
+ #: marcus-extras.php:202
1236
+ msgid "Add category"
1237
+ msgstr "Adicionar categoria"
1238
+
1239
+ #: marcus-extras.php:198
1240
+ #: marcus-extras.php:243
1241
+ msgid "Category name"
1242
+ msgstr "Nome da categoria"
1243
+
1244
+ #: marcus-extras.php:200
1245
+ #: marcus-extras.php:245
1246
+ msgid "The name of the category"
1247
+ msgstr "O nome da categoria"
1248
+
1249
+ #: marcus-extras.php:225
1250
+ msgid "Edit category"
1251
+ msgstr "Editar categoria"
1252
+
1253
+ #: marcus-extras.php:248
1254
+ msgid "Update category"
1255
+ msgstr "Atualizar categoria"
1256
+
1257
+ #: marcus-extras.php:328
1258
+ msgid "Not defined in templates"
1259
+ msgstr "Não definido nos templates"
1260
+
1261
+ #: marcus-extras.php:371
1262
+ msgid "In order to use attributes, you must define some in your templates, otherwise they'll never show. Go to Events > Settings to add attribute placeholders."
1263
+ msgstr "Para utilizar atributos, você deve definir alguns em seus templates ou eles não aparecerão. Clique em Eventos > Configurações para adicionar marcadores de atributos."
1264
+
1265
+ #: marcus-extras.php:308
1266
+ msgid "Add attributes here"
1267
+ msgstr "Adicione atributos aqui"
1268
+
1269
+ #: marcus-extras.php:313
1270
+ msgid "Attribute Name"
1271
+ msgstr "Nome do atributo"
1272
+
1273
+ #: marcus-extras.php:314
1274
+ msgid "Value"
1275
+ msgstr "Valor"
1276
+
1277
+ #: marcus-extras.php:339
1278
+ #: marcus-extras.php:360
1279
+ msgid "Remove"
1280
+ msgstr "Remover"
1281
+
1282
+ #: marcus-extras.php:382
1283
+ msgid "Add new tag"
1284
+ msgstr "Adicionar nova tag"
1285
+
1286
+ #: dbem_events.php:1367
1287
+ msgid "Contact"
1288
+ msgstr "Contato"
1289
+
1290
+ #~ msgid ""
1291
+ #~ "A description of the location. You may include any kind of info here."
1292
+ #~ msgstr ""
1293
+ #~ "Una descrizione del luogo. In questo campo è possibile inserire qualsiasi "
1294
+ #~ "tipo di informazione."
1295
+ #~ msgid "end date before begin date"
1296
+ #~ msgstr "la data finale precede quella iniziale"
1297
+ #~ msgid "Example:"
1298
+ #~ msgstr "Esempio: "
1299
+ #~ msgid "Example: 2008-11-28"
1300
+ #~ msgstr "Esempio: 2008-11-28"
1301
+ #~ msgid "The format the text appearing in the map cloud."
1302
+ #~ msgstr "Il fomato del testo del fumetto che appare sulla mappa."
1303
+ #~ msgid "Follow the previous formatting instructions."
1304
+ #~ msgstr "Seguire le istruzioni di formattazione precedenti."
1305
+ #~ msgid "here"
1306
+ #~ msgstr "questa pagina"
1307
+ #~ msgid "The format of a single location page title."
1308
+ #~ msgstr "Il formato del titolo della pagina di un singolo luogo."
1309
+
1310
+ #, fuzzy
1311
+ #~ msgid "Location picture"
1312
+ #~ msgstr "Luogo"
1313
+ #~ msgid "M_Monday_initial"
1314
+ #~ msgstr "L"
1315
+ #~ msgid "T_Tuesday_initial"
1316
+ #~ msgstr "M"
1317
+ #~ msgid "F_Friday_initial"
1318
+ #~ msgstr "V"
1319
+ #~ msgid "S_Sunday_initial"
1320
+ #~ msgstr "D"
1321
+ #~ msgid "The format of any events in a list."
1322
+ #~ msgstr "Il formato di ciascun evento della lista."
1323
+ #~ msgid ""
1324
+ #~ "Insert one or more of the following placeholders: <code>#_NAME</code>, "
1325
+ #~ "<code>#_LOCATION</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, "
1326
+ #~ "<code>#_NOTES</code>. Use <code>#_LINKEDNAME</code> for the event name "
1327
+ #~ "with a link to the given event page. Use #_URL to print the event URL and "
1328
+ #~ "make your own customised links."
1329
+ #~ msgstr ""
1330
+ #~ "Inserire uno o più dei seguenti segnaposto: <code>#_NAME</code>, "
1331
+ #~ "<code>#_LOCATION</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, "
1332
+ #~ "<code>#_NOTES</code>. Utilizzare <code>#_LINKEDNAME</code> per il nome "
1333
+ #~ "dell'evento con un link alla pagina corrispondente. Utilizzare #_URL per "
1334
+ #~ "visualizzare l'URL dell'evento e creare link personalizzati."
1335
+ #~ msgid ""
1336
+ #~ "To insert date and time values, use <a href=\"http://www.php.net/manual/"
1337
+ #~ "en/function.date.php\">PHP time format characters</a> with a # symbol "
1338
+ #~ "before them, i.e. #m. #M, #j, etc. "
1339
+ #~ msgstr ""
1340
+ #~ "Per inserire valori di data e ora, utilizzare i <a href=\"http://www.php."
1341
+ #~ "net/manual/it/function.date.php\">caratteri di stringa formato PHP</a> "
1342
+ #~ "anteponendo ad essi un #, ad esempio #m. #M, #j, etc. "
1343
+ #~ msgid "Use HTML tags as <code>li</code>, <code>br</code>, etc."
1344
+ #~ msgstr ""
1345
+ #~ "Utilizzare liberamente tag HTML come <code>li</code>, <code>br</code>, "
1346
+ #~ "ecc."
1347
+ #~ msgid "Use <code>#_MAP</code> to insert a map."
1348
+ #~ msgstr "Utilizzare <code>#_MAP</code> per inserire una mappa."
1349
+ #~ msgid "The format of the description of each item in the events RSS feed."
1350
+ #~ msgstr "Il formato della descrizione di ciascun elemento nel feed RSS."
1351
+ #~ msgid "Time"
1352
+ #~ msgstr "Ora"
1353
+ #~ msgid "Latitude"
1354
+ #~ msgstr "Latitudine"
1355
+ #~ msgid "Longitude"
1356
+ #~ msgstr "Longitudine"
1357
+ #~ msgid "Are you sure?"
1358
+ #~ msgstr "Sei sicuro?"
1359
+ #~ msgid "Delete"
1360
+ #~ msgstr "Elimina"
1361
+ #~ msgid "Notes"
1362
+ #~ msgstr "Note"
1363
+ #~ msgid ""
1364
+ #~ "You are about to delete this event.\\n 'Cancel' to stop, 'OK' to delete."
1365
+ #~ msgstr ""
1366
+ #~ "Stai per cancellare questo evento.\\n \\'Cancel\\' per annullare "
1367
+ #~ "l'opererazione, \\'Ok\\' per cancellare."
1368
+ #~ msgid "Widget Title"
1369
+ #~ msgstr "Titolo"
1370
+
marcus-extras.php CHANGED
@@ -24,7 +24,8 @@ add_action('admin_menu','dbem_add_to_events_submenu', 100);
24
  function dbem_add_to_events_submenu () {
25
  if(function_exists('add_submenu_page')) {
26
  $file = dirname(__FILE__).DIRECTORY_SEPARATOR."events-manager.php";
27
- add_submenu_page($file, __('Event Categories','dbem'),__('Categories','dbem'), SETTING_CAPABILITY, "events-manager-categories", dbem_categories_subpanel);
 
28
  }
29
  }
30
 
@@ -135,7 +136,7 @@ function dbem_categories_table_layout($message = "") {
135
  <?-- begin col-right -->\n
136
  <div id='col-right'>\n
137
  <div class='col-wrap'>\n
138
- <form id='bookings-filter' method='post' action='".get_bloginfo('url')."/wp-admin/admin.php?page=events-manager-categories'>\n
139
  <input type='hidden' name='action' value='delete'/>\n";
140
 
141
  if (count($categories)>0) {
@@ -159,8 +160,8 @@ function dbem_categories_table_layout($message = "") {
159
  $table .= "
160
  <tr>\n
161
  <td><input type='checkbox' class ='row-selector' value='".$this_category['category_id']."' name='categories[]'/></td>\n
162
- <td><a href='".get_bloginfo('url')."/wp-admin/admin.php?page=events-manager-categories&amp;action=edit&amp;category_ID=".$this_category['category_id']."'>".$this_category['category_id']."</a></td>\n
163
- <td><a href='".get_bloginfo('url')."/wp-admin/admin.php?page=events-manager-categories&amp;action=edit&amp;category_ID=".$this_category['category_id']."'>".$this_category['category_name']."</a></td>\n
164
  </tr>\n
165
  ";
166
  }
@@ -276,4 +277,114 @@ function dbem_get_event_category($event_id) {
276
  return $category;
277
  }
278
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
279
  ?>
24
  function dbem_add_to_events_submenu () {
25
  if(function_exists('add_submenu_page')) {
26
  $file = dirname(__FILE__).DIRECTORY_SEPARATOR."events-manager.php";
27
+ $plugin_page = add_submenu_page($file, __('Event Categories','dbem'),__('Categories','dbem'), SETTING_CAPABILITY, "events-manager-categories", dbem_categories_subpanel);
28
+ add_action( 'admin_head-'. $plugin_page, 'dbem_admin_general_script' );
29
  }
30
  }
31
 
136
  <?-- begin col-right -->\n
137
  <div id='col-right'>\n
138
  <div class='col-wrap'>\n
139
+ <form id='bookings-filter' method='post' action='".get_bloginfo('wpurl')."/wp-admin/admin.php?page=events-manager-categories'>\n
140
  <input type='hidden' name='action' value='delete'/>\n";
141
 
142
  if (count($categories)>0) {
160
  $table .= "
161
  <tr>\n
162
  <td><input type='checkbox' class ='row-selector' value='".$this_category['category_id']."' name='categories[]'/></td>\n
163
+ <td><a href='".get_bloginfo('wpurl')."/wp-admin/admin.php?page=events-manager-categories&amp;action=edit&amp;category_ID=".$this_category['category_id']."'>".$this_category['category_id']."</a></td>\n
164
+ <td><a href='".get_bloginfo('wpurl')."/wp-admin/admin.php?page=events-manager-categories&amp;action=edit&amp;category_ID=".$this_category['category_id']."'>".$this_category['category_name']."</a></td>\n
165
  </tr>\n
166
  ";
167
  }
277
  return $category;
278
  }
279
 
280
+ function dbem_attributes_form($event) {
281
+ $dbem_data = $event['event_attributes'];
282
+ //We also get a list of attribute names and create a ddm list (since placeholders are fixed)
283
+ $formats =
284
+ get_option ( 'dbem_event_list_item_format' ).
285
+ get_option ( 'dbem_event_page_title_format' ).
286
+ get_option ( 'dbem_full_calendar_event_format' ).
287
+ get_option ( 'dbem_location_baloon_format' ).
288
+ get_option ( 'dbem_location_event_list_item_format' ).
289
+ get_option ( 'dbem_location_page_title_format' ).
290
+ get_option ( 'dbem_map_text_format' ).
291
+ get_option ( 'dbem_rss_description_format' ).
292
+ get_option ( 'dbem_rss_title_format' ).
293
+ get_option ( 'dbem_single_event_format' ).
294
+ get_option ( 'dbem_single_location_format' );
295
+ //We now have one long string of formats
296
+ preg_match_all("/#_ATT\{.+?\}(\{.+?\})?/", $formats, $placeholders);
297
+ $attributes = array();
298
+ //Now grab all the unique attributes we can use in our event.
299
+ foreach($placeholders[0] as $result) {
300
+ $attribute = substr( substr($result, 0, strpos($result, '}')), 6 );
301
+ if( !in_array($attribute, $attributes) ){
302
+ $attributes[] = $attribute ;
303
+ }
304
+ }
305
+ ?>
306
+ <div class="wrap">
307
+ <h2>Attributes</h2>
308
+ <p>Add attributes here</p>
309
+ <form method="post" action="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?>">
310
+ <table class="form-table">
311
+ <thead>
312
+ <tr valign="top">
313
+ <td><strong>Attribute Name</strong></td>
314
+ <td><strong>Value</strong></td>
315
+ </tr>
316
+ </thead>
317
+ <tbody id="mtm_body">
318
+ <?php
319
+ $count = 1;
320
+ if( is_array($dbem_data) and count($dbem_data) > 0){
321
+ foreach( $dbem_data as $name => $value){
322
+ ?>
323
+ <tr valign="top" id="mtm_<?php echo $count ?>">
324
+ <td scope="row">
325
+ <select name="mtm_<?php echo $count ?>_ref">
326
+ <?php
327
+ if( !in_array($name, $attributes) ){
328
+ echo "<option value='$name'>$name (".__('Not defined in templates', 'dbem').")</option>";
329
+ }
330
+ foreach( $attributes as $attribute ){
331
+ if( $attribute == $name ) {
332
+ echo "<option selected='selected'>$attribute</option>";
333
+ }else{
334
+ echo "<option>$attribute</option>";
335
+ }
336
+ }
337
+ ?>
338
+ </select>
339
+ <a href="#" rel="<?php echo $count ?>">Remove</a>
340
+ </td>
341
+ <td>
342
+ <input type="text" name="mtm_<?php echo $count ?>_name" value="<?php echo $value ?>" />
343
+ </td>
344
+ </tr>
345
+ <?php
346
+ $count++;
347
+ }
348
+ }else{
349
+ if( count( $attributes ) > 0 ){
350
+ ?>
351
+ <tr valign="top" id="mtm_<?php echo $count ?>">
352
+ <td scope="row">
353
+ <select name="mtm_<?php echo $count ?>_ref">
354
+ <?php
355
+ foreach( $attributes as $attribute ){
356
+ echo "<option>$attribute</option>";
357
+ }
358
+ ?>
359
+ </select>
360
+ <a href="#" rel="<?php echo $count ?>">Remove</a>
361
+ </td>
362
+ <td>
363
+ <input type="text" name="mtm_<?php echo $count ?>_name" value="<?php echo $value ?>" />
364
+ </td>
365
+ </tr>
366
+ <?php
367
+ }else{
368
+ ?>
369
+ <tr valign="top">
370
+ <td scope="row" colspan='2'>
371
+ <?php _e('In order to use attributes, you must define some in your templates, otherwise they\'ll never show. Go to Events > Settings to add attribute placeholders.', 'dbem'); ?>
372
+ </td>
373
+ </tr>
374
+ <?php
375
+
376
+ }
377
+ }
378
+ ?>
379
+ </tbody>
380
+ <tfoot>
381
+ <tr valign="top">
382
+ <td colspan="3"><a href="#" id="mtm_add_tag">Add new tag</a></td>
383
+ </tr>
384
+ </tfoot>
385
+ </table>
386
+ </form>
387
+ </div>
388
+ <?php
389
+ }
390
  ?>
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: nutsmuggler, netweblogic
3
  Donate link: http://davidebenini.it
4
  Tags: events, manager, calendar, gigs, concert, maps, geotagging
5
  Requires at least: 2.7
6
- Tested up to: 2.8.3
7
- Stable tag: 2.0rc2
8
 
9
  Manage events and display them in your blog. Includes recurring events, location management, calendar, Google map integration, RSVP.
10
 
@@ -179,4 +179,31 @@ Added shortcode option in event_list, so category=ID is an option now
179
  Added #_CATEGORY as a placeholder
180
  Added the TinyMCE of wordpress to the description of the event. That solves the problem of adding pictures!
181
  Added an end date option always on for multi-day events.
182
- Added a new placeholder format to deal with the end date. You can now wrap dates in #_{} or #@_{} . The values inside will have a format of date(). For example #_{Y-m-d} #@_{ \u\n\t\i\l Y-m-d} will show as "2009-03-23 until 2009-03-28" (only for end dates with no recurrence) or just "2009-03-23" for normal events.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  Donate link: http://davidebenini.it
4
  Tags: events, manager, calendar, gigs, concert, maps, geotagging
5
  Requires at least: 2.7
6
+ Tested up to: 2.9.2
7
+ Stable tag: 2.1
8
 
9
  Manage events and display them in your blog. Includes recurring events, location management, calendar, Google map integration, RSVP.
10
 
179
  Added #_CATEGORY as a placeholder
180
  Added the TinyMCE of wordpress to the description of the event. That solves the problem of adding pictures!
181
  Added an end date option always on for multi-day events.
182
+ Added a new placeholder format to deal with the end date. You can now wrap dates in #_{} or #@_{} . The values inside will have a format of date(). For example #_{Y-m-d} #@_{ \u\n\t\i\l Y-m-d} will show as "2009-03-23 until 2009-03-28" (only for end dates with no recurrence) or just "2009-03-23" for normal events.
183
+
184
+ 2.1
185
+ Properly added Marcus Sykes as a contributor
186
+ Added a full calendar
187
+ Added an #_EDITEVENT placeholder
188
+ Added Brazialian Portuguese localization and some translatable strings
189
+ Added a today scope for events lists
190
+ Increased to 3 te default lists limit
191
+ Categories are now displayed in the events table
192
+ Now weeks starts according to WP settings
193
+ Moved the hide page option up for better access
194
+ Attributes column was not created when the plugin was upgraded, fixed
195
+ Added comment field to the RSVP form and #_COMMENT placeholder in RSVP email templates
196
+ Added customizable title to small calendar
197
+ Removed php short tags
198
+ Changed RVSP 'no seats available message' for better English
199
+ Bugfix: there was a time bug
200
+ Bugfix: event_time not taken into consideration in ordering events, fixed
201
+ Bugfix: on calendar for days after 28 on the event calendar view
202
+ Bugfix: for events in days with single digit
203
+ Bugfix: events link in the calendar now work with permalink
204
+ Bugfix: today in next mont was not matched in the calendar
205
+ Bugfix: _RESPPHONE was not matched in emails
206
+ Bugfix: fixed security vulnerability, which could lead to sql inject attacks
207
+ Bugfix: locations with apostrophe were duplicated
208
+ Bugfix: bloginfo('wpurl') instead of bloginfo('url')
209
+ Bugfix: now loading textdomain in the new (not deprecated) way