[EventCalendar] Re: 404 errors when not logged in.

miri miri at miriland.com
Mon Jan 16 02:01:42 UTC 2006


Woohooo! It works for me too. Thanks, guys.

At 11:55 PM 1/14/2006, Aylwin Cal wrote:
>Hi everyone,
>
>I've tried this hack and can confirm that it works!
>
>Thanks, Norman!
>
>Aylwin
>
>On 1/11/06, blahalt <<mailto:blahalt at gmail.com> blahalt at gmail.com> wrote:
>hi there,
>
>i have tested the hack from Dr. Peter Troxler (thanks for the hint!)
>and it works for me!
>
>- ec.3.0.3
>- wp.2.0
>- "events-are-normal-posts"
>
>i only need to show "future"-posts from the event category, so i
>improve the hack from Dr. Troxler to show only these posts.
>
>the hack is dirty, i know, but i can't wait for 3.1 :-) if you want
>to show all future-posts to users not logged in (not only posts belongs
>to event-category) the hack from Dr. Troxler should be fine for you.
>
>
>here's what to change:
>
>in wp-includes/classes.php near line 664 replace:
>----------------------------------------------------------------------------
>------------------------
>if (mysql2date('U', $this->posts[0]->post_date_gmt) > mysql2date('U', $now))
>{ //it's future dated
>         $this->is_preview = true;
>         if (!current_user_can('edit_post', $this->posts[0]->ID)) {
>                 $this->posts = array ( );
>         }
>}
>----------------------------------------------------------------------------
>------------------------
>
>with:
>----------------------------------------------------------------------------
>------------------------
>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 */
>         $ec3wp20hack_ec3cat = get_option('ec3_event_category');
>         $ec3wp20hack_postid = $this->posts[0]->ID;
>         $ec3wp20hack_postcat = $wpdb->get_var("SELECT category_id FROM
>`wp_post2cat` WHERE post_id = $ec3wp20hack_postid");
>         if ((isset($ec3wp20hack_ec3cat)) AND ($ec3wp20hack_ec3cat !=
>$ec3wp20hack_postcat)) {
>                 $this->posts = array();
>         }
>         /* DIRTY FUTURE-POSTS HACK FOR EC3 */
>}
>----------------------------------------------------------------------------
>------------------------
>
>thats all.. anybody has another hack?
>
>ah.. backup your files & database and use it at your own risk..
>
>
>thanks a lot for one of the greatest wordpress plugins, Alex!!!!
>
>
>greetz! norman..
>
>
>
>_______________________________________________
>EventCalendar mailing list
><mailto:EventCalendar at firetree.net>EventCalendar at firetree.net
>http://penguin.firetree.net/cgi-bin/mailman/listinfo/eventcalendar
>
>
>_______________________________________________
>EventCalendar mailing list
>EventCalendar at firetree.net
>http://penguin.firetree.net/cgi-bin/mailman/listinfo/eventcalendar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://penguin.firetree.net/pipermail/eventcalendar/attachments/20060115/04044610/attachment.html


More information about the EventCalendar mailing list