[EventCalendar] Returning current view in calendar

Alex Tingle alex at firetree.net
Mon Apr 9 23:17:26 UTC 2007


Hi Jay,

On Mon, 9 Apr 2007 17:25:40 -0500
"Jay Packer" <toxostoma at hotmail.com> wrote:

> Alex, I appreciate the response but am very unclear on what you're referring
> to...
> 
> How do I use ec3_filter_posts_where() in conditional logic to ascertain my
> location?

No no. I was suggesting that you examine its CODE.


> I think I've asked my questions rather poorly (especially by sending two
> emails). I apologize.
> 
> All I'm trying to do is have a the mini calendar in my left navigation, and
> then the events listed in the main content area. I understand very well how
> to take advantage of wordpress's template system to make the pages display
> differently when I'm on the calendar.
> 
> The only two things I haven't been able to figure out are:
> 
> 1) How to determine my location (which is relatively minor in the grand
> scheme of things) and
> 
> 2) How to print out a full list of the events. If I use Wordpress's
> templates to print out the events, I need to allow for a much higher number
> of "posts" (events) to be printed out on the page than is set in under
> Options / Reading of the admin area at the "Show at Most" field.

Can't you just change this "number of posts" on the fly? You'd need to
intercept an early action. "parse_query" would do.


> If I use the ec3_get_events(), then I've got to have a way of passing in the
> right parameters if someone's looking at the upcoming events (their initial
> view when arriving at the calendar, or a particular month or single day (if
> they've clicked on one in the mini calendar).

Don't use ec3_get_events(), it's not very flexible. Use a custom query
by vallong WP's query_posts() function. Put 'query_posts' into the
search box at http://wpcal.firetree.net/ to get lots of examples.

-Alex

--


> -----Original Message-----
> From: eventcalendar-bounces at firetree.net
> [mailto:eventcalendar-bounces at firetree.net] On Behalf Of Alex Tingle
> Sent: Monday, April 09, 2007 4:06 PM
> To: Support for EventCalendar plugin
> Subject: Re: [EventCalendar] Returning current view in calendar
> 
> Hi Jay,
> 
> Look at function ec3_filter_posts_where() in eventcalendar3.php. There
> is a global object called $ec3 - all of the parameters are member
> variables.
> 
> You might also need to look at the WP global $wp_query.
> 
> -Alex
> 
> --
> 
> On Mon, 9 Apr 2007 09:38:31 -0500
> "Jay Packer" <toxostoma at hotmail.com> wrote:
> 
> > Hi, I'm trying to implement the event calendar in Wordpress which I'm
> using
> > as a CMS (not just a standard blog). 
> > 
> >  
> > 
> > I'm trying to figure out how to write a little PHP code that can tell me
> > where I am (what dates I'm viewing) within the calendar.
> > 
> >  
> > 
> > In pseudocode, I'm essentially wanting to do this:
> > 
> >  
> > 
> > if (we're looking at an entire month) {
> > 
> >             print 'Calendar - Events in April 2007'
> > 
> > } else if (we're looking at a specific day) {
> > 
> >             print 'Calendar - Events on April 3, 2007
> > 
> > } else {
> > 
> >             print 'Calendar - Upcoming Events
> > 
> > }
> > 
> >  
> > 
> > There are probably other things I'll want to do with this besides just
> > printing out the date, but first I've got to know how to figure out where
> I
> > am. I thought about analyze the query string that gets pass through to the
> > calendar, but it didn't seem to be consistent and I wasn't sure about the
> > best way to achieve this.
> > 
> >  
> > 
> > Can anyone provide any insight?
> > 
> >  
> > 
> > Thanks.
> > 
> >  
> > 
> > Jay
> > 
> >  
> > 
> >  
> > 
> >  
> > 
> 
> 
> -- 
> :: Let me solve your problems: http://www.firetree.net/consulting/
> :: 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


-- 
:: Let me solve your problems: http://www.firetree.net/consulting/
:: alex.tingle AT firetree.net  +44-7901-552763 



More information about the EventCalendar mailing list