From: Chris W. <ch...@cw...> - 2003-07-21 15:37:17
|
Andrew Hurst wrote: > ... > quick, you can do it however you like. And we can probably open source > it as well") But we can't make any promises until its actually released > back to the community, of course ;) It would be great, but I know that uphill battle that can be... > ... > I seem to recall you (Chris) talking about the comment module being able > to attach to any object in the system, which is why I thought this way > might work well. Is that the case? Correct. It really just treats the object as a class + ID pair and then uses that as an organizational point. Kind of like the ID for a thread beginning, but more useful so you can find all the comments for an object with a component call: [% OI.comp( 'show_comment_by_object', object = news ) %] For instance, I have the preceding on all 'news' objects on my website. And a few 'page' objects I have it as well, such as some random thoughts about matrix stuff. That call looks like: [% OI.comp( 'show_comment_by_object', object = page ) %] You can, of course, get all this data programmatically as well. This way of working has always been part of OI but rarely explicit. With OI2 I think I'll include the 'comments' and 'object_link' packages which take advantage of this functionality. The 'object_link' package just adds a layer of topics so you can link any two arbitrary objects (pages, news items, recipes, movie reviews, external links, etc.) by a topic and get a useful 'Related Items' listing of them. > I will also need to add some features to the comment mechanism like > topics for the comments, ability for a logged in user to only see their > own comments, and a display of only comments in topics a person has > permission for. Cool! Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |