[geeklog-devtalk] geeklog-devel digest, Vol 1 #487 - 2 msgs

Dirk Haun dirk at haun-online.de
Mon Jan 31 15:25:19 EST 2005


Michael,


>I notice that the 'info' option of PLG_handleTrackbackComment is nearly

>identical to the function I created to return info to the What's New

>block (see Feature Request 366, and accompanying patch file). For this

>reason, why not spike that functionality out into its own plugin API

>function and let it serve both roles?


Still haven't really looked at your patch, but just FYI: I've changed
that API function yet again now and made it more generic:

/**
* Ask plugin for information about one of its items
*
* @param string $type plugin type
* @param string $id ID of an item under the plugin's control
* @param string $what comma-separated list of item properties
* @return mixed string or array of strings with the
information
*
* Item properties that can be requested:
* 'url' - URL of the item
* 'title' - title of the item
* 'excerpt' - short description of the item
* 'description' - full description of the item
*
* 'excerpt' and 'description' may return the same value. Properties should be
* returned in the order they are listed in $what. Properties that are not
* available should return an empty string.
* Return false for errors (e.g. access denied, item does not exist, etc.).
*
* Note: This API function has not been finalized yet ...
*
*/
function PLG_getItemInfo ($type, $id, $what)

And I just noticed that there's a property missing: 'feed', to ask for
the URL to a feed that the plugin may publish.

I've made an accompanying function for stories, STORY_getItemInfo, which
takes the same parameters ($id and $what).

bye, Dirk


--
http://www.haun-online.de/
http://www.handful-of-sparks.de/




More information about the geeklog-devtalk mailing list