[geeklog-devtalk] What's New Comments Enhancement
Michael Askew
michaelaskew at mac.com
Sat Jan 15 04:57:10 EST 2005
A non-text attachment was scrubbed...
Name: whatsnewcomments_filemgmt.patch
Type: application/octet-stream
Size: 3792 bytes
Desc: not available
Url : <http://eight.pairlist.net/pipermail/geeklog-devtalk/attachments/20050115/a077a700/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: whatsnewcomments-geeklog.patch
Type: application/octet-stream
Size: 11464 bytes
Desc: not available
Url : <http://eight.pairlist.net/pipermail/geeklog-devtalk/attachments/20050115/a077a700/attachment-0001.obj>
-------------- next part --------------
Howdy,
Last April I submitted patches for geeklog and the filemgmt plugin that
enabled the What's New block to display new comments for plugins. The
idea seemed well received but the patches haven't yet made it into the
main geeklog distribution.
Since I have just finished merging geeklog 1.3.11 with my site, I am
submitting updated patches. There work with geeklog 1.3.11 and filemgmt
1.3RC3. The modified files are
geeklog/public_html/docs/plugin.html
geeklog/public_html/lib-common.php
geeklog/system/lib-plugins.html
filemgmt/functions.inc
You can see these changes in action at http://demo.club-lu.net.
Here's a recap of the changes:
* 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : <http://eight.pairlist.net/pipermail/geeklog-devtalk/attachments/20050115/a077a700/attachment.pgp>
More information about the geeklog-devtalk
mailing list