Changeset 640941
- Timestamp:
- 12/18/2012 05:38:06 AM (13 years ago)
- Location:
- ajax-event-calendar/trunk
- Files:
-
- 1 added
- 1 deleted
- 4 edited
-
ajax-event-calendar.php (modified) (11 diffs)
-
css/custom.css (modified) (1 diff)
-
inc/show-event.php (modified) (8 diffs)
-
js/jquery.simplemodal.1.4.2.min.js (deleted)
-
js/jquery.simplemodal.1.4.3.min.js (added)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ajax-event-calendar/trunk/ajax-event-calendar.php
r637500 r640941 4 4 Plugin URI: http://wordpress.org/extend/plugins/ajax-event-calendar/ 5 5 Description: A fully localized community calendar that allows authorized users to manage events in custom categories. 6 Version: 1.0. 36 Version: 1.0.4 7 7 Author: Eran Miller 8 8 Author URI: http://eranmiller.com … … 39 39 40 40 define('AEC_MENU_POSITION', null); //previously 30 41 define('AEC_VERSION', '1.0. 3');41 define('AEC_VERSION', '1.0.4'); 42 42 define('AEC_FILE', basename(__FILE__)); 43 43 define('AEC_NAME', str_replace('.php', '', AEC_FILE)); … … 60 60 private $required_fields = array(); 61 61 private $shortcode_params = array(); 62 private $admin_messages = array(); 62 63 private $plugin_defaults = array( 63 64 'filter_label' => 'Show Type', … … 95 96 add_action('wp_print_scripts', array($this, 'frontend_calendar_scripts')); 96 97 add_action('delete_user', array($this, 'delete_events_by_user')); 97 98 add_action('admin_notices', array(&$this, 'admin_alert')); 99 98 100 // ajax hooks 99 101 add_action('wp_ajax_nopriv_get_events', array($this, 'render_calendar_events')); … … 351 353 } 352 354 355 function set_admin_alert($message) { 356 array_push($this->admin_messages, print_r($message, true)); 357 } 358 359 // display admin alerts 360 function admin_alert() { 361 $alerts = $this->admin_messages; 362 if (count($alerts)) { 363 foreach ($alerts as $alert) { 364 printf('<div class="updated">%s</div>', $alert); 365 } 366 } 367 } 368 353 369 function localize_plugin($page) { 354 370 load_plugin_textdomain(AEC_NAME, false, AEC_NAME . '/locale/'); … … 360 376 date_default_timezone_set('UTC'); 361 377 } 378 379 // localization: date/time 380 if (get_option('timezone_string')) { 381 $this->timezone = get_option('timezone_string'); 382 } else { 383 $this->set_admin_alert(sprintf('<p>Æ[alendar %s.<br>%s... <a href="http://www.travelmath.com/time-zone/" target="_blank"><strong>%s</strong></a>.</p> 384 <h3><a href="' . admin_url() . 'options-general.php">%s</a></h3>' 385 , __('requires a city value for the Timezone setting', AEC_NAME) 386 , __("Not all cities are listed. Can't find your city in the timezone dropdown?", AEC_NAME) 387 , __('Search for your standardized timezone.', AEC_NAME) 388 , __('Update Blog Settings', AEC_NAME))); 389 } 390 391 // get_magic_quotes_gpc issue 392 if (get_magic_quotes_gpc()) { 393 $this->set_admin_alert(sprintf('<p>%s<br>%s <a href="http://wordpress.org/support/topic/plugin-ajax-event-calendar-ajax-event-calendar-dont-like-the-apostrophes?replies=11#post-2259386" target="_blank"><strong>%s</strong></a>.</p>' 394 , __('Your PHP setup has magic_quotes_gpc turned ON.', AEC_NAME) 395 , __('Learn about the undesired results it produces and how to disable this setting', AEC_NAME) 396 , __('in this forum thread', AEC_NAME))); 397 } 362 398 363 399 // register scripts 364 400 wp_register_script('fullcalendar', AEC_URL . 'js/jquery.fullcalendar.min.js', array('jquery'), '1.5.3', true); 365 wp_register_script('simplemodal', AEC_URL . 'js/jquery.simplemodal.1.4. 2.min.js', array('jquery'), '1.4.2', true);401 wp_register_script('simplemodal', AEC_URL . 'js/jquery.simplemodal.1.4.3.min.js', array('jquery'), '1.4.3', true); 366 402 wp_register_script('jquery-ui-datepicker', AEC_URL . 'js/jquery.ui.datepicker.min.js', array('jquery-ui-core'), '1.8.5', true); 367 403 wp_register_script('datepicker-locale', AEC_URL . 'js/i18n/jquery.ui.datepicker-' . substr(get_locale(), 0, 2) . '.js', array('jquery-ui-datepicker'), '1.8.5', true); … … 536 572 return array_merge($this->localized_variables(), 537 573 array( 538 'ajaxurl' => admin_url('admin-ajax.php'), // required for non-admin ajax pages539 'editable' => false574 'ajaxurl' => admin_url('admin-ajax.php', is_ssl() ? 'https' : 'http'), 575 'editable' => false 540 576 ) 541 577 ); … … 595 631 return; 596 632 } 597 // disabled: until I can conditionally load these scripts in text widgets with shortcodes 598 // if ($this->has_shortcode('calendar') || $this->has_shortcode('eventlist')) { 599 wp_enqueue_script('jquery'); 600 wp_enqueue_script('fullcalendar'); 601 wp_enqueue_script('simplemodal'); 602 wp_enqueue_script('mousewheel'); 603 wp_enqueue_script('growl'); 604 wp_enqueue_script('jquery-ui-datepicker'); 605 if (AEC_LOCALE != 'en') { 606 wp_enqueue_script('datepicker-locale'); // if not in English, load localization 607 } 608 wp_enqueue_script('init_show_calendar'); 609 wp_localize_script('init_show_calendar', 'custom', $this->frontend_calendar_variables()); 610 // } 633 wp_enqueue_script('jquery'); 634 wp_enqueue_script('fullcalendar'); 635 wp_enqueue_script('simplemodal'); 636 wp_enqueue_script('mousewheel'); 637 wp_enqueue_script('growl'); 638 wp_enqueue_script('jquery-ui-datepicker'); 639 if (AEC_LOCALE != 'en') { 640 wp_enqueue_script('datepicker-locale'); // if not in English, load localization 641 } 642 wp_enqueue_script('init_show_calendar'); 643 wp_localize_script('init_show_calendar', 'custom', $this->frontend_calendar_variables()); 611 644 } 612 645 … … 752 785 $categories = (isset($categories)) ? $this->cleanse_shortcode_input($categories) : false; 753 786 $excluded = ($categories && isset($excluded)) ? $excluded : false; 754 //$limit = (!intval($limit)) ? 4 : intval($limit);755 787 $limit = ($limit == "none") ? false : intval($limit); 756 788 $whitelabel = ($whitelabel == "true") ? true : false; … … 1419 1451 } 1420 1452 1421 /* TODO: waiting for improved WordPress core delete_user hook1422 if (!isset($_POST['user_id']) || !isset($_POST['reassigned']))1423 return;1424 1425 global $wpdb;1426 $result = $wpdb->update($wpdb->prefix . AEC_EVENT_TABLE,1427 array('user_id' => $_POST['reassigned']),1428 array('user_id' => $_POST['user_id']),1429 array('%d'),1430 array('%d')1431 );1432 return $this->return_result($result);1433 */1434 1435 1453 function db_delete_events_by_user($id) { 1436 1454 global $wpdb; … … 1731 1749 } 1732 1750 1733 /* TODO: activate when able to conditionally load scripts in active text widgets with shortcodes1734 function has_shortcode($shortcode = '') {1735 $post_to_check = get_post(get_the_ID());1736 $found = false;1737 if (!$shortcode) {1738 return $found;1739 }1740 if (stripos($post_to_check->post_content, '[' . $shortcode) !== false) {1741 $found = true;1742 }1743 return $found;1744 }1745 */1746 1747 1751 // CUSTOMIZE WORDPRESS 1748 1752 // adds column field label to WordPress users page -
ajax-event-calendar/trunk/css/custom.css
r637500 r640941 7 7 #aec-calendar table{margin:0 !important} 8 8 #aec-container{position:relative;float:none} 9 10 /* fix branding zindex/modal overlay */ 11 #branding {z-index: inherit} 9 12 10 13 .fc-event-disabled{opacity:0.3;cursor:not-allowed !important} -
ajax-event-calendar/trunk/inc/show-event.php
r637500 r640941 33 33 } 34 34 35 $out = "< p class='times'>{$event->start_date} {$event->start_time} {$divider} {$event->end_date} {$event->end_time}</p>\n";35 $out = "<div class='times'>{$event->start_date} {$event->start_time} {$divider} {$event->end_date} {$event->end_time}</div>\n"; 36 36 37 37 $categories = $this->db_query_categories(); … … 42 42 } 43 43 } 44 $out .= "< p class='category'>$cat</p>\n";45 $out .= "< p class='round5 duration'></p>\n";44 $out .= "<div class='category'>$cat</div>\n"; 45 $out .= "<div class='round5 duration'></div>\n"; 46 46 47 47 if (!empty($event->description)) { … … 53 53 $description = make_clickable($description); 54 54 } 55 $out .= "< p class='description'>{$description}</p>\n";55 $out .= "<div class='description'>{$description}</div>\n"; 56 56 } 57 57 … … 71 71 } 72 72 73 $csz = ($aec_options['addy_format']) ? "{$zip} {$city}" : "{$city} {$state}{$comma}{$zip}";73 $csz = ($aec_options['addy_format']) ? "{$zip} {$city}" : "{$city}{$comma} {$state} {$zip}"; 74 74 75 75 // google map link … … 78 78 } 79 79 80 $out .= "< pclass='round5 location'>\n";80 $out .= "<div class='round5 location'>\n"; 81 81 82 82 if (!empty($event->venue)) { … … 97 97 $out .= "<span>" . __('This event is accessible to people with disabilities.', AEC_NAME) . "</span>\n"; 98 98 } 99 $out .= "</ p>\n";99 $out .= "</div>\n"; 100 100 } 101 101 102 102 $adjust = 2; 103 $out .= "< pclass='contact'>\n";103 $out .= "<div class='contact'>\n"; 104 104 if ($event->rsvp) { 105 105 $out .= "<label>" . __('Please register with the contact person for this event.' , AEC_NAME) . "</label>\n"; … … 116 116 $adjust -= 1; 117 117 } 118 $out .= "</ p>\n";118 $out .= "</div>\n"; 119 119 120 120 $org = get_userdata($event->user_id); 121 121 if (!empty($org->organization)) { 122 122 $organization = stripslashes($org->organization); 123 $out .= '< pclass="presented">' . __('Presented by', AEC_NAME) . ' ';123 $out .= '<div class="presented">' . __('Presented by', AEC_NAME) . ' '; 124 124 if (!empty($org->user_url)) { 125 125 $out .= "<a href='{$org->user_url}' target='_blank'>{$organization}</a>"; … … 127 127 $out .= $organization; 128 128 } 129 $out .= "</ p>\n";129 $out .= "</div>\n"; 130 130 $adjust -= 1; 131 131 } -
ajax-event-calendar/trunk/readme.txt
r637500 r640941 102 102 == Changelog == 103 103 104 = 1.0.4 = 105 * [#427](http://code.google.com/p/wp-aec/issues/detail?id=427): fixed unable to create new events with latest version of wp 106 * [#307](http://code.google.com/p/wp-aec/issues/detail?id=307): fixed events not showing when backend is running SSL 107 * [#318](http://code.google.com/p/wp-aec/issues/detail?id=318): fixed Paypal issue with IE9 when using additional text fields 108 * [#186](http://code.google.com/p/wp-aec/issues/detail?id=186): fixed Event Detail Info Popup Window hides behind WP header image & menu 109 * [#280](http://code.google.com/p/wp-aec/issues/detail?id=280): fixed Event Address Display 110 104 111 = 1.0.3 = 105 112 * [#366](http://code.google.com/p/wp-aec/issues/detail?id=366): fixed fullcalendar javascript error 113 * [#299](http://code.google.com/p/wp-aec/issues/detail?id=299): fixed Missing May shortcut for translation 106 114 107 115 = 1.0.2 =
Note: See TracChangeset
for help on using the changeset viewer.