Plugin Directory

Changeset 640941


Ignore:
Timestamp:
12/18/2012 05:38:06 AM (13 years ago)
Author:
eranmiller
Message:

v1.0.4 dev

Location:
ajax-event-calendar/trunk
Files:
1 added
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • ajax-event-calendar/trunk/ajax-event-calendar.php

    r637500 r640941  
    44Plugin URI: http://wordpress.org/extend/plugins/ajax-event-calendar/
    55Description: A fully localized community calendar that allows authorized users to manage events in custom categories.
    6 Version: 1.0.3
     6Version: 1.0.4
    77Author: Eran Miller
    88Author URI: http://eranmiller.com
     
    3939
    4040define('AEC_MENU_POSITION', null);  //previously 30
    41 define('AEC_VERSION', '1.0.3');
     41define('AEC_VERSION', '1.0.4');
    4242define('AEC_FILE', basename(__FILE__));
    4343define('AEC_NAME', str_replace('.php', '', AEC_FILE));
     
    6060        private $required_fields  = array();
    6161        private $shortcode_params = array();
     62        private $admin_messages   = array();
    6263        private $plugin_defaults  = array(
    6364                                    'filter_label'      => 'Show Type',
     
    9596            add_action('wp_print_scripts', array($this, 'frontend_calendar_scripts'));
    9697            add_action('delete_user', array($this, 'delete_events_by_user'));
    97 
     98            add_action('admin_notices', array(&$this, 'admin_alert'));
     99           
    98100            // ajax hooks
    99101            add_action('wp_ajax_nopriv_get_events', array($this, 'render_calendar_events'));
     
    351353        }
    352354
     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       
    353369        function localize_plugin($page) {
    354370            load_plugin_textdomain(AEC_NAME, false, AEC_NAME . '/locale/');
     
    360376                date_default_timezone_set('UTC');
    361377            }
     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>&#198;&#91;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            }
    362398
    363399            // register scripts
    364400            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);
    366402            wp_register_script('jquery-ui-datepicker', AEC_URL . 'js/jquery.ui.datepicker.min.js', array('jquery-ui-core'), '1.8.5', true);
    367403            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);
     
    536572            return array_merge($this->localized_variables(),
    537573                    array(
    538                         'ajaxurl'   => admin_url('admin-ajax.php'),     // required for non-admin ajax pages
    539                         'editable'  => false
     574                        'ajaxurl'               => admin_url('admin-ajax.php', is_ssl() ? 'https' : 'http'),
     575                        'editable'              => false
    540576                    )
    541577            );
     
    595631                return;
    596632            }
    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());
    611644        }
    612645
     
    752785            $categories     = (isset($categories)) ? $this->cleanse_shortcode_input($categories) : false;
    753786            $excluded       = ($categories && isset($excluded)) ? $excluded : false;
    754             //$limit            = (!intval($limit)) ? 4 : intval($limit);
    755787            $limit          = ($limit == "none") ? false : intval($limit);
    756788            $whitelabel     = ($whitelabel == "true") ? true : false;
     
    14191451        }
    14201452
    1421         /* TODO: waiting for improved WordPress core delete_user hook
    1422             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 
    14351453        function db_delete_events_by_user($id) {
    14361454            global $wpdb;
     
    17311749        }
    17321750
    1733         /* TODO: activate when able to conditionally load scripts in active text widgets with shortcodes
    1734         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 
    17471751        // CUSTOMIZE WORDPRESS
    17481752        // adds column field label to WordPress users page
  • ajax-event-calendar/trunk/css/custom.css

    r637500 r640941  
    77#aec-calendar table{margin:0 !important}
    88#aec-container{position:relative;float:none}
     9
     10/* fix branding zindex/modal overlay */
     11#branding {z-index: inherit}
    912
    1013.fc-event-disabled{opacity:0.3;cursor:not-allowed !important}
  • ajax-event-calendar/trunk/inc/show-event.php

    r637500 r640941  
    3333    }
    3434
    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";
    3636
    3737    $categories = $this->db_query_categories();
     
    4242        }
    4343    }
    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";
    4646
    4747    if (!empty($event->description)) {
     
    5353            $description = make_clickable($description);
    5454        }
    55         $out .= "<p class='description'>{$description}</p>\n";
     55        $out .= "<div class='description'>{$description}</div>\n";
    5656    }
    5757
     
    7171            }
    7272
    73             $csz        = ($aec_options['addy_format']) ? "{$zip} {$city}" : "{$city} {$state}{$comma}{$zip}";
     73            $csz        = ($aec_options['addy_format']) ? "{$zip} {$city}" : "{$city}{$comma} {$state} {$zip}";
    7474
    7575        // google map link
     
    7878        }
    7979
    80         $out .= "<p class='round5 location'>\n";
     80        $out .= "<div class='round5 location'>\n";
    8181
    8282        if (!empty($event->venue)) {
     
    9797            $out .= "<span>" . __('This event is accessible to people with disabilities.', AEC_NAME) . "</span>\n";
    9898        }
    99         $out .= "</p>\n";
     99        $out .= "</div>\n";
    100100    }
    101101
    102102    $adjust = 2;
    103     $out .= "<p class='contact'>\n";
     103    $out .= "<div class='contact'>\n";
    104104    if ($event->rsvp) {
    105105        $out .= "<label>" . __('Please register with the contact person for this event.' , AEC_NAME) . "</label>\n";
     
    116116        $adjust -= 1;
    117117    }
    118     $out .= "</p>\n";
     118    $out .= "</div>\n";
    119119   
    120120    $org = get_userdata($event->user_id);
    121121    if (!empty($org->organization)) {
    122122        $organization = stripslashes($org->organization);
    123         $out .= '<p class="presented">' . __('Presented by', AEC_NAME) . ' ';
     123        $out .= '<div class="presented">' . __('Presented by', AEC_NAME) . ' ';
    124124        if (!empty($org->user_url)) {
    125125            $out .= "<a href='{$org->user_url}' target='_blank'>{$organization}</a>";
     
    127127            $out .= $organization;
    128128        }
    129         $out .= "</p>\n";
     129        $out .= "</div>\n";
    130130        $adjust -= 1;
    131131    }
  • ajax-event-calendar/trunk/readme.txt

    r637500 r640941  
    102102== Changelog ==
    103103
     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
    104111= 1.0.3 =
    105112* [#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
    106114
    107115= 1.0.2 =
Note: See TracChangeset for help on using the changeset viewer.