Hi all,

I've just set up a website that needs to restrict a forum to members only.

Is it possible to stop non members from viewing the forum
Or is it possible to stop non members from adding comments to the forum.

Thanks in advance
Ken

Comments

ahashim’s picture

goto your site admin
http://www.site.com/admin/access
and in the section "forum module" deselect "anonymous user"

I recomend you to read the Drupal handbook.
It is powerfull.

Also if you search on the forum you will find an answer for your question.

--
Ahmed Hashim
Egypt

kenwen’s picture

Hi,

I don't think that quite works for what I want it to do.

Basically it stops anonymous users creating and editing topics but it still doens't stop them posting comments on topics.

It also does not stop the viewing of forums by anonymous users.

re: your "advice" - I am reading the manual and I have searched the forum. My pointless advice to you is stop being so patronising.

huc’s picture

I use the taxonomy_access module do display certain forums to specific access roles. I use basic Drupal features to create the rolls and control commenting access and basic forum access.

For example, on our club site; generally all forums allow anonymous visitors to see content, but they cannot post new topics or comments. A special "Members" roll is assigned to club members who register and allows them to see the same forums as anonymous users but they can post comments and topics.

Some forums on the same site are limited for viewing and posting by users with the roll of "ClubOfficers". Those forums are hidden from all anonymous visitors, all authenticated visitors and all visitors with the "members" roll. Basically creating a closed forum for officers only.

You could apply a similar strategy to create the condition you're describing. I use taxonomy_access.module and general drupal features to do this:

  1. Admin > Access Control >Permissions: (basic Drupal features)
  • I set the comment.module to allow anonymous visitors to read comments only. Authenticated users (or some other specific role I defined) are set to read and post and edit their own comments.
  • I set the forum.module so only specific user roles can post and edit their topics. The Anonymous visitors can still read stuff
  • Taxonomy.access module installed: Admin > Access Control > Category Permissions:
    • Each forum on my site is listed below each user role
    • For a specific user role (e.g. Anonymous), uncheck the forum name and that forum is completely hidden from the associated user roll
    • repeat for any given user role or forum name. For example, 'site aministrators' might have their own forum which is only displayed to user logged in who have been assigned the Site Administrators roll

    It really is pretty straight forward once the Taxonomy_Access.module is installed. That module will let you hide an entire forum from any specific user roll. Since the comments are tied to the forum, if the visitor can't see the forum, they can't post or read a comment associated with that forum. Then adjust the access privileges for the comment.module to adjust how visitors can interact with comments globally for the entire site (e.g. only users assigned to the "members" roll can post comments)

    You could create a special user roll (e.g. "members") to do what you're describing or assign the desired default behavior to all authenticated users. There are a lot of possibilities but what you're describing can be done with the basic process noted above.

    I hope that makes a little bit of sense and helps... it's harder to explain than it is to do.

    Cheers
    Brian