[geeklog-devtalk] Plugin What's New Enhancement

Michael Askew michaelaskew at mac.com
Fri Apr 16 16:32:39 EDT 2004


A non-text attachment was scrubbed...
Name: whats_new_geeklog.patch2
Type: application/octet-stream
Size: 11209 bytes
Desc: not available
Url : <http://eight.pairlist.net/pipermail/geeklog-devtalk/attachments/20040416/c88e12ef/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: whats_new_bug_fix.patch
Type: application/octet-stream
Size: 1388 bytes
Desc: not available
Url : <http://eight.pairlist.net/pipermail/geeklog-devtalk/attachments/20040416/c88e12ef/attachment-0001.obj>
-------------- next part --------------


Well as soon as I applied that patch to a site with more than one poll
and more than one story a rather obvious problem surfaced: I had left
some important SQL clauses out of the new COM_whatsNewBlock function
which had me selecting entire tables and not specific rows. Oops.

"whats_new_geeklog.patch2" is a replacement for earlier Geeklog patch.
"whats_new_bug_fix.patch" contains this bug fix only.

-Michael

On Apr 13, 2004, at 8:43 AM, Blaine Lang wrote:


> 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

>>

>>

>

>

> _______________________________________________

> geeklog-devtalk mailing list

> geeklog-devtalk at lists.geeklog.net

> http://lists.geeklog.net/listinfo/geeklog-devtalk

>



More information about the geeklog-devtalk mailing list