[geeklog-devtalk] Plugin What's New Enhancement
Blaine Lang
geeklog at langfamily.ca
Tue Apr 13 09:43:56 EDT 2004
Hi Michael,
Thanks for your feedback and contributed code. Dirk and I have been talking
about this as well.
I hit this issue when I was putting together the beta for the new filemgmt
plugin verison. My intent was to come back and revist this as I saw the same
issue but only had time to use the API as it was for the RC1 of the plugin.
You will have saved us some time as other pluguins are starting to use the
comments feature now.
Dirk and I still need to review your code and approach and if all is well,
we can add this in for the next release.
Thanks again for your feedback and contribution.
Regards,
Blaine
----- Original Message -----
From: "Michael Askew" <michaelaskew at mac.com>
To: <geeklog-devtalk at lists.geeklog.net>
Sent: Saturday, April 10, 2004 12:24 AM
Subject: [geeklog-devtalk] Plugin What's New Enhancement
> Howdy,
>
> I've been getting ready to install geeklog 1.3.9 and filemgmt 1.3 RC2
> on my site (club-lu.net). I'm thrilled about the What's New block's
> plugin support but I thought it looked kind of awkward having the
> comments for plugin objects (e.g. files) under the plugin's heading
> instead of the "COMMENTS" heading.
>
> So I decided to try enhancing the plugin interface a bit to support
> showing comments on plugin objects. I like the way it turned out. I've
> added support for these features to the filemgmt and geekary plugins.
>
> Patches are attached; the affected files are lib-common.php and
> lib-plugins.php (geeklog), and functions.inc (filemgmt, geekary). To
> see full copies of the changed files you can download the tarball of my
> sites code at
>
> http://demo.club-lu.net/filemgmt/singlefile.php?lid=1
>
> You can also see the new code in action there. Please let me know what
> you think. I would appreciate it if you would roll the geeklog changes
> into the official geeklog distribution.
>
> Here's an explanation of, err, What's New:
>
> * A new plugin API function has been added; it's called
> "plugin_getwhatsnewcommentsinfo_{pi_name}". It takes one argument, the
> id of an item that has new comments (the "sid" column from the comments
> table) and returns a two item array consisting of a name for the item
> and the URL for the item. If for some reason (permissions problems,
> configuration options) the items new comments should not be shown the
> function should return false.
>
> * The COM_whatsNewBlock function now selects all new comments (grouped
> by sid and type) for plugins that support the What's New comment
> section (plus those for articles and polls); for each one it asks the
> appropriate plugin for the name and URL of the item the comments apply
> to, and if appropriate, adds the item to the list of recent comments.
> When 15 items with new comments have been found it stops.
>
> * Two new functions were added to lib-plugins.php to build a list of
> plugins supporting the What's New comment section and to call the
> getWhatsNewCommentInfo function for a given plugin.
>
> -Michael Askew
>
>
More information about the geeklog-devtalk
mailing list