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

PHP:
  1. if (mysql2date('U', $this->posts[0]->post_date_gmt)> mysql2date('U', $now)) { //it's future dated
  2.     $this->is_preview = true;
  3.    
  4.     /* DIRTY FUTURE-POSTS HACK FOR EC3 */
  5.     if (function_exists('ec3_get_calendar')) {
  6.         global $ec3;
  7.         $ec3_post_0_is_event = intval($wpdb->get_var(
  8.             "SELECT COUNT(0) FROM $wpdb->post2cat WHERE post_id="
  9.             .$this->posts[0]->ID." AND category_id IN ('$ec3->event_category','14')"));
  10.            
  11.         if ($ec3_post_0_is_event) {
  12.             $this->is_preview = false;
  13.         }
  14.     }
  15.     if ($this->is_preview)
  16.     /* DIRTY FUTURE-POSTS HACK FOR EC3 */
  17.     if (!current_user_can('edit_post', $this->posts[0]->ID)) {
  18.         $this->posts = array ( );
  19.     }
  20. }

eventcalendar3.php line 1048

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


One Response to “Using multiple categories in EventCalendar3 for WordPress (update 1)”  

  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