[EventCalendar] Re: [firetree.net] Comment: "EventCalendar 3.1 Beta"

David Nutter dnutter at hemswell.lincoln.ac.uk
Sat Sep 2 20:49:53 UTC 2006


On Fri, Sep 01, 2006 at 07:38:03AM +0100, Alex Tingle wrote:
> David Nutter wrote:

*snip* 

> > 1) Some of the formats in ec3_get_schedule() don't work as the
> > strings cannot be interpolated due to single quotes (format_row
> > and format_single). Easy to fix.
> 
> I'm not sure I understand your meaning. Can you send a patch, or an
> example?

Using the original definition of format_row:

$format_row='<tr><td>%1\$s</td><td>%3\$s</td><td>%2\$s</td></tr>'

the escaping of $ did not occur due to the single quotes thus sprintf
couldn't find any parameters to substitute. You can see an example 
here:

http://cartman.electricsnail.org/~david/xfer/interpolate.php

As a consequence of other changes, this has been fixed so not to
worry.

> 
> ec3_get_schedule() & ec3_the_schedule() are not documented. Perhaps they
> should be.

Hopefully my planned README patch will take care of that.


> > 3) Using ec3_the_schedule() in a template seems a better way of printing
> > the schedule than hooking into 'filter_posts' but puts a bit of extra
> > load on the user as they have to edit their template code.  I'm going to
> > make this into a config option for my own use; do you want the patch
> > when I'm done? 
> 
> Yes please send me patches.
> 
> Having said that, I'm not sure about this one - I want to minimise the
> number of config options. You are proposing a config option that
> disables the 'the_content' filter? If that's only going to be used by
> people who are writing their own template, then ptemplatey would be
> better off just removing the filter in their heait>
> >('the_content','ec3_filter_the_content');
> 
> What do you think?

On reflection, since the plugin already requires some template editing
to insert the necessary calendar elements it probably isn't necessary
to have this as an explicit config option. 
 
> > 4) The upgrade step resets the dates of all the event posts. While
> > the end result is more sensible, this causes a problem for users like
> > me who use date-based permalinks which end up broken after the
> > upgrade. A warning in the README to that effect would be good so
> > affected users can comment out the relevant code.
> 
> Good point. I'd appreciate a patch for the README.
> 
> I'm not sure there's any way round this problem, though.

At least it's only a one-time issue now that eventcalendar has
its own DB table and even (eventually) self-correcting as thanks to
the natural passge of time. 

As mentioned above I'll make some changes to the Readme and make a
patch available.

Regards,

-- 
David Nutter <dnutter at lincoln.ac.uk>	Research Assistant
MHAC MC3102, Brayford Pool Campus
University Of Lincoln, 
LN6 7TS



More information about the EventCalendar mailing list