[EventCalendar] Display events for specific categories
firetree_ec3 at spamex.com
firetree_ec3 at spamex.com
Sat Nov 3 18:40:09 UTC 2007
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://penguin.firetree.net/pipermail/eventcalendar/attachments/20071103/3a4028da/attachment-0001.htm
More information about the EventCalendar
mailing list