[EventCalendar] Re: Feature Request?

Alex Tingle alex at firetree.net
Wed Oct 15 22:53:05 UTC 2008


Damon Timm wrote:
> So I put my money where my mouth is -- it seems to work fine.
> 
> Am attaching the patch file or you can see it at:
> 
> http://plugins.trac.wordpress.org/changeset/69097
> 
> Basically, if you have a key of 'ec_location' in a post (event calendar
> post, of course) that value will be exported to iCal.  Try it out and let me
> know if it works for you.  We could add other iCal related information in
> this fashion very easily.

That's a great start. How about this...

  $location=get_post_meta($entry->post_id,'location',true);
  $location=apply_filters('ical_location',$location);
  if(!empty($location))
    echo "LOCATION:$location\r\n"; // need to escape this

  $geo=get_post_meta($entry->post_id,'geo',true);
  $geo=apply_filters('ical_geo',$geo);
  if(!empty($geo))
    echo "GEO:$geo\r\n"; // need to escape this

That allows users to set 'location' or 'geo' (that's lat,long) custom fields.
Other plug-ins can then intercept the ical_location & ical_geo filters, to add
their own (presumably more sophisticated) data.

We could go to all the geo plug-ins that Peter found, and suggest that they
implement the filters:
http://www.hyperlocalblogger.com/8-wordpress-plugins-for-hyperlocal-bloggers/

I prefer straight "human readable" names (particularly 'location') because we
are going to be asking users to interact with them. AND because I don't think
it's likely that we'll have a conflict - if any other plugin uses the same
name, it's highly likely that the data is going to be suitable for us too.

-Alex

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://penguin.firetree.net/pipermail/eventcalendar/attachments/20081015/ad13860c/signature.pgp


More information about the EventCalendar mailing list