Posted by Brentnauer on February 23, 2009 at 10:30pm
Jump to:
| Project: | OpenCalais |
| Version: | 6.x-3.0 |
| Component: | Miscellaneous |
| Category: | feature request |
| Priority: | normal |
| Assigned: | febbraro |
| Status: | closed (works as designed) |
Issue Summary
How difficult and/or practical would it be to include comments posted to nodes?
Say someone begins a forum thread with very little tag-able content, but the ensuing discussion is filled with it. I think it would be helpful to include this content in the tagging process.
Is this currently possible?
Comments
#1
It currently does not work this way, but could be updated to configurably allow for that to happen. Although, ideally there would be a hook that allows for editing of the content before it sets sent off to Calais, that way anyone could hook in and add whatever they wanted to the document.
I wonder how adding and tagging based off of comments would effect "editorial" control of the tagging though. It almost seems better if comments were individually tagged themselves, separately from the node.
I can see pros/cons/reasons for either, it depends on the goals of your site. What do you think?
#2
Well the way I'm using Calais is in conjunction with a "relevant nodes" module to provide links to similar content based on taxonomy.
I imagine that the indexing of comments would really only be useful in forums or where the comments carry the same importance as the node.
If I was good with PHP I'd take a stab at producing a patch or something to add this feature... I imagine it'd be useful to others too.
#3
I see your point. I think that maybe a config option on a per content type basis to allow indexing of all comments along with the node bodies might accomplish this. I think this could be pretty useful. I'll add it to my todo.
#4
Wow, I popped in to propose that very idea. That would be perfect!
If there's anything I can do to contribute to the project or yourself for the work you're doing, I'd be happy to oblige. I'm not much of a programmer but I don't relish the idea of just asking for something and waiting for it to be handed to me ;-)
Either way, thank you for putting this on your to do list!
#5
Any update on this?
#6
Hey Brentnauer.
Sorry, no progress has been made on this. It's on the list, but the list keeps getting longer and delayed. The ideal solution in my eyes is a hook that allows you to alter the calais request before it is sent. Using that hook we can implement a module that will add comments into the body before it is sent. So this is really 2 steps.
1) Hook to alter the calais request
2) Implement hook to add node comments to the request (and a way to configure it).
I have a shot at doing #1, but I wont have any time in the short term to so #2. If you think you can take a shot at #2 I can try to get the hook in there rather soon.
#7
Whoops, sorry I didn't see this sooner.
My PHP is pretty limited, but I can' hurt anything by taking a stab at it. It's one of those "easy once you know how" things ;) But yes, if you can get the hook in there I'd be glad to see what I'm capable of doing.
#8
I'll add the hook as soon as I get a chance. I think it is a good idea that enables additional functionality.
#9
Hook is now added to CVS, will push out a release now.
If you create a module and define a function as such
function mymodule_calais_body_alter(&$body, $node) {$comments = //render comments
$body .= $comments;
}
That will add comments to the data sent to Calais. Let me know how it works.
#10