Using multiple categories in EventCalendar3 for WordPress (update 1)

By | June 11, 2006

wp-includes/classes.php line 679-702, for the Events listed outside of the Event category

if (mysql2date('U', $this->posts[0]->post_date_gmt) > mysql2date('U', $now)) { //it's future dated
	$this->is_preview = true;

	/* DIRTY FUTURE-POSTS HACK FOR EC3 */
    if (function_exists('ec3_get_calendar')) {
        global $ec3;
        $ec3_post_0_is_event = intval($wpdb->get_var(
            "SELECT COUNT(0) FROM $wpdb->post2cat WHERE post_id="
            .$this->posts[0]->ID." AND category_id IN ('$ec3->event_category','14')"));

        if ($ec3_post_0_is_event) {
            $this->is_preview = false;
        }
    }
    if ($this->is_preview)
    /* DIRTY FUTURE-POSTS HACK FOR EC3 */
	if (!current_user_can('edit_post', $this->posts[0]->ID)) {
		$this->posts = array ( );
	}
}

eventcalendar3.php line 1048

$post_list=$wpdb->get_results(
  "SELECT DISTINCT(post_id) FROM $tablepost2cat " .
  "WHERE category_id IN ('$ec3->event_category','14')" );

One thought on “Using multiple categories in EventCalendar3 for WordPress (update 1)

  1. simon

    hi

    i have tried your hacks as above & on your previous post, but i just cannot get it to work.

    whatever i try, the only future posts that will show up, are those in the category i select on the options page.

    do you have any idea why this might be?

    thanks!
    simon

    p.s. for some reason i cannot see any of the reponses on your blog, although it says there are 5…

Leave a Reply

Your email address will not be published. Required fields are marked *

Comment moderation is enabled. Your comment may take some time to appear.

This site uses Akismet to reduce spam. Learn how your comment data is processed.