Hey. I want to make a patch for ticket #1394 so post info fields can be filtered with plugins.
Example why that makes sense: I'm really into the events content type. The eventdate I added contains multiple dates (start and end), stored as unix timestamps in the format start;end. I need to convert them to two human readable dates in the format Start - End. I'd like to do that using $post->info->eventdate_out That is not possible because filters like filter_post_eventdate_out and similar don't do anything. There is nothing in inforecords.php or postinfo.php that calls filters. I think I know how to implement that, but to make sure, it would be nice if someone confirms the following about Post::__get. Line 696 is an array with fields that are not meant to be filtered... and then 697-703 split the given $name into the name and the filtername, if the field is enabled for filtering... e.g. content_out is requested, so those lines would make $name = "content" and $filter ="out". The switch gets the value itself, then the general post_get filter is called, then the filter for the requested value and then the filter for the value's filter (out, in my example). So for $post- >content_out there are hooks called for all the post fields, the post content in general and finally for content_out. We already talked about that in IRC, you can find it here (right before the pointer): http://drunkenmonkey.org/irc/habari/2011-01-10#T01-32-07 Post::__get needs better documentation. Regards, Konzertheld -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/habari-dev
