[EventCalendar] Re: Feature Request?

Damon Timm damontimm at gmail.com
Wed Oct 15 20:49:48 UTC 2008


Here is what I have in my sidebar ... first I create an array with the keys
that I want it to grab and then call a function eventmetadl():

$metatags = array("Location", "Ticket Price", "Contact", "Website");
eventmetadl($post->ID, $metatags);

The function I use just goes through the tags, sees if any of them match the
four I listed, and (if they do) it makes defition lists out of them:

function eventmetadl($postID, $metaArray) {
  $metaList = array(); //this array will hold the keys and the data
  foreach($metaArray as $meta) {
    $metadata = get_post_meta($postID, $meta, true); //for each key, get the
data
    if ($metadata != NULL ) { //if there is data then add that key and that
data to the list
       $metaList["$meta"] = $metadata;
      }
   }
   if ($metaList != NULL) { //if the list has items then create the dl and
fill it up:
      echo "<dl>"; //open the class, etc
      foreach($metaList as $dt => $dd ) { //go through each item and print
them
         echo "<dt>" . $dt . ":</dt><dd>" . $dd . "</dd>";
       }
      echo "</dl>"; // close the divisions
     }
 }

I assume the same could hold true for the ec3 plugin in that it could search
through the posts keys and then export to iCal whichever match the correct
syntax.  I find it pretty easy to use as such.  If I have time I will look
at how the iCal php stuff is written ... maybe I can figure it out.

Damon

On 10/15/08, Samuel Clemance <s_clemance at hotmail.com> wrote:
>
> I can see something like that working Damon.  Custom Fields would work ok
> but I think adding at least location is basic functionality for a calendar
> as almost every calendar now days has that field in it.  I can see the
> ec3_attendees being a sweet function for buddypress and MU ;) but may be a
> lot of work for basic installations?  not sure.  Again I'm not much of a
> programmer.  I would be interested in seeing what you did for your site
> though.  I just noticed that your post title for your events was typically
> the same as the location and assumed they were.
>
> Message: 8
>> Date: Wed, 15 Oct 2008 14:00:45 -0400
>> From: "Damon Timm" <damontimm at gmail.com>
>> Subject: Re: [EventCalendar] Re: Feature Request?
>> To: "Support for EventCalendar plugin" <eventcalendar at firetree.net>
>> Message-ID:
>> <262679b50810151100pa3b782hec9f66ad2cd7c56e at mail.gmail.com>
>> Content-Type: text/plain; charset="utf-8"
>>
>> Do you think the "custom fields" area would be a good place to store these
>> values ?  I know there is a LOT of stuff one can add to any calendar and I
>> like the idea of keeping it as simple as possible -- but if the plugin
>> made available keys like "ec3_location" or "ec3_attendees" it may be an
>> easy
>> way to add additional functionality without burdening the plugin.
>>
>> Is a thought.
>>
>>
>>
>>
>> On 10/15/08, Alex Tingle <alex at firetree.net> wrote:
>>
>>>
>>>
>>> On Oct 15, 2008, at 11:16 AM, Damon Timm wrote:
>>>
>>> Might there be an easy way for the iCal export to look for a "custom
>>>>
>>>>> fields" key of "location" and use that value if it was present ?
>>>>>
>>>>>
>>>> On 15 Oct 2008, at 17:45, Darrell Schulte wrote:
>>>
>>> I like the idea, however, say you have an event called, "Monthly Meeting"
>>>> and it convenes on Jan 1, Feb 2, Mar 3, etc...and they meet in a new
>>>> place
>>>> every month...using custom fields to manage this might become
>>>> problematic.
>>>> If the location didn't change, you could have 12 events in that one post
>>>> --
>>>> pulling the 'location' custom field without issue and as needed. If you
>>>> have
>>>> 12 different locations, you'd have to have 12 posts for each event date
>>>> to
>>>> coincide with each new location. Not very efficient.
>>>>
>>>>
>>> I think that's an acceptable drawback. Having one location per post is:
>>>  a. easier to implement
>>>  b. fits better with other plug-ins
>>>  c. easier to understand
>>>
>>> -Alex
>>>
>>>
>>> _______________________________________________
>>> Blog: http://wpcal.firetree.net/
>>> EventCalendar at firetree.net mailing list
>>> Unsubscribe: http://penguin.firetree.net/eventcalendar
>>>
>>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL:
>> http://penguin.firetree.net/pipermail/eventcalendar/attachments/20081015/8e325025/attachment.html
>>
>> ------------------------------
>>
>> _______________________________________________
>> EventCalendar mailing list
>> EventCalendar at firetree.net
>> http://penguin.firetree.net/cgi-bin/mailman/listinfo/eventcalendar
>>
>>
>> End of EventCalendar Digest, Vol 36, Issue 30
>> *********************************************
>>
>>
> _______________________________________________
> Blog: http://wpcal.firetree.net/
> EventCalendar at firetree.net mailing list
> Unsubscribe: http://penguin.firetree.net/eventcalendar
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://penguin.firetree.net/pipermail/eventcalendar/attachments/20081015/92eac2b8/attachment.htm


More information about the EventCalendar mailing list