WordPress.org

Plugin Directory

Changeset 870330


Ignore:
Timestamp:
03/06/14 01:30:49 (16 months ago)
Author:
joedolson
Message:

Dev Commit.

Location:
my-calendar/trunk
Files:
3 added
1 deleted
17 edited

Legend:

Unmodified
Added
Removed
  • my-calendar/trunk/css/mc-print.css

    r865684 r870330  
    11.my-calendar-header, h3 img, .mc-toggle, .mc_edit_links, #mc-export,.longdesc, .shortdesc , .mc-print, form { display: none; } 
    2 table { border: 1px solid #ddd; border-collapse: collapse; margin: 0 auto;} 
     2table { border: 1px solid #ddd; border-collapse: collapse; margin: 0 auto; width: 100%; } 
    33th { text-align:center; background: #f6f6f6; border: 1px solid #ddd; width: 130px; text-transform:uppercase; } 
    4 td { border: 1px solid #ddd; font-size: 12px; vertical-align: top;} 
     4td { border: 1px solid #ddd; font-size: 12px; vertical-align: top; width: 14.285%; } 
    55.details {border-bottom: 1px solid #ddd; color: #444; margin-bottom: 2px;} 
    6 .details a { display: none; } 
     6.details a, .details img { display: none; } 
    77h3 { font-size: 1.1em; margin: 2px 0 5px;} 
    88p {margin: 2px 0; padding: 1px 0; line-height: 1.2; } 
  • my-calendar/trunk/css/mc-styles.css

    r868934 r870330  
    4545.jd-my-calendar .tablenav { float: right } 
    4646input[id=e_label], input[id=e_title], input[id=location_label], input[id=mc_twitter] { font-size: 1.4em; padding: 5px; width: 100%} 
    47 label[for=mc_twitter] { background: url(images/twitter.png) no-repeat; padding-left: 20px; } 
     47label[for=mc_twitter] { background: url(../images/twitter.png) no-repeat; padding-left: 20px; } 
    4848strong.label { font-weight: 400; } 
    4949#my-calendar-text label { display: inline-block; width: 12em; } 
     
    8888.jd-my-calendar textarea:disabled { color: #333; border: none; box-shadow: none; } 
    8989.mc-locations label { display: block; } 
    90 .mc-locations .checkboxes label { display: inline; } 
     90.mc-locations .checkboxes label, .checkbox label { display: inline; } 
     91 
     92.locations-container { position: relative; } 
     93.mc-locations .location-primary { width: 47%; margin-right: 20px; } 
     94.mc-locations:after { content: ' '; display: table; clear: both; } 
     95.mc-locations .location-secondary { position: absolute; left: 50%; top: 0; width: 47%; } 
     96.mc-locations .locations-container input { max-width: 90%; } 
     97 
     98@media (max-width: 1140px) { 
     99    .mc-locations .locations-container input { max-width: 70%; } 
     100} 
     101 
    91102@media (max-width: 782px) { 
    92103    .jd-my-calendar .tablenav { float: none; } 
  • my-calendar/trunk/js/upload.js

    r857615 r870330  
    2020                    e.preventDefault(); 
    2121                    var $self = $(this), 
    22                             $inpField = $self.parent('.field-holder').find('#event_image'), 
    23                             $idField = $self.parent('.field-holder').find('#event_image_id'),                            
     22                            $inpField = $self.parent('.field-holder').find('#e_image'), 
     23                            $idField = $self.parent('.field-holder').find('#e_image_id'),                            
    2424                            $displayField = $self.parent('.field-holder').find('.event_image'); 
    2525                    clear_existing(); 
  • my-calendar/trunk/my-calendar-api.php

    r868934 r870330  
    88            $api_key = apply_filters( 'mc_api_key', true ); 
    99            if ( $api_key ) { 
    10                 $format = ( isset( $_GET['my-calendar-api'] ) ) ? $_GET['my-calendar-api'] : 'json'; 
    11                 $from = ( isset( $_GET['from'] ) ) ? $_GET['from'] : date( 'Y-m-d', current_time( 'timestamp' ) ); 
    12                 $to = ( isset( $_GET['to'] ) ) ? $_GET['to'] : date( 'Y-m-d', strtotime( current_time( 'timestamp' ).apply_filters('mc_api_auto_date',' + 7 days') ) ); 
     10                $format =       ( isset( $_GET['my-calendar-api'] ) ) ? $_GET['my-calendar-api'] : 'json'; 
     11                $from =         ( isset( $_GET['from'] ) ) ? $_GET['from'] : date( 'Y-m-d', current_time( 'timestamp' ) ); 
     12                $to =           ( isset( $_GET['to'] ) ) ? $_GET['to'] : date( 'Y-m-d', strtotime( current_time( 'timestamp' ).apply_filters('mc_api_auto_date',' + 7 days') ) ); 
    1313                // sanitization is handled elsewhere. 
    14                 $category = ( isset( $_GET['mcat'] ) ) ? $_GET['mcat'] : '' ; 
    15                 $ltype = ( isset( $_GET['ltype'] ) ) ? $_GET['ltype'] : '' ; 
    16                 $lvalue = ( isset( $_GET['lvalue'] ) ) ? $_GET['lvalue'] : '' ; 
    17                 $author = ( isset( $_GET['author'] ) ) ? $_GET['author'] : '' ; 
    18                 $host = ( isset( $_GET['host'] ) ) ? $_GET['host'] : '' ; 
    19                 $data = my_calendar_events( $from, $to, $category, $ltype, $lvalue, 'api', $author, $host ); 
    20                 $output = mc_format_api( $data, $format ); 
     14                $category =     ( isset( $_GET['mcat'] ) ) ? $_GET['mcat'] : '' ; 
     15                $ltype =        ( isset( $_GET['ltype'] ) ) ? $_GET['ltype'] : '' ; 
     16                $lvalue =       ( isset( $_GET['lvalue'] ) ) ? $_GET['lvalue'] : '' ; 
     17                $author =       ( isset( $_GET['author'] ) ) ? $_GET['author'] : '' ; 
     18                $host =         ( isset( $_GET['host'] ) ) ? $_GET['host'] : '' ; 
     19                $data =         my_calendar_events( $from, $to, $category, $ltype, $lvalue, 'api', $author, $host ); 
     20                $output =       mc_format_api( $data, $format ); 
    2121                // if json, encode as json 
    2222                // if xml, encode as xml 
  • my-calendar/trunk/my-calendar-core.php

    r868885 r870330  
    104104    $return = apply_filters( 'mc_file_exists', false, $file ); 
    105105    if ( $return ) { return true; } 
    106     if ( file_exists( get_stylesheet_directory() . '/' . $file ) ) { return true; } 
    107     if ( file_exists( str_replace($base,'my-calendar-custom',$dir ) . $file ) ) { return true; } 
     106    if ( file_exists( get_stylesheet_directory() . '/' . $file ) ) {  return true; } 
     107    if ( file_exists( str_replace( $base,'my-calendar-custom',$dir ) . $file ) ) { return true; } 
    108108    return false; 
    109109} 
     
    163163    } 
    164164    if ( function_exists( 'mcs_submissions' ) ) { 
    165         $mcs = plugins_url('/my-calendar-submissions/mcs-styles.css'); 
    166         $mcs_ui = plugins_url('/my-calendar-submissions/css/smoothness/jquery-ui-1.8.23.custom.css'); 
     165        $mcs = plugins_url( '/my-calendar-submissions/mcs-styles.css' ); 
     166        $mcs_ui = plugins_url( '/my-calendar-submissions/css/smoothness/jquery-ui-1.8.23.custom.css' ); 
    167167        wp_register_style( 'my-calendar-submissions-ui-style', $mcs_ui ); 
    168168        wp_enqueue_style( 'my-calendar-submissions-ui-style' );          
     
    372372        } 
    373373        if ( isset($_GET['page']) && $_GET['page'] == 'my-calendar') { 
    374             echo '<link type="text/css" rel="stylesheet" href="'.plugins_url( 'js/calendrical.css', __FILE__ ).'" />';       
     374            echo '<link type="text/css" rel="stylesheet" href="'.plugins_url( 'css/calendrical.css', __FILE__ ).'" />';      
    375375        } 
    376376    } 
     
    754754            case '1.8.0': 
    755755                $mc_input = get_option( 'mc_input_options' ); 
    756                 if ( !isset( $mc_input['event_use_editor'] ) ) { 
    757                     $mc_input['event_use_editor'] = 'off'; 
    758                     update_option( 'mc_input_options',$mc_input ); 
    759                 } 
    760756                add_option( 'mc_show_weekends','true' ); 
    761757                add_option( 'mc_uri','' ); 
     
    780776                } 
    781777                if ( get_option( 'mc_css_file' ) == '' ) { 
    782                     update_option('mc_css_file','my-calendar.css');              
     778                    update_option('mc_css_file','refresh.css');              
    783779                } 
    784780                // convert old widget settings into new defaults 
     
    12771273            $link = get_permalink( $value ); 
    12781274            update_option( 'mc_uri', $link ); 
    1279             $return = __('Is this your calendar page?','my-calendar'); echo ' <code>'.$link.'</code>'; 
     1275            $return = __( 'Is this your calendar page?','my-calendar' ) . ' <code>'.$link.'</code>'; 
    12801276            return $return; 
    12811277        } 
  • my-calendar/trunk/my-calendar-event-manager.php

    r868934 r870330  
    105105    $post_id = wp_insert_post( $my_post ); 
    106106    wp_set_object_terms( $post_id, (int) $term, 'mc-event-category');    
    107     $attachment_id = ( isset( $_POST['event_image_id'] ) && is_int( $_POST['event_image_id'] ) ) ? $_POST['event_image_id'] : false; 
     107    $attachment_id = ( isset( $_POST['event_image_id'] ) && is_numeric( $_POST['event_image_id'] ) ) ? $_POST['event_image_id'] : false; 
    108108    if ( $attachment_id ) { set_post_thumbnail( $post_id, $attachment_id ); } 
    109109    mc_update_event( 'event_post', $post_id, $event_id ); 
     
    666666            if ( $show_block ) { 
    667667                // because wp_editor cannot return a value, event_desc fields cannot be filtered if its enabled. 
    668                 $value = ( $has_data ) ? $data->event_desc : ''; 
     668                $value = ( $has_data ) ? stripslashes( $data->event_desc ) : ''; 
    669669                echo ' 
    670670                <div class="event_description"> 
    671671                <label for="content">'.__( 'Event Description','my-calendar' ).'</label><br />'; 
    672                 if ( mc_show_edit_block( 'event_use_editor') ) { 
     672                if ( user_can_richedit() ) { 
    673673                    if ( version_compare( get_bloginfo( 'version') , '3.3', '>=') ) { 
    674                         wp_editor( stripslashes( $value ), 'content', array( 'textarea_rows'=>10 ) );  
     674                        wp_editor( $value, 'content', array( 'textarea_rows'=>10 ) );  
    675675                    } else {  
    676                         the_editor( stripslashes( $value ) );  
     676                        the_editor( $value );  
    677677                    } 
    678678                } else { 
    679                     echo '<textarea id="content" name="content" class="event_desc" rows="5" cols="80">'.stripslashes( esc_attr( $value ) ).'</textarea>'; 
     679                    echo '<textarea id="content" name="content" class="event_desc" rows="8" cols="80">'.stripslashes( esc_attr( $value ) ).'</textarea>'; 
    680680                } 
    681681                echo '</div>'; 
     
    697697                <div class="mc-image-upload field-holder"> 
    698698                    <input type="hidden" name="event_image_id" value="" class="textfield" id="e_image_id" /> 
    699                     <label for="e_image">'.__( "Add an image:",'my-calendar' ).'</label><br /><input type="text" name="event_image" id="e_image" size="60" value="'.$value.'" placeholder="http://yourdomain.com/image.jpg" /> <a href="#" class="button textfield-field">'.__( "Upload",'my-calendar' ).'</a> 
    700                 </div>'; 
     699                    <label for="e_image">'.__( "Add an image:",'my-calendar' ).'</label><br /><input type="text" name="event_image" id="e_image" size="60" value="'.$value.'" placeholder="http://yourdomain.com/image.jpg" /> <a href="#" class="button textfield-field">'.__( "Upload",'my-calendar' ).'</a>'; 
    701700                if ( !empty( $data->event_image ) ) { 
    702701                    $return .= '<div class="event_image"><img src="'.esc_attr( $data->event_image ).'" alt="" /></div>'; 
    703702                } else { 
    704703                    $return .= '<div class="event_image"></div>'; 
    705                 }                
     704                } 
     705                $return .= '</div>';                 
    706706            } else { 
    707707                $return = '<input type="hidden" name="event_image" value="'.$value.'" />'; 
     
    18491849    }    
    18501850    $form .= '<p> 
    1851         <label for="e_begin" id="eblabel">'.__('Date (YYYY-MM-DD)','my-calendar').'</label> <input type="text" id="e_begin" name="event_begin[]" class="event_begin calendar_input" size="10" value="'.$event_begin.'" /> 
     1851        <label for="e_begin" id="eblabel">'.__('Date (YYYY-MM-DD)','my-calendar').'</label> <input type="text" id="e_begin" name="event_begin[]" size="10" value="'.$event_begin.'" /> 
    18521852        <label for="e_time">'.__('From','my-calendar').'</label>  
    18531853        <input type="text" id="e_time" name="event_time[]" size="8" value="'.$starttime.'" />    
     
    18601860    </ul> 
    18611861    <p> 
    1862         <label for="e_end" id="eelabel"><em>'.__('End Date (YYYY-MM-DD, optional)','my-calendar').'</em></label> <input type="text" name="event_end[]" id="e_end" class="event_end calendar_input" size="10" value="'.$event_end.'" />  
     1862        <label for="e_end" id="eelabel"><em>'.__('End Date (YYYY-MM-DD, optional)','my-calendar').'</em></label> <input type="text" name="event_end[]" id="e_end" size="10" value="'.$event_end.'" />  
    18631863    </p>'; 
    18641864    return $form; 
     
    18721872        $group = jd_option_selected( $data->event_group,'1' ); 
    18731873        $tickets = esc_attr( $data->event_tickets ); 
    1874         $registration = esc_attr( $data->event_registration ); 
     1874        $registration = stripslashes( esc_attr( $data->event_registration ) ); 
    18751875    } else { 
    18761876        $event_open = $not_open = $group = $tickets = $registration = ''; 
  • my-calendar/trunk/my-calendar-group-manager.php

    r868934 r870330  
    311311        <?php } ?> 
    312312        <?php if ($mc_input['event_desc'] == 'on' || $mc_input_administrator ) { ?> 
    313         <div id="group_description"> 
    314         <?php if ( !empty($data) ) { $description = $data->event_desc; } else { $description = ''; } ?> 
    315         <label for="content"><?php _e('Event Description (<abbr title="hypertext markup language">HTML</abbr> allowed)','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_desc' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label><br /><?php if ( $mc_input['event_use_editor'] == 'on' ) {  if ( version_compare( get_bloginfo( 'version' ) , '3.3' , '>=' ) ) { wp_editor( stripslashes($description), 'content', array( 'textarea_rows'=>10 ) ); } else { the_editor( stripslashes($description) ); } }  else { ?><textarea id="content" name="content" class="event_desc" rows="5" cols="80"><?php echo stripslashes(esc_attr($description)); ?></textarea><?php if ( $mc_input['event_use_editor'] == 'on' ) { ?></div><?php } } ?> 
    316         </div>       
     313            <div id="group_description"><?php  
     314                if ( !empty($data) ) { $description = $data->event_desc; } else { $description = ''; } ?> 
     315                <label for="content"><?php _e('Event Description (<abbr title="hypertext markup language">HTML</abbr> allowed)','my-calendar'); 
     316                if ( !mc_compare_group_members( $group_id,'event_desc' ) ) {  
     317                    echo " <span>".__('Fields do not match','my-calendar')."</span>";  
     318                } ?></label><br /><?php  
     319                if ( version_compare( get_bloginfo( 'version' ) , '3.3' , '>=' ) ) {  
     320                    wp_editor( stripslashes($description), 'content', array( 'textarea_rows'=>10 ) );  
     321                } else {  
     322                    the_editor( stripslashes($description) );  
     323                } ?> 
     324            </div>       
    317325        <?php } ?> 
    318326        <?php if ($mc_input['event_short'] == 'on' || $mc_input_administrator ) { ?> 
  • my-calendar/trunk/my-calendar-install.php

    r868877 r870330  
    412412    add_option('mc_apply_color','background'); 
    413413    add_option('mc_inverse_color','true'); 
    414     add_option('mc_input_options',array( 'event_short'=>'off','event_desc'=>'on','event_category'=>'on','event_image'=>'on','event_link'=>'on','event_recurs'=>'on','event_open'=>'off','event_location'=>'on','event_location_dropdown'=>'on','event_use_editor'=>'off','event_specials'=>'on', 'event_access'=>'on' ) ); 
     414    add_option('mc_input_options',array( 'event_short'=>'off','event_desc'=>'on','event_category'=>'on','event_image'=>'on','event_link'=>'on','event_recurs'=>'on','event_open'=>'off','event_location'=>'on','event_location_dropdown'=>'on','event_specials'=>'on', 'event_access'=>'on' ) ); 
    415415    add_option('mc_input_options_administrators','false'); 
    416416    add_site_option('mc_multisite', '0' ); 
     
    445445    )); 
    446446    add_option('mc_skip_holidays','false'); 
    447     add_option('mc_css_file','refresh.css'); 
     447    add_option('mc_css_file','twentyfourteen.css'); 
    448448    add_option('mc_time_format',get_option('time_format')); 
    449449    add_option( 'mc_widget_defaults',$defaults); 
  • my-calendar/trunk/my-calendar-locations.php

    r868934 r870330  
    198198 
    199199function mc_location_controller( $fieldname, $selected, $context='location' ) { 
    200     $field = ( $context == 'location' ) ? 'location_'.$fieldname : 'event_'.$fieldname ; 
     200    $field = ( $context == 'location' ) ? 'location_'.$fieldname : 'e_'.$fieldname ; 
    201201    $selected = trim($selected); 
    202202    $options = get_option('mc_location_controls'); 
     
    280280        <h4><?php echo ucfirst( str_replace( 'event_','',$field ) ); ?></h4> 
    281281        <div> 
    282         <label for="loc_values"><?php printf( __('Location Controls for %s','my-calendar'), ucfirst( str_replace( 'event_','',$field ) ) ); ?> (<?php _e('Value, Label; one per line','my-calendar'); ?>)</label><br /> 
     282        <label for="loc_values_<?php echo $field; ?>"><?php printf( __('Location Controls for %s','my-calendar'), ucfirst( str_replace( 'event_','',$field ) ) ); ?> (<?php _e('Value, Label; one per line','my-calendar'); ?>)</label><br /> 
    283283        <?php  
    284284            $locations = ''; 
     
    289289            } 
    290290    ?> 
    291         <textarea name="mc_location_controls[<?php echo $field; ?>][]" id="loc_values" cols="80" rows="6"><?php echo trim($locations); ?></textarea> 
     291        <textarea name="mc_location_controls[<?php echo $field; ?>][]" id="loc_values_<?php echo $field; ?>" cols="80" rows="6"><?php echo trim($locations); ?></textarea> 
    292292        </div> 
    293293    <?php } ?> 
     
    305305    } 
    306306    $return .= ' 
    307     <p> 
     307    <p class="checkbox"> 
    308308    <label for="e_label">'.__('Name of Location (e.g. <em>Joe\'s Bar and Grill</em>)','my-calendar').'</label>'; 
    309309    $cur_label = ( !empty( $data ) ) ? ( stripslashes( $data->{$context.'_label'} ) ):'';    
     
    317317    $return .= ' 
    318318    </p> 
     319    <div class="locations-container"> 
     320    <div class="location-primary"> 
     321    <fieldset> 
     322    <legend>'.__( 'Location Address','my-calendar' ).'</legend> 
    319323    <p> 
    320324    <label for="e_street">'.__('Street Address','my-calendar').'</label> <input type="text" id="e_street" name="'.$context.'_street" size="40" value="'.$street_address.'" /> 
     
    365369        $return .= mc_location_controller( 'country', $cur_country, $context ); 
    366370    } else { 
    367         $return .= '<input type="text" id="e_city" name="'.$context.'_country" size="10" value="'.esc_attr( $cur_country ).'" />'; 
     371        $return .= '<input type="text" id="e_country" name="'.$context.'_country" size="10" value="'.esc_attr( $cur_country ).'" />'; 
    368372    } 
    369373    $zoom = ( $has_data ) ? $data->{$context.'_zoom'} : '16' ; 
     
    385389        </select> 
    386390    </p> 
     391    </fieldset> 
     392    <fieldset> 
     393    <legend>'.__('GPS Coordinates (optional)','my-calendar').'</legend> 
     394    <p> 
     395    '.__('If you supply GPS coordinates for your location, they will be used in place of any other address information to provide your map link.','my-calendar').' 
     396    </p> 
     397    <p> 
     398    <label for="e_latitude">'.__('Latitude','my-calendar').'</label> <input type="text" id="e_latitude" name="'.$context.'_latitude" size="10" value="'.$event_lat.'" /> <label for="e_longitude">'.__('Longitude','my-calendar').'</label> <input type="text" id="e_longitude" name="'.$context.'_longitude" size="10" value="'.$event_lon.'" /> 
     399    </p>             
     400    </fieldset> 
     401    </div> 
     402    <div class="location-secondary"> 
     403    <fieldset> 
     404    <legend>'.__( 'Location Contact Information', 'my-calendar' ).'</legend> 
    387405    <p> 
    388406    <label for="e_phone">'.__('Phone','my-calendar').'</label> <input type="text" id="e_phone" name="'.$context.'_phone" size="32" value="'.$event_phone.'" /> 
     
    393411    <p> 
    394412    <label for="e_url">'.__('Location URL','my-calendar').'</label> <input type="text" id="e_url" name="'.$context.'_url" size="40" value="'.$event_url.'" /> 
    395     </p>             
    396     <fieldset> 
    397     <legend>'.__('GPS Coordinates (optional)','my-calendar').'</legend> 
    398     <p> 
    399     '.__('If you supply GPS coordinates for your location, they will be used in place of any other address information to provide your map link.','my-calendar').' 
    400     </p> 
    401     <p> 
    402     <label for="e_latitude">'.__('Latitude','my-calendar').'</label> <input type="text" id="e_latitude" name="'.$context.'_latitude" size="10" value="'.$event_lat.'" /> <label for="e_longitude">'.__('Longitude','my-calendar').'</label> <input type="text" id="e_longitude" name="'.$context.'_longitude" size="10" value="'.$event_lon.'" /> 
    403     </p>             
     413    </p> 
    404414    </fieldset> 
    405415    <fieldset> 
     
    429439    $return  .= $access_list; 
    430440    $return .= '</ul> 
    431     </fieldset></div>'; 
     441    </fieldset></div> 
     442    </div> 
     443    </div>'; 
    432444    return $return; 
    433445} 
  • my-calendar/trunk/my-calendar-output.php

    r868877 r870330  
    111111function mc_category_icon( $event,$html='html' ) { 
    112112    $url = plugin_dir_url( __FILE__ ); 
    113     if ( get_option('mc_hide_icons')=='true' ) { 
    114         $image = ""; 
    115     } else { 
    116         if ($event->category_icon != "") { 
     113    $image = '';     
     114    if ( get_option( 'mc_hide_icons' ) != 'true' ) { 
     115        if ( $event->category_icon != '' ) { 
    117116            $path = ( is_custom_icon() ) ? str_replace( 'my-calendar','my-calendar-custom',$url ) : plugins_url( 'images/icons', __FILE__ ).'/'; 
    118117            $hex = ( strpos( $event->category_color,'#' ) !== 0 )?'#':''; 
     
    122121                $image = $path.$event->category_icon; 
    123122            } 
    124         } else { 
    125             $image = ""; 
    126123        } 
    127124    } 
     
    245242            if ( $event->event_author != 0 ) { 
    246243                $e = get_userdata( $event->event_author ); 
    247                 $author = '<span class="event-author">'.__('Posted by', 'my-calendar').' <span class="author-name">'.$e->display_name."</span></span><br />\n"; 
     244                $author = '<p class="event-author">'.__('Posted by', 'my-calendar').' <span class="author-name">'.$e->display_name."</span></p>\n"; 
    248245            } 
    249246        } 
     
    292289        } 
    293290         
     291        // JCD TODO - this is really wonky. What was I thinking? 
    294292        // if the event is a member of a group of events, but not the first, note that. 
    295         if ($event->event_group == 1 ) { 
     293        if ( $event->event_group == 1 ) { 
    296294            $info = array(); 
    297295            $info[] = $event->event_id; 
     
    301299        if ( is_array( get_option( 'mc_event_groups' ) ) ) { 
    302300            if ( in_array ( $event->event_id , get_option( 'mc_event_groups') ) ) { 
    303                 if ( $process_date != $event->event_original_begin ) { 
     301                if ( $process_date != $event->event_begin ) { 
    304302                    $status = __( "This event is in a series. Register for the first event in this series to attend.",'my-calendar' ); 
    305303                } 
     
    327325            . $list_title 
    328326            . $image 
     327            ."<div class='location'>" 
     328            . $map 
     329            . $address 
     330            . "</div>"           
    329331            . $description  
    330332            . $short  
    331333            . $link  
    332334            . $status 
    333             . $map 
    334             . $address 
    335335            . $author 
     336            . "<div class='sharing'>" 
    336337            . $vcal 
    337338            . $gcal 
    338339            . $more 
     340            . "</div>" 
    339341            . $return; 
    340342    } else { 
     
    443445header('Content-Type: '.get_bloginfo('html_type').'; charset='.get_bloginfo('charset')); 
    444446echo '<!DOCTYPE html> 
    445 <!--[if IE 6]> 
    446 <html id="ie6" dir="'.get_bloginfo('text_direction').'" lang="'.get_bloginfo('language').'"> 
    447 <![endif]--> 
    448447<!--[if IE 7]> 
    449448<html id="ie7" dir="'.get_bloginfo('text_direction').'" lang="'.get_bloginfo('language').'"> 
     
    464463    $stylesheet = mc_get_file( 'css/mc-print.css', 'url' ); 
    465464} else { 
    466     $stylesheet = $url."mc-print.css"; 
     465    $stylesheet = $url."css/mc-print.css"; 
    467466} 
    468467echo " 
     
    920919        if ( $below != '' ) { $mc_bottomorder = explode( ',', $below ); } 
    921920        foreach ( $mc_bottomorder as $value ) { 
    922             if ( $value != 'none' ) { 
     921            if ( $value != 'none' && $value !='stop' ) { 
    923922                $value = trim($value); 
    924923                $mc_bottomnav .= ${$value}; 
     
    979978                        $my_calendar_body .= "\n<table class=\"my-calendar-table\">\n"; 
    980979                            $values = array( 'date'=>date('Y-m-d',$current_date) ); 
    981                         $week_caption = jd_draw_template( $values, stripslashes(get_option('mc_week_caption')) ); 
     980                        $week_template = ( get_option( 'mc_week_caption' ) != '' ) ? get_option( 'mc_week_caption' ) : 'Week of {date format="M jS"}'; 
     981                        $week_caption = jd_draw_template( $values, stripslashes( $week_template ) ); 
    982982                        $caption_heading = ($time != 'week')?$current_date_header.$caption_text:$week_caption.$caption_text; 
    983983                        $my_calendar_body .= "<caption class=\"my-calendar-$time\">".$caption_heading."</caption>\n"; 
     
    11761176    $ical = "\n <li class='ics'><a href='".$ics."'>".__('Download as <abbr title="iCal Events Export">iCal</abbr>','my-calendar')."</a></li>"; 
    11771177    $output = "\n 
    1178 <ul id='mc-export'>$rss 
    1179 $ical 
    1180 </ul>\n";    
     1178<div class='mc-export'> 
     1179    <ul>$rss$ical</ul> 
     1180</div>\n";   
    11811181    return $output; 
    11821182} 
     
    15661566            <li><a href='$url'>".__('Show all','my-calendar')."</a></li>\n"; 
    15671567        } else { 
    1568             $ltype = (!isset($_GET['ltype']))?$datatype:$_GET['ltype']; 
     1568            $ltype = ( !isset( $_GET['ltype'] ) ) ? $datatype : $_GET['ltype']; 
    15691569            $output .= "<div id='mc_locations'>"; 
    15701570            $output .= ( $group == 'single' ) ? " 
     
    15941594                    $vt = urlencode(trim($value)); 
    15951595                    $value = stripcslashes($value); 
     1596                    if ( $value == '' ) continue; 
    15961597                    if ( empty($_GET['loc']) ) { 
    15971598                        $loc = ''; 
     
    16131614                $vk = urlencode(trim($key)); 
    16141615                $location = trim($location); 
     1616                if ( $location == '' ) continue; 
    16151617                if ($show == 'list') { 
    16161618                    $selected = ($vk == $_GET['loc'])?" class='selected'":''; 
  • my-calendar/trunk/my-calendar-settings.php

    r868885 r870330  
    208208    if ( isset( $_POST['mc_show_months'] ) ) { 
    209209        $mc_open_day_uri = ( !empty( $_POST['mc_open_day_uri'] ) ) ? $_POST['mc_open_day_uri'] : ''; 
    210         update_option('mc_uri',$_POST['mc_uri'] ); 
    211         update_option('mc_use_permalinks', ( !empty( $_POST['mc_use_permalinks'] ) ) ? true : false ); 
    212         update_option('mc_open_uri',( !empty($_POST['mc_open_uri']) && $_POST['mc_open_uri']=='on' && get_option('mc_uri') != '')?'true':'false'); 
     210        update_option( 'mc_uri',$_POST['mc_uri'] ); 
     211        update_option( 'mc_use_permalinks', ( !empty( $_POST['mc_use_permalinks'] ) ) ? true : false ); 
     212        update_option( 'mc_open_uri',( !empty($_POST['mc_open_uri']) && $_POST['mc_open_uri']=='on' && get_option('mc_uri') != '')?'true':'false' ); 
    213213        update_option('mc_mini_uri',$_POST['mc_mini_uri'] ); 
    214214        update_option('mc_open_day_uri', $mc_open_day_uri ); 
     
    278278            'event_location'=>( !empty($_POST['mci_event_location']) && $_POST['mci_event_location'])?'on':'', 
    279279            'event_location_dropdown'=>( !empty($_POST['mci_event_location_dropdown']) && $_POST['mci_event_location_dropdown'])?'on':'', 
    280             'event_use_editor'=>( !empty($_POST['mci_event_use_editor']) && $_POST['mci_event_use_editor'])?'on':'', 
    281280            'event_specials'=>( !empty($_POST['mci_event_specials']) && $_POST['mci_event_specials'])?'on':'', 
    282281            'event_access'=>( !empty($_POST['mci_event_access']) && $_POST['mci_event_access'])?'on':'' 
     
    494493    <li><?php mc_settings_field( 'mc_use_permalinks', __( 'Use Pretty Permalinks for Events','my-calendar' ), '', '', array(), 'checkbox-single' ); ?></li>  
    495494    <?php $guess = mc_guess_calendar(); ?> 
    496     <li><?php mc_settings_field( 'mc_uri', __( 'Where is your main calendar page?','my-calendar' ), '', "<br /><small>".__( 'Can be any Page or Post which includes the <code>[my_calendar]</code> shortcode.','my-calendar' )."$guess</small>", array( 'size'=>'60' ), 'url' ); ?></li> 
     495    <li><?php mc_settings_field( 'mc_uri', __( 'Where is your main calendar page?','my-calendar' ), '', "<br /><small>".__( 'Can be any Page or Post which includes the <code>[my_calendar]</code> shortcode.','my-calendar' )." $guess</small>", array( 'size'=>'60' ), 'url' ); ?></li> 
    497496    <li><?php mc_settings_field( 'mc_mini_uri', __( 'Target <abbr title="Uniform resource locator">URL</abbr> for mini calendar date links:','my-calendar' ), '', "<br /><small>".__( 'Can be any Page or Post which includes the <code>[my_calendar]</code> shortcode.','my-calendar' )."</small>", array( 'size'=>'60' ), 'url' ); ?></li> 
    498497    <li><?php mc_settings_field( 'mc_open_uri', __( 'Open calendar links to event details URL','my-calendar' ), '', "<br /><small>".__( 'Replaces pop-up in grid view.','my-calendar' )."</small>", array(), 'checkbox-single' ); ?></li> 
     
    666665    <?php  
    667666        $input_options = get_option('mc_input_options'); 
    668         $input_labels = array('event_location_dropdown'=>__( 'Event Location Dropdown Menu','my-calendar' ),'event_short'=>__( 'Event Short Description field','my-calendar' ),'event_desc'=>__( 'Event Description Field','my-calendar' ),'event_category'=>__( 'Event Category field','my-calendar' ),'event_image'=>__( 'Event Image field','my-calendar' ),'event_link'=>__( 'Event Link field','my-calendar' ),'event_recurs'=>__( 'Event Recurrence Options','my-calendar' ),'event_open'=>__( 'Event Registration options','my-calendar' ),'event_location'=>__( 'Event Location fields','my-calendar' ),'event_use_editor'=>__( 'Use HTML Editor in Event Description Field','my-calendar' ),'event_specials'=>__( 'Set Special Scheduling options','my-calendar' ), 'event_access'=>__("Event Accessibility", 'my-calendar' ) ); 
     667        $input_labels = array('event_location_dropdown'=>__( 'Event Location Dropdown Menu','my-calendar' ),'event_short'=>__( 'Event Short Description field','my-calendar' ),'event_desc'=>__( 'Event Description Field','my-calendar' ),'event_category'=>__( 'Event Category field','my-calendar' ),'event_image'=>__( 'Event Image field','my-calendar' ),'event_link'=>__( 'Event Link field','my-calendar' ),'event_recurs'=>__( 'Event Recurrence Options','my-calendar' ),'event_open'=>__( 'Event Registration options','my-calendar' ),'event_location'=>__( 'Event Location fields','my-calendar' ), 'event_specials'=>__( 'Set Special Scheduling options','my-calendar' ), 'event_access'=>__("Event Accessibility", 'my-calendar' ) ); 
    669668        $output = ''; 
    670669        // if input options isn't an array, we'll assume that this plugin wasn't upgraded properly, and reset them to the default. 
    671670        if ( !is_array($input_options) ) { 
    672             update_option( 'mc_input_options',array('event_short'=>'on','event_desc'=>'on','event_category'=>'on','event_image'=>'on','event_link'=>'on','event_recurs'=>'on','event_open'=>'on','event_location'=>'on','event_location_dropdown'=>'on','event_use_editor'=>'on','event_specials'=>'on', 'event_access'=>'on' ) );   
     671            update_option( 'mc_input_options',array('event_short'=>'on','event_desc'=>'on','event_category'=>'on','event_image'=>'on','event_link'=>'on','event_recurs'=>'on','event_open'=>'on','event_location'=>'on','event_location_dropdown'=>'on','event_specials'=>'on', 'event_access'=>'on' ) );    
    673672        } 
    674673        foreach ($input_options as $key=>$value) { 
  • my-calendar/trunk/my-calendar-templates.php

    r868877 r870330  
    110110    $phone = stripslashes( ( $source=='event' ) ? $event->event_phone : $event->location_phone ); 
    111111    if ( !$url && !$label && !$street && !$street2 && !$city && !$state && !$zip && !$country && !$phone ) return; 
    112     $sitelink_html = " 
    113     <div class='url link'> 
    114         <a href='$url' class='location-link external'>".sprintf(__('Visit web site<span>: %s</span>','my-calendar'),$label)."</a> 
    115     </div>"; 
     112    $sitelink_html = ( $url != '' ) ? "<a href='$url' class='location-link external'>$label</a>" : $label; 
    116113    $hcard = "<div class=\"address vcard\">"; 
    117114    if ( $address == 'true' ) { 
    118115        $hcard .= "<div class=\"adr\">"; 
    119         if ( $label != "" ) { $hcard .= "<strong class=\"org\">".$label."</strong><br />";  } 
     116        if ( $label != "" ) { $hcard .= "<strong class=\"org\">".$sitelink_html."</strong><br />";  } 
    120117        $hcard .= ( $street.$street2.$city.$state.$zip.$country.$phone == '' ) ? '' : "<div class='sub-address'>"; 
    121118        if ( $street != "" ) { $hcard .= "<div class=\"street-address\">".$street."</div>"; } 
     
    130127    } 
    131128    if ( $map == 'true' ) { 
    132         $the_map = "<a href='$the_map' class='external'>$label</a>"; 
     129        $the_map = "<a href='$the_map' class='external'>".__('Map','my-calendar')."<span class='screen-reader-text'> $label</a></a>"; 
    133130        $hcard .= ( $the_map!='' ) ? "<div class='url map'>$the_map</div>" : '' ; 
    134     } 
    135     if ( $context != 'map' ) { 
    136         $hcard .= ( $url!='' ) ? $sitelink_html : ''; 
    137131    } 
    138132    $hcard .= "</div>";  
     
    149143    $map = mc_maplink( $event ); 
    150144    $map_url = mc_maplink( $event, 'url' ); 
    151     $sitelink_html = "<div class='url link'><a href='$event->event_url' class='location-link external'>".sprintf(__('Visit web site<span>: %s</span>','my-calendar'),$event->event_label)."</a></div>"; 
     145    $sitelink_html = "<div class='url link'><a href='$event->event_url' class='location-link external'>".sprintf(__('Visit web site<span class="screen-reader-text">: %s</span>','my-calendar'),$event->event_label)."</a></div>"; 
    152146    $e['sitelink_html'] = $sitelink_html; 
    153147    $e['sitelink'] = $event->event_url; 
     
    252246        $url = ( get_option( 'mc_uri' ) != '' && !is_numeric( get_option( 'mc_uri' ) ) )?$e_link:$event->event_url; 
    253247    $e['gcal'] = mc_google_cal( $dtstart, $dtend, $url, stripcslashes( $event->event_title ), mc_maplink( $event, 'gcal' ), $strip_desc ); 
    254     $e['gcal_link'] = "<a href='".mc_google_cal( $dtstart, $dtend, $url, stripcslashes( $event->event_title ) ,  mc_maplink( $event, 'gcal' ), $strip_desc )."'>".sprintf( __('<span class="screenreader">Send %1$s to </span>Google Calendar','my-calendar'), stripcslashes( $event->event_title ) )."</a>"; 
     248    $e['gcal_link'] = "<a href='".mc_google_cal( $dtstart, $dtend, $url, stripcslashes( $event->event_title ) ,  mc_maplink( $event, 'gcal' ), $strip_desc )."'>".sprintf( __('<span class="screen-reader-text">Send %1$s to </span>Google Calendar','my-calendar'), stripcslashes( $event->event_title ) )."</a>"; 
    255249    $e['location_access'] = mc_expand( unserialize( mc_location_data( 'location_access', $event->event_location ) ) ); 
    256250    $e['location_source'] = $event->event_location;  
     
    334328    if ( !$category_icon ) { $category_icon = "//maps.google.com/mapfiles/marker_green.png"; } 
    335329    $address = addslashes( mc_map_string( $event, $source ) ); 
     330    if ( strlen($address) < 10 ) return;  
    336331    $hcard = mc_hcard( $event, true, false, 'event','map' ); 
    337332    $hcard = wp_kses( str_replace( array('</div>','<br />','<br><br>' ),'<br>', $hcard ), array( 'br'=>array() ) );  
     
    434429            $begin = $date->occur_begin; 
    435430            $end = $date->occur_end; 
    436                 $day_begin = date( 'Y-m-d', $date->occur_begin ); 
    437                 $day_end = date( 'Y-m-d', $date->occur_end ); 
     431            $day_begin = date( 'Y-m-d', strtotime( $begin ) ); 
     432            $day_end = date( 'Y-m-d', strtotime( $end ) ); 
    438433            $bformat = "<span class='multidate-date'>".date_i18n( get_option('mc_date_format'),strtotime( $begin ) ).'</span> <span class="multidate-time">'.date_i18n( get_option('mc_time_format'), strtotime( $begin ) )."</span>"; 
    439434            $endtimeformat = ($date->occur_end == '00:00:00')?'':' '.get_option('mc_time_format'); 
  • my-calendar/trunk/my-calendar.php

    r868877 r870330  
    115115add_filter( 'wp_title','mc_event_filter',10,3 ); 
    116116 
    117 function mc_event_filter( $title, $sep, $seplocation ) { 
     117function mc_event_filter( $title, $sep=' | ', $seplocation='right' ) { 
    118118    if ( isset($_GET['mc_id']) ) { 
    119119        $id = (int) $_GET['mc_id']; 
     
    127127        return $title; 
    128128    } 
     129} 
     130 
     131// back compat 
     132function jd_show_support_box() { 
     133    mc_show_sidebar(); 
    129134} 
    130135 
     
    381386        $settings_options = get_option('mc_input_options'); 
    382387        if ( !is_array( $input_options ) ) { $input_options = $settings_options; } 
    383         $input_labels = array('event_location_dropdown'=>__('Event Location Dropdown Menu','my-calendar'),'event_short'=>__('Event Short Description field','my-calendar'),'event_desc'=>__('Event Description Field','my-calendar'),'event_category'=>__('Event Category field','my-calendar'),'event_image'=>__('Event Image field','my-calendar'),'event_link'=>__('Event Link field','my-calendar'),'event_recurs'=>__('Event Recurrence Options','my-calendar'),'event_open'=>__('Event Registration options','my-calendar'),'event_location'=>__('Event Location fields','my-calendar'),'event_use_editor'=>__('Use HTML Editor in Event Description Field','my-calendar'),'event_specials'=>__('Set Special Scheduling options','my-calendar'), 'event_access'=>__('Event Accessibility') ); 
     388        $input_labels = array('event_location_dropdown'=>__('Event Location Dropdown Menu','my-calendar'),'event_short'=>__('Event Short Description field','my-calendar'),'event_desc'=>__('Event Description Field','my-calendar'),'event_category'=>__('Event Category field','my-calendar'),'event_image'=>__('Event Image field','my-calendar'),'event_link'=>__('Event Link field','my-calendar'),'event_recurs'=>__('Event Recurrence Options','my-calendar'),'event_open'=>__('Event Registration options','my-calendar'),'event_location'=>__('Event Location fields','my-calendar'),'event_specials'=>__('Set Special Scheduling options','my-calendar'), 'event_access'=>__('Event Accessibility') ); 
    384389        $output = ''; 
    385390        foreach ($input_options as $key=>$value) { 
  • my-calendar/trunk/styles/dark.css

    r857615 r870330  
    174174float: right; 
    175175} 
    176 .screenreader { position: absolute; left: -999em; } 
     176.screen-reader-text { position: absolute; left: -999em; } 
  • my-calendar/trunk/styles/inherit.css

    r857615 r870330  
    244244float: right; 
    245245} 
    246 .screenreader { position: absolute; left: -999em; } 
     246.screen-reader-text { position: absolute; left: -999em; } 
  • my-calendar/trunk/styles/light.css

    r857615 r870330  
    269269float: right; 
    270270} 
    271 .screenreader { position: absolute; left: -999em; } 
     271.screen-reader-text { position: absolute; left: -999em; } 
  • my-calendar/trunk/styles/my-calendar.css

    r857615 r870330  
    273273width: 120px; 
    274274} 
    275 .screenreader { position: absolute; left: -999em; } 
     275.screen-reader-text { position: absolute; left: -999em; } 
Note: See TracChangeset for help on using the changeset viewer.