Support » Plugin: WP Calendar » [Plugin: WP Calendar] filter months

  • Resolved dsg257


    how can i change this code in the fsCalendarAdmin.php file to show future months

    <select name="event_start">
    					<option value="-1"<?php echo (!isset($filter['datefrom']) ? ' selected="selected"' : ''); ?>><?php _e('Show all dates', fsCalendar::$plugin_textdom); ?></option>
    					<option value="0"<?php echo (isset($filter['datefrom']) && !isset($filter['dateto']) ? ' selected="selected"' : ''); ?>><?php _e('Show future dates only', fsCalendar::$plugin_textdom); ?></option>

    I have loads of events min 19 per month and in the dashboard filtering by category does not reduce the amount filtering by month would filter them to a manageable size to find the correct event to edit

    any help sugestions welcome

Viewing 1 replies (of 1 total)
  • Managed to get this fixed
    with the help of vtxyzzy

    i wanted the dropdown to show future months and after finding the code that controlled it in fsCalendarAdmin.php
    i asked Mac for help the code should have shown months but the to and from were stopping it
    The lines Before are

    $min = $wpdb->get_var('SELECT MIN(from) AS min FROM '.$wpdb->prefix.'fsevents');
    $max = $wpdb->get_var('SELECT MAX(to)   AS max FROM '.$wpdb->prefix.'fsevents');

    These were changed to

    $min = $wpdb->get_var('SELECT MIN(fsev.from) AS min FROM '.$wpdb->prefix.'fsevents fsev');
    $max = $wpdb->get_var('SELECT MAX(   AS max FROM '.$wpdb->prefix.'fsevents fsev');

    This basically just forced MySQL to recognize ‘from’ and ‘to’ as field names rather than reserved words by using a table alias.

    Hope this helps someone else

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WP Calendar] filter months’ is closed to new replies.