When reading the code, I tried to understand how this module works:
- a node can have a forum topic for discussions, but not more than one.
- this topic always has the same title as the node and has a body with some prefixed text
Although I see some use cases for this sort of design, I do think it misses some opportunities such as:
- a node can have multiple forum node discussions
- a forum node is tagged with the link to the node which is discussed
- when a user posts a new forum node, he can set title and body and it's actually linked to his user account
- on the discussed node, a list can be displayed with the most active forum nodes
So, the way I would have designed this module is have a relationship module between node and forum-nodes. Especially the predefined text in the forum node looks very ugly to me since you can't change this anymore once the forum node is posted (at least not in an easy way). The Drupal core search might not like this predefined text as well.
What do you think about my critique?
In case you were wondering, I'm very interested to work on your module and
Comments
Comment #1
spidermanThanks for your thoughts- I appreciate your interest in the module, and would be happy to consider patches to include some of the features you mention. My design requirements for the client sponsoring this module are fairly specific, and so things like the 1 to 1 mapping between nodes and topics are unlikely to change (unless you have a patch that doesn't break the existing functionality ;)
I've adjusted the module so it allows you to choose the user who authors the forum topics, since in our case we don't want the first user to click on the Discuss This! link to actually own the topic itself, only to create the first comment. Perhaps we could tweak this so that the admin could optionally choose to have the author be the current user, rather than some pre-defined one.. again, patches speak volumes ;)
As far as the predefined text, I think I will modify this to at least be configurable. Perhaps the admin can choose a standard prefix for auto-created forum topic subjects, as well as (template) text to use for the body of the topic itself. I'll create a separate issue for this.
Thanks,
Derek
Comment #2
spiderman@toemaz: I've filed a separate issue for using "current user" as the author of the auto-created forum topics, but I wonder if you have suggestions as to the UI for this- currently I'm reusing the user/autocomplete textfield to allow the admin to select an existing user on the system. What do you think is the best way to provide the option of using whichever user clicks the link?
Comment #3
toemaz commentedThe user/autocompletion textfield seems good to me. But if you don't want to go through the hassle, tell the admin to fill in the uid. On submission of the form, you could check the uid and display the corresponding username.
Anyway, either solution looks fine.
Regarding the design of this module, I have just finished a module myself which is exactly the design I described. Feel free to do whatever you want to do with it. It includes some stuff which you described as a todo in your module such as displaying settings on the node-type form.
Comment #4
toemaz commentedClosing this issue.