WordPress.org

Support

Support » Plugins and Hacks » WP Calendar » [Resolved] [Plugin: WP Calendar] filter months

[Resolved] [Plugin: WP Calendar] filter months

  • 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

    http://wordpress.org/extend/plugins/wp-calendar/

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(fsev.to)   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 ‘[Resolved] [Plugin: WP Calendar] filter months’ is closed to new replies.
Skip to toolbar