[EventCalendar] FW: Event date and box

Alex Tingle alex at firetree.net
Fri Sep 15 22:47:47 UTC 2006


Hi Kris,

the_time() Gives you the date the event was *posted*. That's not what
you want. You want the *schedule* date(s).

You need to call <?php echo ec3_get_schedule(...); ?>. Here's it's
definition:

function ec3_get_schedule(
  $format_single='<tr><td colspan="3">%s</td></tr>',
  $format_range="<tr><td class='ec3_start'>%1\$s</td><td class='ec3_to'>%3\$s</td><td class='ec3_end'>%2\$s</td></tr>",
  $format_wrapper='<table class="ec3_schedule">%s</table>'
)

As you can see, the default parameters build a
<table class="ec3_schedule">. You can play around with them to make any
HTML you like.

Here are notes on the 3 parameters:

 format_single: Used for single dates.
   %s stands for the date/time.
 format_range: Used for a start->end date range.
   %1$s stands for the start date
   %2$s stands for the end date
   %3$s stands for the word 'to'
 format_wrapper: Always wraps the whole thing.
   %s stands for the lists of schedules (each one is a single or range)

So for example, if you want the default table, you call: ec3_get_schedule()

If you want an ordered list (caveat: not actually tested)...

 ec3_get_schedule('<li>%s</li>','<li>%1$s %3$s %2$s</li>','<ol>%s</ol>')

-Alex

--

On Fri, 15 Sep 2006 18:33:22 -0400
"Kris Rhoades" <info at thewellministries.org> wrote:

> That solved one problem but I had listed two, sorry for not making it clear.
> (Door number 2 was the easiest and worked great.)
> 
> How and where do I get the date and time of the event now posted within the
> posting? I've tried adding <the_time('F jS, Y')> within the loop but it will
> only print today's date. FYI, on dates that are already past, the date
> prints fine using the above code. (click more dates a few times to get to
> the past dates to see what I mean.)
> 
> Thanks,
> Kris
> 
> 
> > -----Original Message-----
> > From: Alex Tingle [mailto:alex at firetree.net]
> > Sent: Friday, September 15, 2006 6:18 PM
> > To: eventcalendar at firetree.net
> > Subject: Re: [EventCalendar] FW: Event date and box
> > 
> > Kris,
> > 
> > You've not described your problem very well. Looking at your site I
> > think you want to get rid of the box that shows the date and time within
> > each even post. You can do that in two ways:
> > 
> > 1. Remove the filter.
> > 
> > Add the following code somewhere at the top of templates (like
> > index.php, archive.php, single.php) where you don't want to see the
> > schedule boxes:
> > 
> >  <?php remove_filter('the_content','ec3_filter_the_content'); ?>
> > 
> > 2. Just change the style
> > 
> > The boxes are <table class="schedule">. So you can hide them with this
> > CSS:
> > 
> >  table.ec3_schedule { display: none !IMPORTANT }
> > 
> > Or you can change the appearance in other more subtle ways.
> > 
> > Hope that helps.
> > 
> > -Alex
> > 
> > --
> > 
> > On Fri, 15 Sep 2006 17:57:38 -0400
> > "Kris Rhoades" <info at thewellministries.org> wrote:
> > 
> > > I've enjoyed your plugin for quite some time and today felt brave enough
> to
> > > upgrade when I created a new site. But I'm having some troubles and
> can't
> > > seem to find where to make the changes.
> > >
> > >
> > >
> > > This part of my site is strictly a calendar/event site. (Of course it's
> > > still in the works for layout but I've hit a brick wall)
> > >
> > > I would like to get rid of the box with the date and time and have it in
> the
> > > post itself. (It interferes with artwork I use)
> > >
> > >
> > >
> > > I've tried adding <the_time('F jS, Y')> within the loop but it will only
> > > print today's date.
> > >
> > >
> > >
> > > The site is www.thewellministries.org/schedule if you care to have a
> look
> > > for yourself.
> > >
> > >
> > >
> > > Kris Rhoades
> > >
> > > www.thewellministries.org <http://www.thewellministries.org/>
> > >
> > >
> > >
> > >
> > >
> > 
> > 
> > --
> > :: Let me solve your problems: http://www.firetree.net/consulting/
> > :: alex.tingle AT firetree.net  +44-7901-552763
> > 
> > _______________________________________________
> > EventCalendar mailing list
> > 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


-- 
:: 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