[EventCalendar] v3.1 out soon?

Jørgen Thomsen jt at jorgent.com
Mon Jan 30 03:46:36 UTC 2006


Thanks for helping!

I did what you say, and now it didn't make my website blank, but it 
still says "Not Found" when I click on my events category.. Guess I'll 
just have to wait. Maybe it's because of the theme? Here's the url to my 
site: http://www.jorgent.com/australia

- Jørgen


Aylwin Cal skrev:

> Hi,
>
> I'm using it with 3.0.3 with no problems.  In classes.php, find 
> (around line 660 or so):
>
>              } else {
>                  if (mysql2date('U', $this->posts[0]->post_date_gmt) > 
> mysql2date('U', $now)) { //it's future dated
>                      $this->is_preview = true;
>
> After the line, $this->is_preview = true; insert the following code:
>
>                     /* 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=$ec3->event_category"));
>                         if ($ec3_post_0_is_event) {
>                             $this->is_preview = false;
>                         }
>                     }
>                     if ($this->is_preview)
>                     /* DIRTY FUTURE-POSTS HACK FOR EC3 */
>
> Afterwards, that area of code should look exactly like this:
>
>             } else {
>                 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=$ec3->event_category"));
>                         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 ( );
>                     }
>                 }
>             }
>
> I hope you get it to work.
>
> Aylwin
>
> On 1/30/06, *Jørgen Thomsen* <jt at jorgent.com <mailto:jt at jorgent.com>> 
> wrote:
>
>     Hi.
>
>     I saw that hack, but didn't understand it. I looked at it again
>     now, and
>     tried to replace the suggested code in classes.php with the hack, but
>     then my whole website got blank. But is this hack only for v3.0?
>     On 3.0
>     I got some database problems when I tried to list my events, so I
>     don't
>     know if I'll switch to 3.0.
>
>     - Jørgen
>
>




More information about the EventCalendar mailing list