[EventCalendar] Display events for specific categories

Matthew Middleton mailinglists at zzxc.net
Sat Nov 3 21:57:34 UTC 2007


Actually, you would want to use the latest patch
(patch 4), which is also on the mailing list archives.
 Most likely, you would want to download the complete
zip file, rather than attempting to patch the correct
revision.  This patch sorts events by event time
rather than post time, adds support for a "big
calendar", and adds category filtering options.

I will be sending an updated patch synchronized to the
latest head revision soon - I have been too busy
recently to work on it.  This patch will be cleaned up
and should fix some bugs in patch #4.

I am also working on an extension to add related
advanced calendar functionality useful to non-blog
websites - see my previous messages for information on
this.  This will be a separate extension that requires
eventcalendar3 to operate.

-Matthew


--- firetree_ec3 at spamex.com wrote:

> Actually, the one you want is here:
> 
>
http://penguin.firetree.net/pipermail/eventcalendar/2007-October/
> 
> 002583.html
> 
> This was where he added the category sort.
> 
> On Nov 3, 2007, at 2:40 PM, firetree_ec3 at spamex.com
> wrote:
> 
> > * Replies will be sent through Spamex to
> eventcalendar at firetree.net
> > * For additional info click ->
> www.spamex.com/i/?v=17832931
> >
> > Here is where Matthew announced his patch:
> >
> >
>
http://penguin.firetree.net/pipermail/eventcalendar/2007-October/
> 
> > 002559.html
> >
> > On Nov 3, 2007, at 2:19 PM, Benoît Gréant wrote:
> >
> >> Okay. And where can I found that mod ??
> >>
> >> 2007/11/3, firetree_ec3 at spamex.com
> <firetree_ec3 at spamex.com >:
> >> Oh, dear. I guess these were added by Matthew
> when he did his "big  
> >> page" mod. That is actually a separate branch
> that I don't think  
> >> ever made it into the main trunk.
> >>
> >> Sorry.
> >>
> >> On Nov 3, 2007, at 1:51 PM, Benoît Gréant wrote:
> >>
> >>> Ok, thanks for your reply but I don't have any
> filter_categories  
> >>> in my function :
> >>>
> >>> function ec3_get_events(
> >>>   $limit,
> >>>   $template_event=EC3_DEFAULT_TEMPLATE_EVENT,
> >>>   $template_day  =EC3_DEFAULT_TEMPLATE_DAY,
> >>>   $date_format   =EC3_DEFAULT_DATE_FORMAT,
> >>>   $template_month=EC3_DEFAULT_TEMPLATE_MONTH,
> >>>   $month_format  =EC3_DEFAULT_MONTH_FORMAT)
> >>>
> >>> Is it something I have to add ???
> >>> I'm running EC3.10.
> >>>
> >>> Thanks !!!
> >>> Benoît
> >>>
> >>>
> >>> 2007/11/3, firetree_ec3 at spamex.com
> <firetree_ec3 at spamex.com>:
> >>> Sadly, I don't know if you'll get much help from
> posting in the  
> >>> WP forums. I've found that well to be pretty
> much dry. I don't  
> >>> think I've ever gotten one single helpful
> response there in a  
> >>> couple of years of trying. This list is probably
> the best place  
> >>> to look.
> >>>
> >>> Here's how I find out how to do these types of
> things. I learned  
> >>> this by trying to use the WP docs. I usually
> need to go to the  
> >>> code and find out for myself.
> >>>
> >>> The file you want to look at is
> "template-functions.php".
> >>>
> >>> This is where the "ec3_get_events()" function is
> declared:
> >>>
> >>>> function ec3_get_events(
> >>>>   $limit,
> >>>>   $filter_categories = '',
> >>>>   $template_event=EC3_DEFAULT_TEMPLATE_EVENT,
> >>>>   $template_day  =EC3_DEFAULT_TEMPLATE_DAY,
> >>>>   $date_format   =EC3_DEFAULT_DATE_FORMAT,
> >>>>   $template_month=EC3_DEFAULT_TEMPLATE_MONTH,
> >>>>   $month_format  =EC3_DEFAULT_MONTH_FORMAT)
> >>>
> >>> This tells me that the syntax you are using will
> not filter the  
> >>> category (I assume that 5 is the category?). It
> will display all  
> >>> categories for 5 entries.
> >>>
> >>> The first parameter is a limit (the default is
> 5, if it is left  
> >>> empty or at 0). This is actually kinda nice,
> because you can  
> >>> specify something like "3 days", and you will
> get 3 days' worth  
> >>> of events, regardless of how many events are in
> there. If you  
> >>> just specify "3", then you only get the next 3
> events.
> >>>
> >>> The FOLLOWING parameter is the filter
> categories, so you need to  
> >>> specify something in the $limit parameter, even
> if it is '' or null.
> >>>
> >>> So, say you wanted 2 days' worth of events in
> categories 3 and 5,  
> >>> the query would be thus:
> >>>
> >>> ec3_get_events('2 days', '3,5');
> >>>
> >>> or the default (5 events) for the same two
> categories:
> >>>
> >>> ec3_get_events('', '3,5');
> >>>
> >>> I hope this helps. I don't actually do this
> myself (yet), so Alex  
> >>> can correct any mistakes I may have made.
> >>>
> >>> Chris
> >>> On Nov 3, 2007, at 9:20 AM, Benoît Gréant wrote:
> >>>
> >>>> Hello, I still can't limit the query to a
> specific category...
> >>>> Could you explain please ???
> >>>> I made a post here :
> http://wordpress.org/support/topic/141146? 
> >>>> replies=3
> >>>>
> >>>> 2007/10/31, Benoît Gréant <
> gordie.lachance at gmail.com>:
> >>>> Hi Alex, OK but I don't understand how to do
> this.
> >>>> Here is my actual code in the sidebar
> >>>>
> >>>> <?php ec3_get_events(5); ?>
> >>>>
> >>>> I would like, for example, restrict the events
> to the cat#3.
> >>>>
> >>>> Thanks !
> >>>>
> >>>> 2007/10/31, Alex Tingle < alex at firetree.net>:
> >>>>
> >>>> On 31 Oct 2007, at 12:20, Benoît Gréant wrote:
> >>>>
> >>>> > Hello, is it possible to display in my
> template only events in  
> >>>> the
> >>>> > current
> >>>> > category ?
> >>>>
> >>>> Use a custom query, with something like...
> ec3_after=today&cat=3
> >>>>
> >>>> -Alex
> >>>>
> >>>> --
> >>>> :: Let me solve your problems:
> http://www.firetree.net/alex/
> >>>> :: alex.tingle AT firetree.net  +44-7901-552763
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>> Blog: http://wpcal.firetree.net/
> >>>> EventCalendar at firetree.net mailing list
> >>>> Unsubscribe:
> http://penguin.firetree.net/eventcalendar
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>> Blog: http://wpcal.firetree.net/
> >>>> EventCalendar at firetree.net mailing list
> >>>> Unsubscribe:
> http://penguin.firetree.net/eventcalendar
> >>>
> >>> catchall account
> >>>
> >>>
> >>> _______________________________________________
> >>> Blog: http://wpcal.firetree.net/
> >>> EventCalendar at firetree.net mailing list
> >>> Unsubscribe:
> http://penguin.firetree.net/eventcalendar
> >>>
> >>>
> >>> _______________________________________________
> >>> Blog: http://wpcal.firetree.net/
> >>> EventCalendar at firetree.net mailing list
> >>> Unsubscribe:
> http://penguin.firetree.net/eventcalendar
> >>
> >> catchall account
> >>
> >>
> >> _______________________________________________
> >> Blog: http://wpcal.firetree.net/
> >> EventCalendar at firetree.net mailing list
> >> Unsubscribe:
> http://penguin.firetree.net/eventcalendar
> >>
> >>
> >> _______________________________________________
> >> Blog: http://wpcal.firetree.net/
> >> EventCalendar at firetree.net mailing list
> >> Unsubscribe:
> http://penguin.firetree.net/eventcalendar
> >
> > catchall account
> >
> > _______________________________________________
> > Blog: http://wpcal.firetree.net/
> > EventCalendar at firetree.net mailing list
> > Unsubscribe:
> http://penguin.firetree.net/eventcalendar
> 
> catchall account
> 
> > _______________________________________________
> Blog: http://wpcal.firetree.net/
> EventCalendar at firetree.net mailing list
> Unsubscribe:
> http://penguin.firetree.net/eventcalendar
> 






More information about the EventCalendar mailing list