I would like to highlight the group forum by placing a link at the top of each group home page, which will lead to the forum of the current group.

How can I correlate a forum to a group?

The forums are numbered, but not according to the numbers of the group.

I see that there is a taxonomy term for each forum, is that the way to check?

Thanks!

Comments

rconstantine’s picture

There is a table called og_term. See the install file for details on the schema. I don't recall off of the top of my head what the columns are, but that should get you started.

seth97’s picture

Thanks for getting me started!
I'll have a look at it!

Seth

seth97’s picture

This worked for me:

//Print link to the Group forums of the current group
    $result = db_query('SELECT * FROM {og_term} WHERE nid = %d', $current_group);
    $og_terms = array();
    while ($term = db_fetch_object($result)) {
      $og_terms[] = $term->tid;
    }
    $group_forums = min($og_terms);
    print '<a href="YOUR_SITE/forum/' .$group_forums. '">Forums</a>';
seth97’s picture

Status: Active » Closed (fixed)