WordPress.org

Plugin Directory

Changeset 866550


Ignore:
Timestamp:
02/28/14 00:55:52 (17 months ago)
Author:
joedolson
Message:

Updates to dev version.

Location:
my-calendar/trunk
Files:
1 deleted
13 edited

Legend:

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

    r865684 r866550  
    11#my-calendar legend {font-weight: 700;font-size: 1em} 
    2 .mcbuy {font-size: 1.4em; line-height: 1.5} 
    3 .mcsbuy { font-size: 1.3em; line-height: 1.5} 
     2.mcbuy, .mcsbuy {font-size: 1.1em; line-height: 1.5} 
    43.mc-button { text-align: center; font-size: 1.4em; padding: 10px 0 0} 
    54.mc-button a { padding: 3px 8px; border: 1px solid; border-radius: 5px; background: #fff} 
    6 .mcsbuy img { margin-right: 10px; border: 1px solid #ccc} 
    75.mcd { text-align: center; font-size: 1.2em} 
    8 .templating .resources {width: 250px} 
    9 .resources form {margin: 0!important}    
    10 #category_icon option {padding: 5px 0 5px 24px} 
     6#cat_icon option {padding: 5px 0 5px 24px} 
    117#my-calendar-admin-table .delete {color: #c00} 
    128.import {background: #ffa;padding: 5px 10px;border: 1px solid #aaa;border-radius: 5px;margin: 15px 0} 
     
    1612.active-link {font-weight:700;text-decoration: underline} 
    1713ul.links li {float: left;margin: 0 5px 10px;font-size: .9em} 
    18 #my_calendar_old_styles {float: right;margin-left: 660px} 
    1914#toggle {height: 2em} 
    2015#toggle li {float: left;margin-right: 5px} 
    2116.jd-my-calendar .spam {background: #ffa} 
    2217.jd-my-calendar .pending { background: #eee} 
    23 .jd-my-calendar .pending td {color: #777} 
    24 .offscreen , .mc_filter span {position: absolute;left: -999em} 
     18.jd-my-calendar .pending td {color: #666} 
    2519.jd-my-calendar fieldset fieldset {margin: 0 0 20px 0;padding-top: 2px} 
    2620#mceditor {border: 1px solid #ddd;margin: 0 0 5px} 
     
    5044#mc-shortcodes li code, #mc-shortcodes .example code { font-size: 1.4em; line-height: 1.5; display: inline-block} 
    5145.jd-my-calendar .tablenav { float: right } 
    52 input[id=event_label], input[id=event_title], input[id=location_label], input[id=mc_twitter] { font-size: 1.4em; padding: 5px; width: 100%} 
     46input[id=e_label], input[id=e_title], input[id=location_label], input[id=mc_twitter] { font-size: 1.4em; padding: 5px; width: 100%} 
    5347label[for=mc_twitter] { background: url(images/twitter.png) no-repeat; padding-left: 20px; } 
    5448strong.label { font-weight: 400; } 
     
    6054.mc-categories th:nth-of-type(5), .mc-categories th:nth-of-type(6), .mc-categories th:nth-of-type(7) { width: 50px; } 
    6155 
    62 .jcd-wide { width: 75%!important; } 
    63 .jcd-narrow { width: 20%!important; } 
     56.jcd-wide { width: 75%; } 
     57.jcd-narrow { width: 20%; } 
    6458 
    6559.mc-tabs .tabs { margin: 0!important; padding: 0 4px; position: relative; top: 1px; } 
     
    7569#mc-sortable .mc-calendar { background: #ffc; border: 1px solid #cc8; } 
    7670#mc-sortable li.mc-stop {  margin: 1px -1em; border-radius: none; border-left: none; border-right: none; padding: 2px 2em; } 
     71#mc-sortable div.dashicons { vertical-align: middle; height: 1em; } 
     72#mc-sortable code { display: inline-block; width: 5em; text-align: center; } 
    7773 
    7874.jd-my-calendar .checkboxes { margin: 0; } 
     
    8076.jd-my-calendar .checkboxes li:hover { background: #fff; } 
    8177 
    82 #mc-sortable div.dashicons { vertical-align: middle; height: 1em; } 
    83 #mc-sortable code { display: inline-block; width: 5em; text-align: center; } 
     78.mc-actions { float: left; vertical-align: middle; height: 30px; margin: 6px 0 4px; } 
    8479 
    8580.jd-my-calendar fieldset legend { font-weight: 700; padding: 0; font-size: 1.1em; } 
    86 .generator fieldset { 
    87     border: 1px solid #ccc; 
    88     margin: 10px 0; 
    89     padding: 10px; 
    90 } 
    91 .generator label { 
    92     display: block; 
    93     float: left; 
    94     width: 30%; 
    95     margin-right: 10px; 
    96 } 
    97 .generator .help, .generator  .clear { 
    98     clear: left; 
    99 } 
    100 .generator input { 
    101     line-height: normal; 
    102 } 
    103 .generator input[type=text], .generator select { 
    104     width: 60%; 
    105 } 
    106 .req { 
    107     color: red; 
    108 } 
     81.generator fieldset { border: 1px solid #ccc; margin: 10px 0; padding: 10px; } 
     82.generator label { display: block; float: left; width: 30%; margin-right: 10px; } 
     83.generator .help, .generator  .clear { clear: left; } 
     84.generator input { line-height: normal; } 
     85.generator input[type=text], .generator select { width: 60%; } 
     86.req { color: red; } 
    10987 
    11088.jd-my-calendar textarea:disabled { color: #333; border: none; box-shadow: none; } 
     89 
     90@media (max-width: 782px) { 
     91    .jd-my-calendar .tablenav { float: none; } 
     92    .jcd-narrow { width: 100%; } 
     93    .jcd-wide { width: 100%; } 
     94} 
  • my-calendar/trunk/my-calendar-api.php

    r865684 r866550  
    88            $from = ( isset( $_GET['from'] ) ) ? $_GET['from'] : date( 'Y-m-d', current_time( 'timestamp' ) ); 
    99            $to = ( isset( $_GET['to'] ) ) ? $_GET['to'] : date( 'Y-m-d', strtotime( current_time( 'timestamp' ).apply_filters('mc_api_auto_date',' + 7 days') ) ); 
     10            // sanitization is handled elsewhere. 
    1011            $category = ( isset( $_GET['mcat'] ) ) ? $_GET['mcat'] : '' ; 
    1112            $ltype = ( isset( $_GET['ltype'] ) ) ? $_GET['ltype'] : '' ; 
     
    1314            $author = ( isset( $_GET['author'] ) ) ? $_GET['author'] : '' ; 
    1415            $host = ( isset( $_GET['host'] ) ) ? $_GET['host'] : '' ; 
    15              
    1616            $data = my_calendar_events( $from, $to, $category, $ltype, $lvalue, 'api', $author, $host ); 
    1717            $output = mc_format_api( $data, $format ); 
     
    2424        }            
    2525    } 
    26  
    2726} 
    2827 
  • my-calendar/trunk/my-calendar-core.php

    r865684 r866550  
    286286    if ( isset( $_GET['page'] ) && ( $_GET['page']=='my-calendar' || $_GET['page'] == 'my-calendar-locations' ) ) { 
    287287    ?> 
    288     <script type="text/javascript"> 
    289     //<![CDATA[ 
    290     jQuery(document).ready(function($) { 
    291         $('#event_begin,' + '#event_end').calendricalDateRange(); 
    292         $('#mc-accordion').accordion({ collapsible:true, active:false }); 
    293         <?php if ( !isset($_GET['mode']) ) { ?> 
    294         $('#event_time').timeAutocomplete({ 
    295             increment: 15, 
    296             blur_empty_populate: false, 
    297             formatter: '<?php echo apply_filters( 'mc_time_format', 'ampm' ); ?>', 
    298             value: '' 
    299         }); 
    300  
    301         $('#event_endtime').timeAutocomplete({ 
    302             increment: 15, 
    303             from_selector: '#event_time', 
    304             blur_empty_populate: false, 
    305             formatter: '<?php echo apply_filters( 'mc_time_format', 'ampm' ); ?>', 
    306             value: '' 
    307         }); 
    308         <?php } ?> 
    309         <?php if ( function_exists( 'jd_doTwitterAPIPost' ) ) { ?> 
    310         $('#mc_twitter').charCount( { allowed: 140, counterText: '<?php _e('Characters left: ','my-calendar') ?>' } ); 
    311         <?php } ?> 
     288<script type="text/javascript"> 
     289//<![CDATA[ 
     290jQuery(document).ready(function($) { 
     291    $('#e_begin,' + '#e_end').calendricalDateRange(); 
     292    $('#mc-accordion').accordion({ collapsible:true, active:false }); 
     293<?php if ( !isset($_GET['mode']) ) { ?> 
     294    $('#e_time').timeAutocomplete({ 
     295        increment: 15, 
     296        blur_empty_populate: false, 
     297        formatter: '<?php echo apply_filters( 'mc_time_format', 'ampm' ); ?>', 
     298        value: '' 
    312299    }); 
    313     //]]> 
    314     </script> 
    315     <?php 
     300    $('#e_endtime').timeAutocomplete({ 
     301        increment: 15, 
     302        from_selector: '#e_time', 
     303        blur_empty_populate: false, 
     304        formatter: '<?php echo apply_filters( 'mc_time_format', 'ampm' ); ?>', 
     305        value: '' 
     306    });<?php  
     307    }  
     308    if ( function_exists( 'jd_doTwitterAPIPost' ) ) { ?> 
     309    $('#mc_twitter').charCount( { allowed: 140, counterText: '<?php _e('Characters left: ','my-calendar') ?>' } ); 
     310    <?php } ?> 
     311}); 
     312//]]> 
     313</script><?php 
    316314    } 
    317315    if ( isset($_GET['page']) && $_GET['page']=='my-calendar-help') { 
     
    605603                $loc_type = ( get_option( 'mc_location_type' ) == '' ) ? 'event_state' : get_option( 'mc_location_type' ); 
    606604                $locations[$loc_type] = $user_data['my_calendar_location_default']['values']; 
     605                add_option( 'mc_use_permalinks', false ); 
    607606                add_option( 'mc_location_controls', $locations ); 
    608607                add_option( 'mc_location_access', array( 
     
    17921791function mc_get_details_link( $event ) { 
    17931792    // if available, and not querying remotely, use permalink. 
    1794     $permalinks = apply_filters( 'mc_use_permalinks', false ); 
     1793    $permalinks = apply_filters( 'mc_use_permalinks', get_option( 'mc_use_permalinks' ) ); 
    17951794    $details_link = $event->event_link; 
    17961795    if ( $event->event_post != 0 && get_option( 'mc_remote' ) != 'true' && $permalinks ) { 
  • my-calendar/trunk/my-calendar-event-manager.php

    r865684 r866550  
    316316        </div> 
    317317    </div> 
    318     <?php jd_show_support_box(); ?> 
     318     
     319    <?php /* Todo  
     320    if ( isset( $_POST['mc-import-csv'] ) ) { 
     321         
     322    } 
     323    $add = array( 'Import Events'=>'<form action="'.admin_url('admin.php?page=my-calendar-manage').'" method="POST"><div><label for="mc-import-csv">'.__('Upload CSV File','my-calendar').'<input type="file" name="mc-import-csv" id="mc-import-csv" /><input type="submit" value="'.__('Import Events','my-calendar').'" /></div></form>'); */ 
     324    jd_show_support_box(); ?> 
    319325</div> 
    320326<?php 
     
    645651    } 
    646652    // if this doesn't exist in array, leave it on   
    647     if ( !isset( $input[$field] ) ) {  
     653    if ( !isset( $input[$field] ) || !isset( $show[$field] ) ) {  
    648654        return true;  
    649655    } 
     
    710716            $delete = ''; 
    711717        } 
    712         $post_id = $data->event_post; 
     718        $post_id = ( $has_data ) ? $data->event_post : false; 
    713719        if ( $has_data && !$data->event_post ) { 
    714720            $array_data = (array) $data; 
     
    735741        <legend><?php _e( 'Event Details','my-calendar' ); ?></legend> 
    736742        <p> 
    737         <label for="event_title"><?php _e('Event Title','my-calendar'); ?> <span><?php _e('(required)','my-calendar'); ?></span></label><br /><input type="text" id="event_title" name="event_title" class="input" size="50" maxlength="255" value="<?php if ( $has_data ) echo apply_filters( 'mc_manage_event_title',stripslashes( esc_attr( $data->event_title ) ), $data ); ?>" /><?php 
     743        <label for="e_title"><?php _e('Event Title','my-calendar'); ?> <span><?php _e('(required)','my-calendar'); ?></span></label><br /><input type="text" id="e_title" name="event_title" size="50" maxlength="255" value="<?php if ( $has_data ) echo apply_filters( 'mc_manage_event_title',stripslashes( esc_attr( $data->event_title ) ), $data ); ?>" /><?php 
    738744        if ( $mode == 'edit') { ?> 
    739745            <input type='hidden' name='prev_event_status' value='<?php echo $data->event_approved; ?>' /><?php 
     
    747753                        $checked = "checked=\"checked\"";  
    748754                    } ?> 
    749                     <input type="checkbox" value="1" id="event_approved" name="event_approved"<?php echo $checked; ?> /> <label for="event_approved"><?php _e('Approve','my-calendar'); ?></label><?php 
     755                    <input type="checkbox" value="1" id="e_approved" name="event_approved"<?php echo $checked; ?> /> <label for="e_approved"><?php _e('Approve','my-calendar'); ?></label><?php 
    750756                } else { // case: editing, approval enabled, user cannot approve ?> 
    751757                    <input type="hidden" value="0" name="event_approved" /><?php _e( 'An administrator must approve your new event.','my-calendar' );  
     
    764770        <div class="error"> 
    765771        <p> 
    766         <input type="checkbox" value="0" id="event_flagged" name="event_flagged"<?php if ( $has_data && $data->event_flagged == '0') { echo " checked=\"checked\""; } else if ( $has_data && $data->event_flagged == '1') { echo ""; } ?> /> <label for="event_flagged"><?php _e('This event is not spam','my-calendar'); ?></label> 
     772        <input type="checkbox" value="0" id="e_flagged" name="event_flagged"<?php if ( $has_data && $data->event_flagged == '0') { echo " checked=\"checked\""; } else if ( $has_data && $data->event_flagged == '1') { echo ""; } ?> /> <label for="e_flagged"><?php _e('This event is not spam','my-calendar'); ?></label> 
    767773        </p> 
    768774        </div> 
     
    794800        <?php if ( mc_show_edit_block( 'event_short' ) ) { ?> 
    795801        <p> 
    796         <label for="event_short"><?php _e( 'Short Description','my-calendar' ); ?></label><br /><textarea id="event_short" name="event_short" class="input" rows="2" cols="80"><?php if ( $has_data ) echo stripslashes( esc_attr( $data->event_short ) ); ?></textarea> 
     802        <label for="e_short"><?php _e( 'Short Description','my-calendar' ); ?></label><br /><textarea id="e_short" name="event_short" rows="2" cols="80"><?php if ( $has_data ) echo stripslashes( esc_attr( $data->event_short ) ); ?></textarea> 
    797803        </p> 
    798804        <?php } ?> 
     
    800806        <?php 
    801807        if ( mc_show_edit_block( 'event_image' ) ) { ?> 
    802             <input type="hidden" name="event_image_id" value="" class="textfield" id="event_image_id" /> 
    803             <label for="event_image"><?php _e("Add an image:",'my-calendar'); ?></label><br /><input type="text" name="event_image" id="event_image" size="60" value="<?php if ( $has_data ) echo esc_attr( $data->event_image ); ?>" placeholder="http://yourdomain.com/image.jpg" /> <a href="#" class="button textfield-field"><?php _e( "Upload",'my-calendar' ); ?></a> 
     808            <input type="hidden" name="event_image_id" value="" class="textfield" id="e_image_id" /> 
     809            <label for="e_image"><?php _e("Add an image:",'my-calendar'); ?></label><br /><input type="text" name="event_image" id="e_image" size="60" value="<?php if ( $has_data ) echo esc_attr( $data->event_image ); ?>" placeholder="http://yourdomain.com/image.jpg" /> <a href="#" class="button textfield-field"><?php _e( "Upload",'my-calendar' ); ?></a> 
    804810        <?php } else { ?> 
    805811            <input type="hidden" name="event_image" value="<?php if ( $has_data ) echo esc_attr( $data->event_image ); ?>" /> 
     
    812818        </div> 
    813819    <p> 
    814     <label for="event_host"><?php _e('Host','my-calendar'); ?></label> 
    815     <select id="event_host" name="event_host"> 
     820    <label for="e_host"><?php _e('Host','my-calendar'); ?></label> 
     821    <select id="e_host" name="event_host"> 
    816822        <?php  
    817823             // Grab all the categories and list them 
     
    832838        <?php if ( mc_show_edit_block( 'event_category') ) { ?> 
    833839        <p> 
    834         <label for="event_category"><?php _e('Category','my-calendar'); ?></label> 
    835         <select id="event_category" name="event_category"> 
     840        <label for="e_category"><?php _e('Category','my-calendar'); ?></label> 
     841        <select id="e_category" name="event_category"> 
    836842            <?php echo mc_category_select( $data ); ?> 
    837843        </select> 
     
    842848        <?php if ( mc_show_edit_block( 'event_link' ) ) { ?> 
    843849        <p> 
    844         <label for="event_link"><?php _e( 'URL','my-calendar' ); ?></label> <input type="text" id="event_link" name="event_link" class="input" size="40" value="<?php if ( $has_data ) { echo esc_url( $data->event_link ); } ?>" /> <input type="checkbox" value="1" id="event_link_expires" name="event_link_expires"<?php if ( $has_data && $data->event_link_expires == '1' ) { echo " checked=\"checked\""; } else if ( $has_data && $data->event_link_expires == '0' ) { echo ""; } else if ( get_option( 'mc_event_link_expires') == 'true' ) { echo " checked=\"checked\""; } ?> /> <label for="event_link_expires" class=><?php _e('Link will expire after event','my-calendar'); ?></label> 
     850        <label for="e_link"><?php _e( 'URL','my-calendar' ); ?></label> <input type="text" id="e_link" name="event_link" size="40" value="<?php if ( $has_data ) { echo esc_url( $data->event_link ); } ?>" /> <input type="checkbox" value="1" id="e_link_expires" name="event_link_expires"<?php if ( $has_data && $data->event_link_expires == '1' ) { echo " checked=\"checked\""; } else if ( $has_data && $data->event_link_expires == '0' ) { echo ""; } else if ( get_option( 'mc_event_link_expires') == 'true' ) { echo " checked=\"checked\""; } ?> /> <label for="e_link_expires" class=><?php _e('Link will expire after event','my-calendar'); ?></label> 
    845851        </p> 
    846852    <?php } ?> 
     
    855861<h3><?php _e('Date and Time','my-calendar'); ?></h3> 
    856862<div class="inside"> 
    857             <?php if ( is_object($data) ) { // information for rewriting recurring data ?> 
     863            <?php if ( is_object( $data ) ) { // information for rewriting recurring data ?> 
    858864            <input type="hidden" name="prev_event_begin" value="<?php echo $data->event_begin; ?>" /> 
    859865            <input type="hidden" name="prev_event_time" value="<?php echo $data->event_time; ?>" /> 
     
    862868            <?php } ?> 
    863869            <fieldset><legend><?php _e('Event Date and Time','my-calendar'); ?></legend> 
    864             <div id="event_schedule"> 
    865             <div id="event1" class="clonedInput"> 
     870            <div id="e_schedule"> 
     871            <div id="event1" class="clonedInput" aria-live="polite"> 
    866872            <?php 
    867873            if ( $has_data ) { 
     
    878884                $event_begin = date("Y-m-d"); 
    879885                $event_end = $starttime = $endtime = ''; 
    880             }        
     886            }    
    881887            ?> 
    882888            <p> 
    883                 <label for="event_begin" id="eblabel"><?php _e('Date (YYYY-MM-DD)','my-calendar'); ?> <span><?php _e('(required)','my-calendar'); ?></span></label> <input type="text" id="event_begin" name="event_begin[]" class="event_begin calendar_input" size="10" value="<?php echo $event_begin; ?>" /> 
    884                 <label for="event_time"><?php _e('From','my-calendar'); ?></label>  
    885                 <input type="text" id="event_time" name="event_time[]" class="input" size="8" value="<?php echo $starttime; ?>" />   
    886                 <label for="event_endtime"><?php _e('To','my-calendar'); ?></label>  
    887                 <input type="text" id="event_endtime" name="event_endtime[]" class="input" size="8" value="<?php echo $endtime; ?>" /> 
     889                <label for="e_begin" id="eblabel"><?php _e('Date (YYYY-MM-DD)','my-calendar'); ?></label> <input type="text" id="e_begin" name="event_begin[]" class="event_begin calendar_input" size="10" value="<?php echo $event_begin; ?>" /> 
     890                <label for="e_time"><?php _e('From','my-calendar'); ?></label>  
     891                <input type="text" id="e_time" name="event_time[]" size="8" value="<?php echo $starttime; ?>" />     
     892                <label for="e_endtime"><?php _e('To','my-calendar'); ?></label>  
     893                <input type="text" id="e_endtime" name="event_endtime[]" size="8" value="<?php echo $endtime; ?>" /> 
    888894            </p> 
    889895            <ul> 
    890                 <li><input type="checkbox" value="1" id="event_allday" name="event_allday"<?php if ( $has_data && ( $data->event_time == '00:00:00'&& $data->event_endtime == '00:00:00') ) { echo " checked=\"checked\""; } ?> /> <label for="event_allday"><?php _e('All day event','my-calendar'); ?></label> </li> 
    891                 <li><input type="checkbox" value="1" id="event_hide_end" name="event_hide_end"<?php if ( $has_data && $data->event_hide_end == '1') { echo " checked=\"checked\""; } ?> /> <label for="event_hide_end"><?php _e('Hide end time','my-calendar'); ?></label></li> 
     896                <li><input type="checkbox" value="1" id="e_allday" name="event_allday"<?php if ( $has_data && ( $data->event_time == '00:00:00'&& $data->event_endtime == '00:00:00') ) { echo " checked=\"checked\""; } ?> /> <label for="e_allday"><?php _e('All day event','my-calendar'); ?></label> </li> 
     897                <li><input type="checkbox" value="1" id="e_hide_end" name="event_hide_end"<?php if ( $has_data && $data->event_hide_end == '1') { echo " checked=\"checked\""; } ?> /> <label for="e_hide_end"><?php _e('Hide end time','my-calendar'); ?></label></li> 
    892898            </ul> 
    893899            <p> 
    894                 <label for="event_end" id="eelabel"><em><?php _e('End Date (YYYY-MM-DD, optional)','my-calendar'); ?></em></label> <input type="text" name="event_end[]" id="event_end" class="event_end calendar_input" size="10" value="<?php echo $event_end; ?>" />  
     900                <label for="e_end" id="eelabel"><em><?php _e('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="<?php echo $event_end; ?>" />  
    895901            </p> 
    896902            </div> 
    897903            <?php if ( $mode != 'edit') { ?>             
    898904            <p> 
    899                 <input type="checkbox" value="1" id="event_span" name="event_span"<?php if ( $has_data && $data->event_span == '1') { echo " checked=\"checked\""; } else if ( $has_data && $data->event_span == '0') { echo ""; } else if ( get_option( 'mc_event_span') == 'true') { echo " checked=\"checked\""; } ?> /> <label for="event_span"><?php _e('This is a multi-day event.','my-calendar'); ?></label> 
     905                <input type="checkbox" value="1" id="e_span" name="event_span"<?php if ( $has_data && $data->event_span == '1') { echo " checked=\"checked\""; } else if ( $has_data && $data->event_span == '0') { echo ""; } else if ( get_option( 'mc_event_span') == 'true') { echo " checked=\"checked\""; } ?> /> <label for="e_span"><?php _e('This is a multi-day event.','my-calendar'); ?></label> 
    900906            </p> 
    901907            <p class="note"><em><?php _e('Enter start and end dates/times for each occurrence of the event.','my-calendar'); ?></em></p> 
     
    956962            <?php if (  is_object($data) && $data->event_repeats != NULL ) { $repeats = $data->event_repeats; } else { $repeats = 0; } ?> 
    957963            <p> 
    958             <label for="event_repeats"><?php _e('Repeats','my-calendar'); ?> <input type="text" name="event_repeats" aria-labelledby='event_repeats_label'id="event_repeats" class="input" size="1" value="<?php echo $repeats; ?>" /> <span id='event_repeats_label'><?php _e('times','my-calendar'); ?></span>, </label> 
    959             <label for="event_every"><?php _e('every','my-calendar'); ?></label> <input type="number" name="event_every" id="event_every" class="input" size="1" min="1" max="9" maxlength="1" value="<?php echo (is_object($data))?$every:1; ?>" />  
    960             <label for="event_recur" class='offscreen'><?php _e('Units','my-calendar'); ?></label> <select name="event_recur" class="input" id="event_recur"> 
     964            <label for="e_repeats"><?php _e('Repeats','my-calendar'); ?> <input type="text" name="event_repeats" aria-labelledby='event_repeats_label'id="e_repeats" size="1" value="<?php echo $repeats; ?>" /> <span id='event_repeats_label'><?php _e('times','my-calendar'); ?></span>, </label> 
     965            <label for="e_every"><?php _e('every','my-calendar'); ?></label> <input type="number" name="event_every" id="e_every" size="1" min="1" max="9" maxlength="1" value="<?php echo (is_object($data))?$every:1; ?>" />  
     966            <label for="e_recur" class='screen-reader-text'><?php _e('Units','my-calendar'); ?></label> <select name="event_recur" id="e_recur"> 
    961967                <?php echo mc_recur_options($recur); ?> 
    962968            </select><br /> 
     
    10411047            <?php if ( current_user_can( 'mc_edit_locations') ) { ?><p><input type="checkbox" value="on" name="mc_copy_location" id="mc_copy_location" /> <label for="mc_copy_location"><?php _e('Copy this location into the locations table','my-calendar'); ?></label></p><?php } ?>          
    10421048            <p> 
    1043             <label for="event_label"><?php _e('Name of Location (e.g. <em>Joe\'s Bar and Grill</em>)','my-calendar'); ?></label><br /> 
     1049            <label for="e_label"><?php _e('Name of Location (e.g. <em>Joe\'s Bar and Grill</em>)','my-calendar'); ?></label><br /> 
    10441050            <?php if ( mc_controlled_field( 'label') ) { 
    10451051                $cur_label = ( !empty( $data ) )?( stripslashes( $data->event_label ) ):''; 
    10461052                echo mc_location_controller( 'label', $cur_label ); 
    10471053            } else { ?> 
    1048             <input type="text" id="event_label" name="event_label" class="input" size="40" value="<?php if ( $has_data ) esc_attr_e(stripslashes($data->event_label)); ?>" /> 
     1054            <input type="text" id="e_label" name="event_label" size="40" value="<?php if ( $has_data ) esc_attr_e(stripslashes($data->event_label)); ?>" /> 
    10491055            <?php } ?> 
    10501056            </p> 
    10511057            <p> 
    1052             <label for="event_street"><?php _e('Street Address','my-calendar'); ?></label> <input type="text" id="event_street" name="event_street" class="input" size="40" value="<?php if ( $has_data ) esc_attr_e(stripslashes($data->event_street)); ?>" /> 
     1058            <label for="e_street"><?php _e('Street Address','my-calendar'); ?></label> <input type="text" id="e_street" name="event_street" size="40" value="<?php if ( $has_data ) esc_attr_e(stripslashes($data->event_street)); ?>" /> 
    10531059            </p> 
    10541060            <p> 
    1055             <label for="event_street2"><?php _e('Street Address (2)','my-calendar'); ?></label> <input type="text" id="event_street2" name="event_street2" class="input" size="40" value="<?php if ( $has_data ) esc_attr_e(stripslashes($data->event_street2)); ?>" /> 
     1061            <label for="e_street2"><?php _e('Street Address (2)','my-calendar'); ?></label> <input type="text" id="e_street2" name="event_street2" size="40" value="<?php if ( $has_data ) esc_attr_e(stripslashes($data->event_street2)); ?>" /> 
    10561062            </p>         
    10571063            <p> 
    1058             <label for="event_city"><?php _e('City','my-calendar'); ?></label>  
     1064            <label for="e_city"><?php _e('City','my-calendar'); ?></label>  
    10591065            <?php if ( mc_controlled_field( 'city') ) { 
    10601066                $cur_label = ( !empty( $data ) )?( stripslashes( $data->event_city ) ):''; 
    10611067                echo mc_location_controller( 'city', $cur_label ); 
    10621068            } else { ?> 
    1063             <input type="text" id="event_city" name="event_city" class="input" size="40" value="<?php if ( $has_data ) esc_attr_e(stripslashes($data->event_city)); ?>" />  
     1069            <input type="text" id="e_city" name="event_city" size="40" value="<?php if ( $has_data ) esc_attr_e(stripslashes($data->event_city)); ?>" />  
    10641070            <?php } ?> 
    1065             <label for="event_state"><?php _e('State/Province','my-calendar'); ?></label>  
     1071            <label for="e_state"><?php _e('State/Province','my-calendar'); ?></label>  
    10661072            <?php if ( mc_controlled_field( 'state') ) { 
    10671073                $cur_label = ( !empty( $data ) )?( stripslashes( $data->event_state ) ):'';      
    10681074                echo mc_location_controller( 'state', $cur_label ); 
    10691075            } else { ?> 
    1070             <input type="text" id="event_state" name="event_state" class="input" size="10" value="<?php if ( $has_data ) esc_attr_e(stripslashes($data->event_state)); ?>" />  
     1076            <input type="text" id="e_state" name="event_state" size="10" value="<?php if ( $has_data ) esc_attr_e(stripslashes($data->event_state)); ?>" />  
    10711077            <?php } ?> 
    10721078            </p> 
    10731079            <p> 
    1074             <label for="event_postcode"><?php _e('Postal Code','my-calendar'); ?></label>  
     1080            <label for="e_postcode"><?php _e('Postal Code','my-calendar'); ?></label>  
    10751081            <?php if ( mc_controlled_field( 'postcode') ) { 
    10761082                $cur_label = ( !empty( $data ) )?( stripslashes( $data->event_postcode ) ):''; 
    10771083                echo mc_location_controller( 'postcode', $cur_label ); 
    10781084            } else { ?> 
    1079             <input type="text" id="event_postcode" name="event_postcode" class="input" size="10" value="<?php if ( $has_data ) esc_attr_e(stripslashes($data->event_postcode)); ?>" /> 
     1085            <input type="text" id="e_postcode" name="event_postcode" size="10" value="<?php if ( $has_data ) esc_attr_e(stripslashes($data->event_postcode)); ?>" /> 
    10801086            <?php } ?> 
    1081             <label for="event_region"><?php _e('Region','my-calendar'); ?></label>  
     1087            <label for="e_region"><?php _e('Region','my-calendar'); ?></label>  
    10821088            <?php if ( mc_controlled_field( 'region') ) {            
    10831089                $cur_label = ( !empty( $data ) )?( stripslashes( $data->event_region ) ):'';             
    10841090                echo mc_location_controller( 'region', $cur_label ); 
    10851091            } else { ?> 
    1086             <input type="text" id="event_region" name="event_region" class="input" size="40" value="<?php if ( !empty( $data ) ) esc_attr_e(stripslashes($data->event_region)); ?>" /> 
     1092            <input type="text" id="e_region" name="event_region" size="40" value="<?php if ( !empty( $data ) ) esc_attr_e(stripslashes($data->event_region)); ?>" /> 
    10871093            <?php } ?> 
    10881094            </p> 
    10891095            <p>      
    1090             <label for="event_country"><?php _e('Country','my-calendar'); ?></label>  
     1096            <label for="e_country"><?php _e('Country','my-calendar'); ?></label>  
    10911097            <?php if ( mc_controlled_field( 'country') ) {           
    10921098                $cur_label = ( !empty( $data ) )?( stripslashes( $data->event_country ) ):'';            
    10931099                echo mc_location_controller( 'country', $cur_label ); 
    10941100            } else { ?> 
    1095             <input type="text" id="event_country" name="event_country" class="input" size="10" value="<?php if ( $has_data ) esc_attr_e(stripslashes($data->event_country)); ?>" /> 
     1101            <input type="text" id="e_country" name="event_country" size="10" value="<?php if ( $has_data ) esc_attr_e(stripslashes($data->event_country)); ?>" /> 
    10961102            <?php } ?> 
    10971103            </p> 
    10981104            <p> 
    1099             <label for="event_zoom"><?php _e('Initial Zoom','my-calendar'); ?></label>  
    1100                 <select name="event_zoom" id="event_zoom"> 
     1105            <label for="e_zoom"><?php _e('Initial Zoom','my-calendar'); ?></label>  
     1106                <select name="event_zoom" id="e_zoom"> 
    11011107                <option value="16"<?php if ( !empty( $data ) && ( $data->event_zoom == 16 ) ) { echo " selected=\"selected\""; } ?>><?php _e('Neighborhood','my-calendar'); ?></option> 
    11021108                <option value="14"<?php if ( !empty( $data ) && ( $data->event_zoom == 14 ) ) { echo " selected=\"selected\""; } ?>><?php _e('Small City','my-calendar'); ?></option> 
     
    11081114            </p> 
    11091115            <p> 
    1110             <label for="event_phone"><?php _e('Phone','my-calendar'); ?></label> <input type="text" id="event_phone" name="event_phone" class="input" size="32" value="<?php if ( $has_data ) esc_attr_e(stripslashes($data->event_phone)); ?>" /> 
     1116            <label for="e_phone"><?php _e('Phone','my-calendar'); ?></label> <input type="text" id="e_phone" name="event_phone" size="32" value="<?php if ( $has_data ) esc_attr_e(stripslashes($data->event_phone)); ?>" /> 
    11111117            </p> 
    11121118            <p> 
    1113             <label for="event_phone2"><?php _e('Secondary Phone','my-calendar'); ?></label> <input type="text" id="event_phone2" name="event_phone2" class="input" size="32" value="<?php if ( $has_data ) esc_attr_e(stripslashes($data->event_phone2)); ?>" /> 
     1119            <label for="e_phone2"><?php _e('Secondary Phone','my-calendar'); ?></label> <input type="text" id="e_phone2" name="event_phone2" size="32" value="<?php if ( $has_data ) esc_attr_e(stripslashes($data->event_phone2)); ?>" /> 
    11141120            </p>     
    11151121            <p> 
    1116             <label for="event_url"><?php _e('Location URL','my-calendar'); ?></label> <input type="text" id="event_url" name="event_url" class="input" size="40" value="<?php if ( !empty( $data ) ) esc_attr_e(stripslashes($data->event_url)); ?>" /> 
     1122            <label for="e_url"><?php _e('Location URL','my-calendar'); ?></label> <input type="text" id="e_url" name="event_url" size="40" value="<?php if ( !empty( $data ) ) esc_attr_e(stripslashes($data->event_url)); ?>" /> 
    11171123            </p>             
    11181124            <fieldset> 
     
    11221128            </p> 
    11231129            <p> 
    1124             <label for="event_latitude"><?php _e('Latitude','my-calendar'); ?></label> <input type="text" id="event_latitude" name="event_latitude" class="input" size="10" value="<?php if ( !empty( $data ) ) esc_attr_e(stripslashes($data->event_latitude)); ?>" /> <label for="event_longitude"><?php _e('Longitude','my-calendar'); ?></label> <input type="text" id="event_longitude" name="event_longitude" class="input" size="10" value="<?php if ( !empty( $data ) ) esc_attr_e(stripslashes($data->event_longitude)); ?>" /> 
     1130            <label for="e_latitude"><?php _e('Latitude','my-calendar'); ?></label> <input type="text" id="e_latitude" name="event_latitude" size="10" value="<?php if ( !empty( $data ) ) esc_attr_e(stripslashes($data->event_latitude)); ?>" /> <label for="e_longitude"><?php _e('Longitude','my-calendar'); ?></label> <input type="text" id="e_longitude" name="event_longitude" size="10" value="<?php if ( !empty( $data ) ) esc_attr_e(stripslashes($data->event_longitude)); ?>" /> 
    11251131            </p>             
    11261132            </fieldset> 
     
    11831189            <legend><?php _e('Special Options','my-calendar'); ?></legend> 
    11841190            <p> 
    1185             <label for="event_holiday"><?php _e('Cancel this event if it occurs on a date with an event in the Holidays category','my-calendar'); ?></label> <input type="checkbox" value="true" id="event_holiday" name="event_holiday"<?php if ( $has_data && $data->event_holiday == '1') { echo " checked=\"checked\""; } else if ( $has_data && $data->event_holiday == '0') { echo ""; } else if ( get_option( 'mc_skip_holidays') == 'true') { echo " checked=\"checked\""; } ?> /> 
     1191            <label for="e_holiday"><?php _e('Cancel this event if it occurs on a date with an event in the Holidays category','my-calendar'); ?></label> <input type="checkbox" value="true" id="e_holiday" name="event_holiday"<?php if ( $has_data && $data->event_holiday == '1') { echo " checked=\"checked\""; } else if ( $has_data && $data->event_holiday == '0') { echo ""; } else if ( get_option( 'mc_skip_holidays') == 'true') { echo " checked=\"checked\""; } ?> /> 
    11861192            </p> 
    11871193            <p> 
    1188             <label for="event_fifth_week"><?php _e('If this event recurs, and falls on the 5th week of the month in a month with only four weeks, move it back one week.','my-calendar'); ?></label> <input type="checkbox" value="true" id="event_fifth_week" name="event_fifth_week"<?php if ( $has_data && $data->event_fifth_week == '1') { echo " checked=\"checked\""; } else if ( $has_data && $data->event_fifth_week == '0') { echo ""; } else if ( get_option( 'mc_no_fifth_week') == 'true') { echo " checked=\"checked\""; } ?> /> 
     1194            <label for="e_fifth_week"><?php _e('If this event recurs, and falls on the 5th week of the month in a month with only four weeks, move it back one week.','my-calendar'); ?></label> <input type="checkbox" value="true" id="e_fifth_week" name="event_fifth_week"<?php if ( $has_data && $data->event_fifth_week == '1') { echo " checked=\"checked\""; } else if ( $has_data && $data->event_fifth_week == '0') { echo ""; } else if ( get_option( 'mc_no_fifth_week') == 'true') { echo " checked=\"checked\""; } ?> /> 
    11891195            </p> 
    11901196            </fieldset> 
     
    13091315        $limit .= ( $restrict != 'event_flagged')?" AND event_flagged = 0":''; 
    13101316    } 
    1311     $limit .= ( $restrict != 'archived')?" AND event_status = 1":' AND event_status = 0';        
     1317    $limit .= ( $restrict != 'archived' ) ? " AND event_status = 1" : ' AND event_status = 0';       
    13121318    $events = $mcdb->get_results("SELECT SQL_CALC_FOUND_ROWS * FROM " . my_calendar_table() . " $limit ORDER BY $sortbyvalue $sortbydirection LIMIT ".(($current-1)*$items_per_page).", ".$items_per_page ); 
    13131319    $found_rows = $wpdb->get_col("SELECT FOUND_ROWS();"); 
     
    13481354        <form action="<?php echo admin_url('admin.php?page=my-calendar-manage'); ?>" method="post"> 
    13491355        <div><input type="hidden" name="_wpnonce" value="<?php echo wp_create_nonce('my-calendar-nonce'); ?>" /></div>       
    1350         <div style="clear:left"> 
    1351         <input type="submit" class="button-secondary delete" name="mass_delete" value="<?php _e( 'Delete events','my-calendar' ); ?>" /> 
     1356        <div class='mc-actions'> 
     1357            <input type="submit" class="button-secondary delete" name="mass_delete" value="<?php _e( 'Delete events','my-calendar' ); ?>" /> 
    13521358        <?php if ( current_user_can('mc_approve_events') ) { ?> 
    13531359        <input type="submit" class="button-secondary mc-approve" name="mass_approve" value="<?php _e( 'Approve events','my-calendar' ); ?>" /> 
     
    14511457                    </div> 
    14521458                </td> 
    1453                 <td><a class='mc_filter'href="<?php $auth = (is_object($author))?$author->ID:0; echo admin_url("admin.php?page=my-calendar-manage&amp;filter=$auth&amp;restrict=author"); ?>" title="<?php _e('Filter by author','my-calendar'); ?>"><span><?php _e('Show only: ', 'my-calendar'); ?></span><?php echo ( is_object($author)?$author->display_name:$author ); ?></a></td> 
     1459                <td><a class='mc_filter' href="<?php $auth = (is_object($author))?$author->ID:0; echo admin_url("admin.php?page=my-calendar-manage&amp;filter=$auth&amp;restrict=author"); ?>" title="<?php _e('Filter by author','my-calendar'); ?>"><span class="screen-reader-text"><?php _e('Show only: ', 'my-calendar'); ?></span><?php echo ( is_object($author)?$author->display_name:$author ); ?></a></td> 
    14541460                                <?php 
    14551461                                $this_category = $event->event_category; 
     
    14601466                                } 
    14611467                                ?> 
    1462                 <td><div class="category-color" style="background-color:<?php echo (strpos($this_cat->category_color,'#') !== 0)?'#':''; echo $this_cat->category_color;?>;"> </div> <a class='mc_filter' href='<?php echo admin_url("admin.php?page=my-calendar-manage&amp;filter=$event->event_category&amp;restrict=category"); ?>' title="<?php _e('Filter by category','my-calendar'); ?>"><span><?php _e('Show only: ', 'my-calendar'); ?></span><?php echo stripslashes($this_cat->category_name); ?></a></td> 
     1468                <td><div class="category-color" style="background-color:<?php echo (strpos($this_cat->category_color,'#') !== 0)?'#':''; echo $this_cat->category_color;?>;"> </div> <a class='mc_filter' href='<?php echo admin_url("admin.php?page=my-calendar-manage&amp;filter=$event->event_category&amp;restrict=category"); ?>' title="<?php _e('Filter by category','my-calendar'); ?>"><span class="screen-reader-text"><?php _e('Show only: ', 'my-calendar'); ?></span><?php echo stripslashes($this_cat->category_name); ?></a></td> 
    14631469                <?php unset($this_cat); ?> 
    14641470            </tr> 
     
    19451951                <label for='event_registration'>".__('Registration Information','my-calendar')."</label> <textarea name='event_registration'id='event_registration'cols='40'rows='4'/>$registration</textarea> 
    19461952            </p>";           
    1947     return apply_filters( 'mc_event_registration_form', $form, $has_data, $data ); 
    1948 } 
     1953    return apply_filters( 'mc_event_registration_form', $form, $has_data, $data, 'admin' ); 
     1954} 
  • my-calendar/trunk/my-calendar-group-manager.php

    r865684 r866550  
    298298        <legend><?php _e('Enter your Event Information','my-calendar'); ?></legend> 
    299299        <p> 
    300         <label for="event_title"><?php _e('Event Title','my-calendar'); ?> <span><?php _e('(required)','my-calendar'); ?></span><?php if ( !mc_compare_group_members( $group_id,'event_title' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label><br /><input type="text" id="event_title" name="event_title" class="input" size="60" value="<?php if ( !empty($data) ) echo stripslashes(esc_attr($data->event_title)); ?>" /> 
     300        <label for="e_title"><?php _e('Event Title','my-calendar'); ?> <span><?php _e('(required)','my-calendar'); ?></span><?php if ( !mc_compare_group_members( $group_id,'event_title' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label><br /><input type="text" id="e_title" name="event_title" size="60" value="<?php if ( !empty($data) ) echo stripslashes(esc_attr($data->event_title)); ?>" /> 
    301301        </p> 
    302302            <?php  
     
    305305        if ( $data->event_repeats == 0 && ( $data->event_recur == 'S1' || $data->event_recur == 'S' ) ) { ?> 
    306306        <p> 
    307         <input type="checkbox" value="1" id="event_span" name="event_span"<?php if ( !empty($data) && $data->event_span == '1' ) { echo " checked=\"checked\""; } else if ( !empty($data) && $data->event_span == '0' ) { echo ""; } else if ( get_option( 'mc_event_span' ) == 'true' ) { echo " checked=\"checked\""; } ?> /> <label for="event_span"><?php _e('Selected dates are a single multi-day event.','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_span' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> 
     307        <input type="checkbox" value="1" id="e_span" name="event_span"<?php if ( !empty($data) && $data->event_span == '1' ) { echo " checked=\"checked\""; } else if ( !empty($data) && $data->event_span == '0' ) { echo ""; } else if ( get_option( 'mc_event_span' ) == 'true' ) { echo " checked=\"checked\""; } ?> /> <label for="e_span"><?php _e('Selected dates are a single multi-day event.','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_span' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> 
    308308        </p> 
    309309        <?php } else { ?> 
     
    318318        <?php if ($mc_input['event_short'] == 'on' || $mc_input_administrator ) { ?> 
    319319        <p> 
    320         <label for="event_short"><?php _e('Event Short Description (<abbr title="hypertext markup language">HTML</abbr> allowed)','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_short' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label><br /><textarea id="event_short" name="event_short" class="input" rows="2" cols="80"><?php if ( !empty($data) ) echo stripslashes(esc_attr($data->event_short)); ?></textarea> 
     320        <label for="e_short"><?php _e('Event Short Description (<abbr title="hypertext markup language">HTML</abbr> allowed)','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_short' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label><br /><textarea id="e_short" name="event_short" rows="2" cols="80"><?php if ( !empty($data) ) echo stripslashes(esc_attr($data->event_short)); ?></textarea> 
    321321        </p> 
    322322        <?php }  
     
    328328            <div class="event_image"></div> 
    329329            <?php } ?> 
    330             <input type="hidden" name="event_image_id" value="" class="textfield" id="event_image_id" /> 
    331             <label for="event_image"><?php _e("Add an image:",'my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_image' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> <input type="text" name="event_image" id="event_image" size="60" value="<?php if ( $has_data ) echo esc_attr($data->event_image); ?>" placeholder="http://yourdomain.com/image.jpg" /> <a href="#" class="button textfield-field"><?php _e("Upload",'my-calendar'); ?></a> 
     330            <input type="hidden" name="event_image_id" value="" class="textfield" id="e_image_id" /> 
     331            <label for="e_image"><?php _e("Add an image:",'my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_image' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> <input type="text" name="event_image" id="e_image" size="60" value="<?php if ( $has_data ) echo esc_attr($data->event_image); ?>" placeholder="http://yourdomain.com/image.jpg" /> <a href="#" class="button textfield-field"><?php _e("Upload",'my-calendar'); ?></a> 
    332332        </div> 
    333333        <?php } else { ?> 
     
    340340        <?php } ?>       
    341341    <p> 
    342     <label for="event_host"><?php _e('Event Host','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_host' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> 
    343     <select id="event_host" name="event_host"> 
     342    <label for="e_host"><?php _e('Event Host','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_host' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> 
     343    <select id="e_host" name="event_host"> 
    344344        <?php  
    345345             // Grab all the categories and list them 
     
    360360        <?php if ($mc_input['event_category'] == 'on' || $mc_input_administrator ) { ?> 
    361361        <p> 
    362         <label for="event_category"><?php _e('Event Category','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_category' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> 
    363         <select id="event_category" name="event_category"> 
     362        <label for="e_category"><?php _e('Event Category','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_category' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> 
     363        <select id="e_category" name="event_category"> 
    364364            <?php echo mc_category_select( $data ); ?> 
    365365        </select> 
     
    372372            <?php if ($mc_input['event_link'] == 'on' || $mc_input_administrator ) { ?> 
    373373            <p> 
    374             <label for="event_link"><?php _e('Event Link (Optional)','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_link' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> <input type="text" id="event_link" name="event_link" class="input" size="40" value="<?php if ( !empty($data) ) { echo esc_url($data->event_link); } ?>" /> <input type="checkbox" value="1" id="event_link_expires" name="event_link_expires"<?php if ( !empty($data) && $data->event_link_expires == '1' ) { echo " checked=\"checked\""; } else if ( !empty($data) && $data->event_link_expires == '0' ) { echo ""; } else if ( get_option( 'mc_event_link_expires' ) == 'true' ) { echo " checked=\"checked\""; } ?> /> <label for="event_link_expires"><?php _e('Link will expire after event.','my-calendar'); ?></label> 
     374            <label for="e_link"><?php _e('Event Link (Optional)','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_link' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> <input type="text" id="e_link" name="event_link" size="40" value="<?php if ( !empty($data) ) { echo esc_url($data->event_link); } ?>" /> <input type="checkbox" value="1" id="e_link_expires" name="event_link_expires"<?php if ( !empty($data) && $data->event_link_expires == '1' ) { echo " checked=\"checked\""; } else if ( !empty($data) && $data->event_link_expires == '0' ) { echo ""; } else if ( get_option( 'mc_event_link_expires' ) == 'true' ) { echo " checked=\"checked\""; } ?> /> <label for="e_link_expires"><?php _e('Link will expire after event.','my-calendar'); ?></label> 
    375375            </p> 
    376376            <?php } ?> 
     
    385385// add a "don't change" option here ?>       
    386386<div class="ui-sortable meta-box-sortables"> 
    387 <div class="postbox"> 
    388 <h3><?php _e('Event Registration Options','my-calendar'); ?></h3> 
    389 <div class="inside"> 
    390  
     387    <div class="postbox"> 
     388    <h3><?php _e('Event Registration Options','my-calendar'); ?></h3> 
     389        <div class="inside"> 
    391390            <fieldset> 
    392391            <legend><?php _e('Event Registration Status','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_open' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></legend> 
    393             <?php echo apply_filters( 'mc_event_registration', $has_data, $data ); ?>                        
     392            <?php echo apply_filters( 'mc_event_registration', '', $has_data, $data, 'admin' ); ?>                       
    394393            </fieldset> 
    395 </div> 
    396 </div>   
     394        </div> 
     395    </div>   
    397396</div>       
    398397            <?php } else { ?> 
     
    441440            <?php if ($mc_input['event_location'] == 'on' || $mc_input_administrator ) { ?>          
    442441            <p> 
    443             <label for="event_label"><?php _e('Name of Location (e.g. <em>Joe\'s Bar and Grill</em>)','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_label' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label><br /><input type="text" id="event_label" name="event_label" class="input" size="40" value="<?php if ( !empty($data) ) esc_attr_e(stripslashes($data->event_label)); ?>" /> 
    444             </p> 
    445             <p> 
    446             <label for="event_street"><?php _e('Street Address','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_street' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> <input type="text" id="event_street" name="event_street" class="input" size="40" value="<?php if ( !empty($data) ) esc_attr_e(stripslashes($data->event_street)); ?>" /> 
    447             </p> 
    448             <p> 
    449             <label for="event_street2"><?php _e('Street Address (2)','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_street2' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> <input type="text" id="event_street2" name="event_street2" class="input" size="40" value="<?php if ( !empty($data) ) esc_attr_e(stripslashes($data->event_street2)); ?>" /> 
     442            <label for="e_label"><?php _e('Name of Location (e.g. <em>Joe\'s Bar and Grill</em>)','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_label' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label><br /><input type="text" id="e_label" name="event_label" size="40" value="<?php if ( !empty($data) ) esc_attr_e(stripslashes($data->event_label)); ?>" /> 
     443            </p> 
     444            <p> 
     445            <label for="e_street"><?php _e('Street Address','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_street' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> <input type="text" id="e_street" name="event_street" size="40" value="<?php if ( !empty($data) ) esc_attr_e(stripslashes($data->event_street)); ?>" /> 
     446            </p> 
     447            <p> 
     448            <label for="e_street2"><?php _e('Street Address (2)','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_street2' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> <input type="text" id="e_street2" name="event_street2" size="40" value="<?php if ( !empty($data) ) esc_attr_e(stripslashes($data->event_street2)); ?>" /> 
    450449            </p>             
    451450            <p> 
    452             <label for="event_city"><?php _e('City','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_city' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> <input type="text" id="event_city" name="event_city" class="input" size="40" value="<?php if ( !empty($data) ) esc_attr_e(stripslashes($data->event_city)); ?>" /> <label for="event_state"><?php _e('State/Province','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_state' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> <input type="text" id="event_state" name="event_state" class="input" size="10" value="<?php if ( !empty($data) ) esc_attr_e(stripslashes($data->event_state)); ?>" />  
    453             </p> 
    454             <p> 
    455             <label for="event_postcode"><?php _e('Postal Code','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_postcode' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> <input type="text" id="event_postcode" name="event_postcode" class="input" size="10" value="<?php if ( !empty($data) ) esc_attr_e(stripslashes($data->event_postcode)); ?>" /> 
    456             <label for="event_region"><?php _e('Region','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_region' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> <input type="text" id="event_region" name="event_region" class="input" size="40" value="<?php if ( !empty( $data ) ) esc_attr_e(stripslashes($data->event_region)); ?>" /> 
    457             </p> 
    458             <p> 
    459             <label for="event_country"><?php _e('Country','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_country' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> <input type="text" id="event_country" name="event_country" class="input" size="10" value="<?php if ( !empty($data) ) esc_attr_e(stripslashes($data->event_country)); ?>" /> 
    460             </p> 
    461             <p> 
    462             <label for="event_zoom"><?php _e('Initial Zoom','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_zoom' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label>  
    463                 <select name="event_zoom" id="event_zoom"> 
     451            <label for="e_city"><?php _e('City','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_city' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> <input type="text" id="e_city" name="event_city" size="40" value="<?php if ( !empty($data) ) esc_attr_e(stripslashes($data->event_city)); ?>" /> <label for="e_state"><?php _e('State/Province','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_state' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> <input type="text" id="e_state" name="event_state" size="10" value="<?php if ( !empty($data) ) esc_attr_e(stripslashes($data->event_state)); ?>" />  
     452            </p> 
     453            <p> 
     454            <label for="e_postcode"><?php _e('Postal Code','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_postcode' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> <input type="text" id="e_postcode" name="event_postcode" size="10" value="<?php if ( !empty($data) ) esc_attr_e(stripslashes($data->event_postcode)); ?>" /> 
     455            <label for="e_region"><?php _e('Region','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_region' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> <input type="text" id="e_region" name="event_region" size="40" value="<?php if ( !empty( $data ) ) esc_attr_e(stripslashes($data->event_region)); ?>" /> 
     456            </p> 
     457            <p> 
     458            <label for="e_country"><?php _e('Country','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_country' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> <input type="text" id="e_country" name="event_country" size="10" value="<?php if ( !empty($data) ) esc_attr_e(stripslashes($data->event_country)); ?>" /> 
     459            </p> 
     460            <p> 
     461            <label for="e_zoom"><?php _e('Initial Zoom','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_zoom' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label>  
     462                <select name="event_zoom" id="e_zoom"> 
    464463                <option value="16"<?php if ( !empty( $data ) && ( $data->event_zoom == 16 ) ) { echo " selected=\"selected\""; } ?>><?php _e('Neighborhood','my-calendar'); ?></option> 
    465464                <option value="14"<?php if ( !empty( $data ) && ( $data->event_zoom == 14 ) ) { echo " selected=\"selected\""; } ?>><?php _e('Small City','my-calendar'); ?></option> 
     
    471470            </p> 
    472471            <p> 
    473             <label for="event_phone"><?php _e('Phone','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_phone' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> <input type="text" id="event_phone" name="event_phone" class="input" size="32" value="<?php if ( !empty($data) ) esc_attr_e(stripslashes($data->event_phone)); ?>" /> 
     472            <label for="e_phone"><?php _e('Phone','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_phone' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> <input type="text" id="e_phone" name="event_phone" size="32" value="<?php if ( !empty($data) ) esc_attr_e(stripslashes($data->event_phone)); ?>" /> 
    474473            </p>             
    475474            <p> 
    476             <label for="event_url"><?php _e('Location URL','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_url' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> <input type="text" id="event_url" name="event_url" class="input" size="40" value="<?php if ( !empty( $data ) ) esc_attr_e(stripslashes($data->event_url)); ?>" /> 
     475            <label for="e_url"><?php _e('Location URL','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_url' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> <input type="text" id="e_url" name="event_url" size="40" value="<?php if ( !empty( $data ) ) esc_attr_e(stripslashes($data->event_url)); ?>" /> 
    477476            </p> 
    478477            <fieldset> 
    479478            <legend><?php _e('GPS Coordinates (optional)','my-calendar'); ?></legend> 
    480479            <p> 
    481             <label for="event_latitude"><?php _e('Latitude','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_latitude' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?><?php if ( !mc_compare_group_members( $group_id,'event_longitude' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> <input type="text" id="event_latitude" name="event_latitude" class="input" size="10" value="<?php if ( !empty( $data ) ) esc_attr_e(stripslashes($data->event_latitude)); ?>" /> <label for="event_longitude"><?php _e('Longitude','my-calendar'); ?></label> <input type="text" id="event_longitude" name="event_longitude" class="input" size="10" value="<?php if ( !empty( $data ) ) esc_attr_e(stripslashes($data->event_longitude)); ?>" /> 
     480            <label for="e_latitude"><?php _e('Latitude','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_latitude' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?><?php if ( !mc_compare_group_members( $group_id,'event_longitude' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> <input type="text" id="e_latitude" name="event_latitude" size="10" value="<?php if ( !empty( $data ) ) esc_attr_e(stripslashes($data->event_latitude)); ?>" /> <label for="e_longitude"><?php _e('Longitude','my-calendar'); ?></label> <input type="text" id="e_longitude" name="event_longitude" size="10" value="<?php if ( !empty( $data ) ) esc_attr_e(stripslashes($data->event_longitude)); ?>" /> 
    482481            </p> 
    483482            </fieldset> 
    484483            <fieldset> 
    485484            <legend><?php _e('Location Accessibility','my-calendar'); ?></legend> 
    486             <ul> 
     485            <ul class='checkboxes'> 
    487486            <?php  
    488487            $access = apply_filters( 'mc_venue_accessibility', get_option( 'mc_location_access' ) ); 
  • my-calendar/trunk/my-calendar-install.php

    r865684 r866550  
    33 
    44// define global variables; 
    5 global $initial_listjs, $initial_caljs, $initial_minijs, $initial_ajaxjs, $initial_db, $initial_occur_db, $initial_loc_db, $initial_cat_db, $default_template,$default_user_settings, $mcdb,$grid_template,$list_template,$rss_template,$mini_template,$single_template, $defaults; 
     5global $initial_listjs, $initial_caljs, $initial_minijs, $initial_ajaxjs, $initial_db, $initial_occur_db, $initial_loc_db, $initial_cat_db, $default_template,$default_user_settings,$wpdb,$grid_template,$list_template,$rss_template,$mini_template,$single_template, $defaults; 
    66 
    77$defaults = array( 
     
    154154$default_template = "<strong>{date}</strong> &#8211; {link_title}<br /><span>{time}, {category}</span>"; 
    155155 
    156 if ( ! empty( $mcdb->charset ) ) { 
    157     $charset_collate = "DEFAULT CHARACTER SET $mcdb->charset"; 
     156if ( ! empty( $wpdb->charset ) ) { 
     157    $charset_collate = "DEFAULT CHARACTER SET $wpdb->charset"; 
    158158} else { 
    159     $charset_collate = "DEFAULT CHARACTER SET utf8_general_ci"; 
    160 } 
    161  
    162 if ( ! empty( $mcdb->collate ) ) { 
    163     $charset_collate .= " COLLATE $mcdb->collate"; 
     159    $charset_collate = "DEFAULT CHARACTER SET $wpdb->collate"; 
     160} 
     161 
     162if ( ! empty( $wpdb->collate ) ) { 
     163    $charset_collate .= " COLLATE $wpdb->collate"; 
    164164} 
    165165 
  • my-calendar/trunk/my-calendar-output.php

    r865684 r866550  
    223223    $current_date = date_i18n( apply_filters( 'mc_date_format', $date_format, 'details' ), strtotime( $process_date ) ); 
    224224    $group_class = ( $event->event_span == 1 ) ? ' multidate group'.$event->event_group_id : '' ; 
    225     $heading_level = apply_filters('mc_heading_level_table','h3',$format,$time,$template );  
     225    $heading_level = apply_filters( 'mc_heading_level_table','h3',$type,$time,$template ); 
    226226    $header .= ( $type != 'single' && $type != 'list' ) ? "<$heading_level class='event-title summary$group_class'>$wrap$image$event_title$balance</$heading_level>\n" : ''; 
     227    $event_title = ( $type == 'single' ) ? apply_filters( 'mc_single_event_title', $event_title, $event ) : $event_title ; 
    227228    $title = ( $type == 'single' && !is_singular( 'mc-events' ) )?"<h2 class='event-title summary'>$image $event_title</h2>\n":''; 
    228229    $title = apply_filters( 'mc_event_title', $title, $event, $event_title, $image ); 
     
    10381039                            $events = ( isset( $event_array[$date] ) )?$event_array[$date]:array(); 
    10391040                                if ( !empty($events) ) {                                 
    1040                                     $event_output = my_calendar_draw_events($events, $format, $date, $time, $template, $holidays);                       
     1041                                    $event_output = my_calendar_draw_events( $events, $format, $date, $time, $template ); 
    10411042                                    if ( $event_output === true ) { $event_output = ' '; } 
    10421043                                    $events_class = ( $event_output != '' )?mc_events_class($events):'no-events'; 
  • my-calendar/trunk/my-calendar-settings.php

    r865684 r866550  
    55    $options = $attributes = ''; 
    66    if ( is_array( $atts ) && !empty( $atts ) ) { 
    7         foreach ( $atts as $key => $value ) { 
    8             $attributes .= " $key='$value'"; 
    9         } 
    10     } else { 
    11         $attributes = ''; 
     7        foreach ( $atts as $key => $value ) { $attributes .= " $key='$value'"; } 
    128    } 
    139    switch ( $type ) { 
     
    8278// Display the admin configuration page 
    8379function my_calendar_import() { 
    84     if ( get_option('ko_calendar_imported') != 'true' ) { 
     80    if ( get_option( 'ko_calendar_imported' ) != 'true' ) { 
    8581        global $wpdb; 
    8682        $mcdb = $wpdb; 
    87         define('KO_CALENDAR_TABLE', $mcdb->prefix . 'calendar'); 
    88         define('KO_CALENDAR_CATS', $mcdb->prefix . 'calendar_categories'); 
     83        define( 'KO_CALENDAR_TABLE', $mcdb->prefix . 'calendar' ); 
     84        define( 'KO_CALENDAR_CATS', $mcdb->prefix . 'calendar_categories' ); 
    8985        $events = $mcdb->get_results("SELECT * FROM " . KO_CALENDAR_TABLE, 'ARRAY_A'); 
    9086        $event_ids = array(); 
    91         foreach ($events as $key) { 
    92             if ( $key['event_time'] == '00:00:00' ) { 
    93                 $endtime = '00:00:00'; 
    94             } else { 
    95                 $endtime = date('H:i:s',strtotime( "$key[event_time] +1 hour" ) ); 
    96             } 
     87        foreach ( $events as $key ) { 
     88            $endtime = ( $key['event_time'] == '00:00:00' ) ? '00:00:00' : date( 'H:i:s',strtotime( "$key[event_time] +1 hour" ) ); 
    9789            $data = array( 
    9890                'event_title'=>$key['event_title'], 
     
    113105            $event_ids[] = $mcdb->insert_id; 
    114106        } 
    115  
    116107        foreach ( $event_ids as $value ) { // propagate event instances. 
    117                 $sql = "SELECT event_begin, event_time, event_end, event_endtime FROM ".my_calendar_table()." WHERE event_id = $value";              
    118                 $event = $wpdb->get_results($sql); 
    119                 $event = $event[0]; 
    120                 $dates = array( 'event_begin'=>$event->event_begin,'event_end'=>$event->event_end,'event_time'=>$event->event_time,'event_endtime'=>$event->event_endtime ); 
    121                 $event = mc_increment_event( $value, $dates );               
     108            $sql = "SELECT event_begin, event_time, event_end, event_endtime FROM ".my_calendar_table()." WHERE event_id = $value"; 
     109            $event = $wpdb->get_results($sql); 
     110            $event = $event[0]; 
     111            $dates = array( 'event_begin'=>$event->event_begin,'event_end'=>$event->event_end,'event_time'=>$event->event_time,'event_endtime'=>$event->event_endtime ); 
     112            $event = mc_increment_event( $value, $dates );               
    122113        } 
    123114        $cats = $mcdb->get_results("SELECT * FROM " . KO_CALENDAR_CATS, 'ARRAY_A');  
    124115        $catsql = ""; 
    125         foreach ($cats as $key) { 
     116        foreach ( $cats as $key ) { 
    126117            $name = mysql_real_escape_string($key['category_name']); 
    127118            $color = mysql_real_escape_string($key['category_colour']); 
     
    136127                ";   
    137128            $cats_results = $mcdb->query($catsql); 
    138             //$mcdb->print_error();              
    139129        }            
    140130        $message = ( $cats_results !== false )?__('Categories imported successfully.','my-calendar'):__('Categories not imported.','my-calendar'); 
     
    158148    $mcdb = $wpdb; 
    159149    check_my_calendar(); 
    160     if (!empty($_POST)) { 
    161         $nonce=$_REQUEST['_wpnonce']; 
     150    if ( !empty( $_POST ) ) { 
     151        $nonce = $_REQUEST['_wpnonce']; 
    162152        if (! wp_verify_nonce($nonce,'my-calendar-nonce') ) die("Security check failed");  
    163153        if ( isset($_POST['remigrate']) ) {  
     
    178168        $mc_event_approve = ( !empty($_POST['mc_event_approve']) && $_POST['mc_event_approve']=='on')?'true':'false'; 
    179169        $mc_api_enabled = ( !empty($_POST['mc_api_enabled']) && $_POST['mc_api_enabled']=='on')?'true':'false'; 
    180          
    181170        $mc_remote = ( !empty($_POST['mc_remote']) && $_POST['mc_remote']=='on')?'true':'false'; 
    182171        if ( isset($_POST['mc_clear_cache']) && $_POST['mc_clear_cache'] == 'clear' ) { mc_delete_cache(); $clear = __('My Calendar Cache cleared','my-calendar'); } 
    183172        update_option('mc_event_approve',$mc_event_approve); 
    184173        update_option('mc_api_enabled',$mc_api_enabled); 
    185          
    186174        update_option('mc_remote',$mc_remote); 
    187175        update_option('mc_default_sort',$_POST['mc_default_sort']); 
    188          
    189176        if ( get_site_option('mc_multisite') == 2 ) { 
    190177            $mc_current_table = (int) $_POST['mc_current_table']; 
     
    223210    // output 
    224211    if (isset($_POST['mc_show_months']) ) { 
    225  
    226212        $mc_open_day_uri = ( !empty($_POST['mc_open_day_uri']) )?$_POST['mc_open_day_uri']:''; 
    227213        update_option('mc_uri',$_POST['mc_uri'] ); 
     
    237223        update_option('mc_show_list_info',( !empty($_POST['mc_show_list_info']) && $_POST['mc_show_list_info']=='on')?'true':'false');       
    238224        update_option('mc_show_months',(int) $_POST['mc_show_months']); 
    239          
     225        // calculate sequence for navigation elements 
    240226        $top = $bottom = array(); 
    241227        $nav = $_POST['mc_nav']; 
     
    253239            if ( $n == 'stop' ) { break; }           
    254240        } 
    255          
    256241        update_option( 'mc_bottomnav', implode( ',' ,$bottom ) ); 
    257242        update_option( 'mc_topnav', implode( ',' ,$top ) ); 
     
    303288        echo "<div class=\"updated\"><p><strong>".__('Input Settings saved','my-calendar').".</strong></p></div>"; 
    304289    } 
    305     if ( current_user_can('manage_network') ) { 
    306         if ( isset($_POST['mc_network']) ) { 
     290    if ( current_user_can( 'manage_network' ) ) { 
     291        if ( isset( $_POST['mc_network'] ) ) { 
    307292            $mc_multisite = (int) $_POST['mc_multisite']; 
    308             update_site_option('mc_multisite',$mc_multisite ); 
     293            update_site_option( 'mc_multisite',$mc_multisite ); 
    309294            $mc_multisite_show = (int) $_POST['mc_multisite_show']; 
    310             update_site_option('mc_multisite_show',$mc_multisite_show );             
    311             echo "<div class=\"updated\"><p><strong>".__('Multisite settings saved','my-calendar').".</strong></p></div>"; 
     295            update_site_option( 'mc_multisite_show',$mc_multisite_show );            
     296            echo "<div class=\"updated\"><p><strong>".__( 'Multisite settings saved','my-calendar' ).".</strong></p></div>"; 
    312297        } 
    313298    } 
     
    329314        $templates['label'] = $mc_details_label; 
    330315        $templates['link'] = $mc_link_label;     
    331         update_option('mc_templates',$templates); 
     316        update_option( 'mc_templates',$templates); 
    332317        update_option( 'mc_event_title_template', $mc_event_title_template ); 
    333         update_option('mc_notime_text',$mc_notime_text); 
    334         update_option('mc_week_caption',$mc_week_caption); 
    335         update_option('mc_next_events',$mc_next_events); 
    336         update_option('mc_previous_events',$mc_previous_events);     
    337         update_option('mc_caption',$my_calendar_caption); 
    338         update_option('mc_event_open',$mc_event_open); 
    339         update_option('mc_event_closed',$mc_event_closed); 
    340         echo "<div class=\"updated\"><p><strong>".__('Custom text settings saved','my-calendar').".</strong></p></div>";      
     318        update_option( 'mc_notime_text',$mc_notime_text ); 
     319        update_option( 'mc_week_caption',$mc_week_caption ); 
     320        update_option( 'mc_next_events',$mc_next_events ); 
     321        update_option( 'mc_previous_events',$mc_previous_events ); 
     322        update_option( 'mc_caption',$my_calendar_caption ); 
     323        update_option( 'mc_event_open',$mc_event_open ); 
     324        update_option( 'mc_event_closed',$mc_event_closed ); 
     325        echo "<div class=\"updated\"><p><strong>".__( 'Custom text settings saved','my-calendar' ).".</strong></p></div>";    
    341326    } 
    342327    // Mail function by Roland 
     
    360345    apply_filters('mc_save_settings','', $_POST ); 
    361346     
    362     // Pull known values out of the options table 
    363     $allowed_group = get_option('mc_can_manage_events'); 
    364     $mc_show_months = get_option('mc_show_months'); 
    365     $mc_bottomnav = get_option('mc_bottomnav'); 
    366     $mc_topnav = get_option('mc_topnav'); 
    367     $mc_show_map = get_option('mc_show_map'); 
    368     $mc_show_address = get_option('mc_show_address'); 
    369     $disp_author = get_option('mc_display_author'); 
    370     $mc_event_link_expires = get_option('mc_event_link_expires'); 
    371     $mc_event_mail = get_option('mc_event_mail'); 
    372     $mc_event_mail_to = get_option('mc_event_mail_to'); 
    373     $mc_event_mail_from = get_option('mc_event_mail_from'); 
    374     $mc_event_mail_subject = get_option('mc_event_mail_subject'); 
    375     $mc_event_mail_message = get_option('mc_event_mail_message'); 
    376     $mc_event_approve = get_option('mc_event_approve'); 
    377     $mc_event_approve_perms = get_option('mc_event_approve_perms'); 
    378     $disp_jump = get_option('mc_display_jump'); 
    379     $mc_no_fifth_week = get_option('mc_no_fifth_week'); 
     347    // pull templates for passing into functions. 
    380348    $templates = get_option('mc_templates'); 
    381349    $mc_title_template = $templates['title']; 
    382350    $mc_details_label = $templates['label']; 
    383351    $mc_link_label = $templates['link']; 
    384     $mc_event_title_template = get_option('mc_event_title_template'); 
    385     $mc_mini_uri = get_option('mc_mini_uri'); 
    386352?>  
    387353 
     
    505471    <li><?php mc_settings_field ( 'mc_week_caption', __('Week view caption:','my-calendar'), '', __( 'Available tag: <code>{date format=""}</code>','my-calendar' ) ); ?></li> 
    506472    <li><?php mc_settings_field ( 'my_calendar_caption', __('Extended caption:','my-calendar'), '', __( 'Follows month/year in list views.','my-calendar' ) ); ?></li> 
    507     <?php $templates = get_option('mc_templates'); $title_template = $templates['title']; ?> 
    508     <li><?php mc_settings_field ( 'mc_title_template', __('Event title template','my-calendar'), $title_template, "<a href='".admin_url("admin.php?page=my-calendar-help#templates")."'>".__( "Templating Help",'my-calendar' ).'</a>' ); ?></li> 
    509     <li><?php mc_settings_field ( 'mc_details_label', __('Event details link text','my-calendar'), '', __('Tags: <code>{title}</code>, <code>{location}</code>, <code>{color}</code>, <code>{icon}</code>, <code>{date}</code>, <code>{time}</code>.','my-calendar') ); ?></li> 
    510     <li><?php mc_settings_field ( 'mc_link_label', __('Event URL link text','my-calendar'), '', "<a href='".admin_url("admin.php?page=my-calendar-help#templates")."'>".__( "Templating Help",'my-calendar' ).'</a>' ); ?></li> 
     473    <li><?php mc_settings_field ( 'mc_title_template', __('Event title template','my-calendar'), $mc_title_template, "<a href='".admin_url("admin.php?page=my-calendar-help#templates")."'>".__( "Templating Help",'my-calendar' ).'</a>' ); ?></li> 
     474    <li><?php mc_settings_field ( 'mc_details_label', __('Event details link text','my-calendar'), $mc_details_label, __('Tags: <code>{title}</code>, <code>{location}</code>, <code>{color}</code>, <code>{icon}</code>, <code>{date}</code>, <code>{time}</code>.','my-calendar') ); ?></li> 
     475    <li><?php mc_settings_field ( 'mc_link_label', __('Event URL link text','my-calendar'), $mc_link_label, "<a href='".admin_url("admin.php?page=my-calendar-help#templates")."'>".__( "Templating Help",'my-calendar' ).'</a>' ); ?></li> 
    511476    <li><?php mc_settings_field ( 'mc_event_title_template', __('Title element template','my-calendar'), '{title} &raquo; {date}', __('Current: %s', 'my-calendar' ) ); ?></li>      
    512477    </ul> 
  • my-calendar/trunk/my-calendar-styles.php

    r865684 r866550  
    8383        $wrote_styles = ( $my_calendar_style !== false )?mc_write_styles($stylefile, $my_calendar_style):'disabled'; 
    8484        if ( $wrote_styles == true ) { 
     85            // updates from pre version 1.7.0 
    8586            delete_option('mc_file_permissions'); 
    8687            delete_option('mc_style'); 
     
    182183                </div> 
    183184                <?php  
     185                // update from pre version 1.7.0 
    184186                if ( get_option('mc_file_permissions') == 'false' ) { 
    185187                    echo "<div id='my_calendar_old_styles'> 
  • my-calendar/trunk/my-calendar-templates.php

    r857615 r866550  
    213213    $details['description_raw'] = stripslashes($event->event_desc); 
    214214    $details['description_stripped'] = strip_tags(stripslashes($event->event_desc)); 
    215     $details['link_title'] = ($details['link'] != '')?"<a href='".$event->event_link."'>".stripslashes($event->event_title)."</a>":stripslashes($event->event_title); 
    216215    $details['shortdesc'] = ( get_option('mc_process_shortcodes') == 'true' )?apply_filters('the_content',$event->event_short):wpautop(stripslashes($event->event_short)); 
    217216    $details['shortdesc_raw'] = stripslashes($event->event_short); 
     
    224223 
    225224    // links 
    226         $templates = get_option('mc_templates'); 
    227         $details_template = ( !empty($templates['label']) )? stripcslashes($templates['label']):__('Details about','my-calendar').' {title}'; 
    228         $tags = array( "{title}","{location}","{color}","{icon}","{date}","{time}" ); 
    229         $replacements = array( stripslashes($event->event_title), stripslashes($event->event_label), $event->category_color, $event->category_icon, $details['date'], $details['time'] ); 
    230         $details_label = str_replace($tags,$replacements,$details_template ); 
     225    $templates = get_option('mc_templates'); 
     226    $details_template = ( !empty($templates['label']) )? stripcslashes($templates['label']):__('Details about','my-calendar').' {title}'; 
     227    $tags = array( "{title}","{location}","{color}","{icon}","{date}","{time}" ); 
     228    $replacements = array( stripslashes($event->event_title), stripslashes($event->event_label), $event->category_color, $event->category_icon, $details['date'], $details['time'] ); 
     229    $details_label = str_replace($tags,$replacements,$details_template ); 
    231230    //$details_label = mc_get_details_label( $event, $details ); // recursive...hmmmm. 
    232231    $details_link = mc_get_details_link( $event ); 
    233232    $details['link'] = mc_event_link( $event ); 
     233    $details['link_title'] = ($details['link'] != '')?"<a href='".$event->event_link."'>".stripslashes($event->event_title)."</a>":stripslashes($event->event_title);    
    234234    $details['details_link'] = ( get_option( 'mc_uri' ) != '' && !is_numeric( get_option('mc_uri') ) )?$details_link:''; 
    235235    $details['details'] = ( get_option( 'mc_uri' ) != '' && !is_numeric( get_option('mc_uri') ) )?"<a href='$details_link' class='mc-details'>$details_label</a>":''; 
     
    304304function mc_event_link( $event ) { 
    305305    if ( $event->event_link_expires == 0 ) { 
    306         $event_link = esc_url( $event->event_link ); 
     306        $link = esc_url( $event->event_link ); 
    307307    } else { 
    308308        if ( my_calendar_date_xcomp( $event->occur_end, date('Y-m-d',current_time('timestamp') ) ) ) { 
    309             $event_link = ''; 
     309            $link = ''; 
    310310            do_action( 'mc_event_expired', $event ); 
    311311        } else { 
    312             $event_link = esc_url( $event->event_link ); 
     312            $link = esc_url( $event->event_link ); 
    313313        } 
    314314    }    
  • my-calendar/trunk/my-calendar-templating.php

    r865684 r866550  
    5555    } 
    5656 
    57     if ( isset($_POST['mc_details_template'] ) ) { 
     57    if ( isset( $_POST['mc_details_template'] ) ) { 
    5858        $nonce=$_REQUEST['_wpnonce']; 
    5959        if ( !wp_verify_nonce($nonce,'my-calendar-nonce') ) die("Security check failed"); 
  • my-calendar/trunk/my-calendar-widgets.php

    r865684 r866550  
    575575            } 
    576576        } 
    577         $todays_events = apply_filters( 'mc_event_today',$todays_events,$event ); 
     577        $todays_events = apply_filters( 'mc_event_today',$todays_events, $events ); 
    578578        foreach ( $todays_events as $k => $t ) { 
    579579            foreach ( $t as $now ) { 
  • my-calendar/trunk/my-calendar.php

    r865684 r866550  
    175175            <div class="inside"> 
    176176                <ul> 
    177                     <li><strong><a href="<?php echo admin_url("admin.php?page=my-calendar-help"); ?>#get-started"><?php _e("Getting Started",'my-calendar'); ?></strong></a></li>                                
     177                    <li><strong><a href="<?php echo admin_url("admin.php?page=my-calendar-help"); ?>#get-started"><?php _e("Getting Started",'my-calendar'); ?></strong></a></li> 
     178                    <li><strong><a href="<?php echo admin_url("admin.php?page=my-calendar-help"); ?>#mc-generator"><?php _e("Shortcode Generator",'my-calendar'); ?></strong></a></li>                       
    178179                    <li><a href="<?php echo admin_url("admin.php?page=my-calendar-help"); ?>#get-support"><?php _e("Get Support",'my-calendar'); ?></a></li> 
    179180                    <li><a href="<?php echo admin_url("admin.php?page=my-calendar-help"); ?>"><?php _e("My Calendar Help",'my-calendar'); ?></a></li> 
Note: See TracChangeset for help on using the changeset viewer.