Create Forum?

Events happening in the community are now at Drupal community events on www.drupal.org.
Amy_M's picture

Hi there,

This is a bit of a long shot but I'm hoping to get some advice on forum generation through rules. My site is primarily organized through an extensive taxonomy. What I'm hoping to achieve with rules is this:

Taxonomy 1 (fruit)
New term is saved (apple)

Create a forum for apple with a standard set of containers

-History
-Recipes
-Msc

Is this possible with rules? I was playing around with loading the forum vocab and adding Apple as a new forum that way, but so far no luck. Any tips or advice anyone could share would be awesome.

Thanks!
Amy

Comments

One approach

itangalo's picture

I'm not sure what kind of forum you're after, but I suspect that you use the Forum module from Drupal core. If I'm not misremembering, it has a forum as a node with all posts as comments – but I may be wrong on this. (Generally I recommend using CCK and Views for building forums, rather than core Forum, but that's a whole different topic.)

Anyways, I think it should be possible to create new forums with Rules, like so:

  1. A rule, triggering on new taxnomy terms created.
  2. A condition in the rule checks that the term belongs to the relevant vocabulary.
  3. An action in the rule creates a new node of the forum type. You might have to load a user to set as author before this can be done.
  4. You might have to add an action to save the node, in order to be able to modify it later on. (Possibly you actually need to do this in a separate rule, which means you have to move all of this to a rule set. I hope not.)
  5. An action sets a term on the new forum, making it belong to the newly created term.
  6. Repeat step 3–5 for each new forum (or forum container?) you wish to create.

I probably got one or two things wrong when it comes to the core Forum functionality, but hopefully this can give an idea of the approach.

Good luck!
//Johan Falk, NodeOne, Sweden

Thanks so much for your help,

Amy_M's picture

Thanks so much for your help, I'm going to give it a shot tonight - pretty sure you're bang on though.

Cheers,
Amy

Rules

Group organizers

Group categories

Categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: