Plugin Directory

Changeset 524174


Ignore:
Timestamp:
03/27/2012 06:35:10 AM (14 years ago)
Author:
eranmiller
Message:

IE bug fix and widget to eventlist migration reminder

Location:
ajax-event-calendar/tags/1.0.2
Files:
1 deleted
1 edited
15 copied

Legend:

Unmodified
Added
Removed
  • ajax-event-calendar/tags/1.0.2/ajax-event-calendar.php

    r519059 r524174  
    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.1
     6Version: 1.0.2
    77Author: Eran Miller
    88Author URI: http://eranmiller.com
     
    3939
    4040define('AEC_MENU_POSITION', null);  //previously 30
    41 define('AEC_VERSION', '1.0.1');
     41define('AEC_VERSION', '1.0.2');
    4242define('AEC_FILE', basename(__FILE__));
    4343define('AEC_NAME', str_replace('.php', '', AEC_FILE));
     
    17881788if (class_exists('ajax_event_calendar')) {
    17891789    require_once AEC_PATH . 'inc/widget-contributors.php';
     1790    require_once AEC_PATH . 'inc/widget-upcoming.php';
    17901791    $aec = new ajax_event_calendar();
    17911792}
  • ajax-event-calendar/tags/1.0.2/inc/widget-upcoming.php

    r444003 r524174  
    22/**
    33 * Upcoming Event Widget Class
     4    As indicated in version 1.0 and as of version 1.0.1
     5    This widget has been removed from the Ajax Event Calendar plugin.
     6   
     7    Instead, use the [eventlist] shortcode, explained here: http://wordpress.org/extend/plugins/ajax-event-calendar/installation
     8   
     9    The shortcode offers more customization and placement options than the old widget, explained here:
     10    http://code.google.com/p/wp-aec/wiki/ShortcodeOptions
    411 */
    512
     
    714
    815    function aec_upcoming_events () {
    9         $widget_ops = array('description' => __('Displays upcoming events with optional filters.', AEC_NAME));
     16        $widget_ops = array('description' => 'This widget has been replaced by the [eventlist] shortcode, read the documentation for details!');
    1017        parent::WP_Widget(false, __('AEC Upcoming Events', AEC_NAME), $widget_ops);
    1118    }
    12    
    13     function query_events_by_category ($category_id, $eventlimit) {
    14         global $wpdb;
    15         $start = date('Y-m-d');
    16         $andcategory = ($category_id) ? ' AND category_id = ' . $category_id : '';
    17 
    18         $results = $wpdb->get_results($wpdb->prepare('SELECT
    19                                                     id,
    20                                                     title,
    21                                                     start,
    22                                                     end,
    23                                                     allDay,
    24                                                     category_id
    25                                                     FROM ' . $wpdb->prefix . AEC_EVENT_TABLE . '
    26                                                     WHERE (start >= %s
    27                                                     OR end >= %s)' .
    28                                                     $andcategory . '
    29                                                     ORDER BY start
    30                                                     LIMIT %d;',
    31                                                     $start,
    32                                                     $start,
    33                                                     $eventlimit));
    34         if ($results !== false) {
    35             return $results;
    36         }
    37     }
    38    
    39     function query_categories() {
    40         global $wpdb;
    41         $results = $wpdb->get_results('SELECT * FROM ' . $wpdb->prefix . AEC_CATEGORY_TABLE . ' ORDER BY id;');
    42         if ($results !== false) {
    43             return $results;
    44         }
    45     }
    46    
     19       
    4720    function widget($args, $instance) {
    48         extract($args, EXTR_SKIP);
    49         $whitelabel = ($instance['whitelabel']) ? apply_filters('widget_whitelabel', $instance['whitelabel']) : false;
    50         $eventlimit = ($instance['eventlimit']) ? apply_filters('widget_eventlimit', $instance['eventlimit']) : 4;
    51         $category   = ($instance['category']) ? apply_filters('widget_category', $instance['category']) : 0;
    52         $title      = ($instance['title']) ? apply_filters('widget_title', $instance['title']) : __('Upcoming Events', AEC_NAME);
    53         $callink    = ($instance['callink']) ? apply_filters('widget_callink', $instance['callink']) : 0;
    54        
    5521        echo $before_widget;
    5622        echo $before_title . $title . $after_title;
    57         $out        = '<ul class="aec-eventlist">';
    58         $events     = $this->query_events_by_category($category, $eventlimit);
    59         if ($events) {
    60             foreach ($events as $event) {
    61                 // split database formatted datetime value into display formatted date and time values
    62                 $event->start_date  = ajax_event_calendar::convert_date($event->start, AEC_DB_DATETIME_FORMAT, AEC_WP_DATE_FORMAT);
    63                 $event->start_time  = ajax_event_calendar::convert_date($event->start, AEC_DB_DATETIME_FORMAT, AEC_WP_TIME_FORMAT);
    64                 $event->end_date    = ajax_event_calendar::convert_date($event->end, AEC_DB_DATETIME_FORMAT, AEC_WP_DATE_FORMAT);
    65                 $event->end_time    = ajax_event_calendar::convert_date($event->end, AEC_DB_DATETIME_FORMAT, AEC_WP_TIME_FORMAT);
    66                
    67                 // link to event           
    68                 $class = ($whitelabel) ? '' : ' cat' . $event->category_id;
    69                 //$out .= '<li class="fc-event round5' . $class . '" onClick="jQuery.aecDialog({\'id\':' . $event->id . '});">';
    70                 $out .= '<li class="fc-event round5' . $class . '" onClick="jQuery.aecDialog({\'id\':' . $event->id . ',\'start\':\'' . $event->start . '\',\'end\':\'' . $event->end . '\'});">';
    71                
    72                 $out .= '<span class="fc-event-time">';
    73                 $out .= $event->start_date;
    74                 // multiple day event, not spanning all day
    75                 if (!$event->allDay) {
    76                     $out .= ' ' . $event->start_time;
    77                 }
    78                 $out .= '</span>';
    79                
    80                 //$out .= '<strong>' . ajax_event_calendar::render_i18n_data($event->title) . '</strong><br>';
    81                 $out .= '<span class="fc-event-title">' . ajax_event_calendar::render_i18n_data($event->title) . '</span>';
    82                 $out .= '</li>';
    83             }
    84         } else {
    85             $out .= '<li>';
    86             $out .= __('No upcoming events', AEC_NAME);
    87             $out .= '</li>';
    88         }
    89         if ($callink) {
    90             $out .= "<h3 class='widget-title'><a href='{$callink}'>" . __('Link to Calendar', AEC_NAME) . '</a></h3>';
    91         }
    92         $out .= '</ul>';
    93         echo $out;
     23        echo '<div style="padding:5px; background-color:#ff0"><p><strong>IMPORTANT:</strong></p>
     24        <p>As of version 1.0.1, this widget has been removed from the Ajax Event Calendar plugin. Instead, use the [eventlist] shortcode explained here:</p>
     25        <p>http://wordpress.org/extend/plugins/ajax-event-calendar/installation</p>
     26        <p>The shortcode offers more customization and placement options than the old widget, explained here:</p>
     27        <p>http://code.google.com/p/wp-aec/wiki/ShortcodeOptions</p>
     28        </div>';
    9429        echo $after_widget;
    9530    }
    9631       
    97     function update ($new_instance, $old_instance) {
    98         $instance = $old_instance;
    99         $instance['whitelabel'] = (isset($new_instance['whitelabel']) ? 1 : 0);
    100         $instance['callink'] = $new_instance['callink'];
    101         $instance['eventlimit'] = $new_instance['eventlimit'];
    102         $instance['title'] = $new_instance['title'];
    103         $instance['category'] = $new_instance['category'];
    104         return $instance;
    105     }
    106    
    10732    /** @see WP_Widget::form */
    10833    function form ($instance) {
     
    11439        $callink = $instance['callink'];
    11540?>
    116     <p><strong>IMPORTANT:</strong><br>This widget will be removed from future versions of the Ajax Event Calendar plugin. Instead, use the [eventlist] shortcode, <a href="http://wordpress.org/extend/plugins/ajax-event-calendar/installation/" target="_blank">explained here</a>, which offers more customization and placement options than the widget.</p>
    117     <p><strong>NOTE:</strong><br>This widget will not properly render repeat events.</p>
    118     <hr/>
    119     <p>
    120         <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Widget Title', AEC_NAME); ?></label>
    121         <input id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" class="widefat" value="<?php echo $title; ?>">
    122     </p>
    123     <p>
    124         <label for="<?php echo $this->get_field_id('category'); ?>"><?php _e('Event category displayed', AEC_NAME); ?></label>
    125         <select id="<?php echo $this->get_field_id('category'); ?>" name="<?php echo $this->get_field_name('category'); ?>" class="widefat" style="width:100%;">
    126             <?php
    127                 echo '<option value="0">' . __('All', AEC_NAME) . '</option>';
    128                 $categories = $this->query_categories();
    129                 foreach ($categories as $cat) {
    130                     $category_selected = ($cat->id == $category) ? ' selected="selected"' : '';
    131                     echo '<option value="' . $cat->id . '"' . $category_selected . '>' . ajax_event_calendar::render_i18n_data($cat->category) . '</option>';
    132                 }
    133             ?>
    134         </select>
    135     </p>
    136     <p>
    137         <label for="<?php echo $this->get_field_id('eventlimit'); ?>"><?php _e('Maximum events displayed', AEC_NAME); ?></label>
    138         <select id="<?php echo $this->get_field_id('eventlimit'); ?>" name="<?php echo $this->get_field_name('eventlimit'); ?>" class="widefat" style="width:100%;">
    139             <?php
    140                 $limitrange = range(2, 12);
    141                 foreach ($limitrange as $event) {
    142                     $selected_eventlimit = ($event == $eventlimit) ? ' selected="selected"' : '';
    143                     echo '<option value="' . $event . '"' . $selected_eventlimit . '>' . $event . '</option>';
    144                 }
    145             ?>
    146         </select>
    147     </p>
    148     <p>
    149         <label for="<?php echo $this->get_field_id('callink'); ?>"><?php _e('Link to calendar', AEC_NAME); ?></label>
    150         <input id="<?php echo $this->get_field_id('callink'); ?>" name="<?php echo $this->get_field_name('callink'); ?>" class="widefat" value="<?php echo $callink; ?>" />
    151     </p>
    152     <p>
    153         <input class="checkbox" type="checkbox" <?php checked($whitelabel, true ); ?> id="<?php echo $this->get_field_id('whitelabel'); ?>" name="<?php echo $this->get_field_name('whitelabel'); ?>" />
    154         <label for="<?php echo $this->get_field_id('whitelabel'); ?>"><?php _e('Hide category colors', AEC_NAME); ?></label>
    155     </p>
    156     <?php
     41    <div style="padding:5px; background-color:#ff0"><p><strong>IMPORTANT:</strong></p><p>As of version 1.0.1, this widget has been removed from the Ajax Event Calendar plugin. Instead, use the [eventlist] shortcode <a href="http://wordpress.org/extend/plugins/ajax-event-calendar/installation">explained here:</a></p><p>The shortcode offers more customization and placement options than the old widget, <a href="http://code.google.com/p/wp-aec/wiki/ShortcodeOptions">explained here</a>.</p></div>
     42<?php
    15743    }
    15844}
    159 
    16045add_action('widgets_init', create_function('', 'return register_widget("aec_upcoming_events");'));
    16146?>
  • ajax-event-calendar/tags/1.0.2/js/jquery.init_admin_calendar.js

    r519059 r524174  
    309309                                            separator: ':'
    310310                                        });
    311 console.log(times);
     311                                       
    312312                                        // toggle weekends
    313313                                        if (custom.show_weekends === '0') {
  • ajax-event-calendar/tags/1.0.2/readme.txt

    r519059 r524174  
    55Requires at least: 3.1
    66Tested up to: 3.3.1
    7 Stable tag: 1.0.1
     7Stable tag: 1.0.2
    88
    99An easy-to-use community calendar and event list that allows authorized users to visual manage events into custom categories.
     
    1717NOTE: The plugin supports multiple eventlist instances per page, but only one calendar instance.
    1818<br>This plugin does not support WordPress MU.
     19
     20= Support =
     21* [Read about installation instructions](http://wordpress.org/extend/plugins/ajax-event-calendar/installation)
     22* [Read about shortcode display options](http://code.google.com/p/wp-aec/wiki/ShortcodeOptions)
     23* [Find answers to Frequently Asked Questions](http://code.google.com/p/wp-aec/wiki/FrequentlyAskedQuestions)
     24* [Ask for help from fellow users on the WordPress forums](http://wordpress.org/tags/ajax-event-calendar?forum_id=10)
     25* [Submit issues and feature requests to the Author using the Issue Tracker](http://code.google.com/p/wp-aec/issues/list?can=1)
    1926
    2027=  Features =
     
    4451* Assign users the ability to modify all events (**aec_manage_events**)
    4552* Assign users the ability to change all calendar options (**aec_manage_calendar**)
    46 * Available in 21 languages with support for right-to-left languages (not all translations are current)
    47 
    48 = Need Support? =
    49 * [Read about installation and options](http://wordpress.org/extend/plugins/ajax-event-calendar/installation)
    50 * [Find answers to Frequently Asked Questions](http://code.google.com/p/wp-aec/wiki/FrequentlyAskedQuestions)
    51 * [Ask for help in the WordPress forums](http://wordpress.org/tags/ajax-event-calendar?forum_id=10)
    52 * [Submit issues and feature requests](http://code.google.com/p/wp-aec/issues/list?can=1)
     53* Available in 23 languages with support for right-to-left languages (not all translations are current)
    5354
    5455= A BIG Thank You to those who have provided translations =
    5556* Arabic (Sultan G) - Shukran
    5657* Catalan (Isaac Turon) - Gracias
     58* Chinese [China and Taiwan] (GC Tech) - M goi/Xie xie
    5759* Czech (Kamil) - Dekuji
    5860* Danish (kfe1970) - Tak
     
    129131== Changelog ==
    130132
     133= 1.0.2 =
     134* [#264](http://code.google.com/p/wp-aec/issues/detail?id=264): fixed critical IE button locking issue
     135* added inline widget message to alert users not aware of notifications on plugin homepage
     136* added chinese
     137
    131138= 1.0.1 =
    132139* fixed drag-n-drop functionality (updated fullcalendar.js)
    133 * fixed mousewheel scrolling (updated mousescroll.js) [246](http://code.google.com/p/wp-aec/issues/detail?can=2&q=246)
     140* [246](http://code.google.com/p/wp-aec/issues/detail?can=2&q=246): fixed mousewheel scrolling (updated mousescroll.js)
    134141* replaced dynamically generated cat-colors.css file with inline css to eliminate permission failures
    135142* updated simplemodal.js
     
    383390
    384391== Upgrade Notice ==
    385 = 1.0.1 =
    386 * mousewheel, drag-n-drop, and modal style bug fixes
     392= 1.0.2 =
     393* IE bug fix and widget to eventlist migration reminder
Note: See TracChangeset for help on using the changeset viewer.