I have a custom node type which has associated with it location, event and a handfull of other data. When I create nodes of this type, I want them to appear in one of my forums. But currently, the forum module only displays nodes of type 'forum'.

I'm thinking of changing my forum module to show my nodes as well. I've just begun looking at the forum.module code, and it seems to me it could work as follows.

* Associate my node type with the Forums vocabulary. So when creating my content I choose the Forum in which they appear.

* Change a few queries in forum.module. Eliminate any "n.type='forum'" clauses. Find nodes based on terms in Forums vacabulary, rather than forum table.

* Move relevant code from hooks like forum_view() and forum_validate() into forum_nodeapi() so the code can apply to any content type. Do nothing unless the node is associated with a term in the Forums vocabulary.

* Eliminate the forum table entirely. (Or, if its necessary for some reason I do not see, move code from forum_insert, forum_update, and forum_delete into forum_nodeapi.)

In the end, nodes would appear in the forum if they have a term in the forum vocabulary, otherwise they would not, regardless of the content type.

I haven't tried to do this yet, but I'm willing to. Before I start, I ask: is there any reason this would not work? Any reason its a bad idea?

Thanks in advance, -Dave

Comments

magico’s picture

Version: 4.6.0 » x.y.z
Dave Cohen’s picture

Wow, this is so old I had forgotten about it. But I still would like this feature.

I now believe the 'right' way to do it might rely heavily on the views module. I wonder if one could define a few views that would turn any vocabulary into a forum. So that all a forum module would do is provide some default views.

Jaza’s picture

Version: x.y.z » 6.x-dev
Status: Active » Closed (duplicate)

Duplicate of http://drupal.org/node/20295 (whcih is an issue for the same feature, but it's made more of a start, because it has a patch)