Skip to:
Content
Pages
Categories
Search
Top
Bottom

CSS to remove New Topic option in Forum


  • fdittmar
    Participant

    @fdittmar

    Hi,

    Could someone tell me if it’s possible (or even help me with identifying the correct specificity) to stop users from creating new topics in a specific subforum please.
    Running BBP as part of a learning management system where user level/access etc are set based on their student/course status. Been fine for 3 years but now I’d like to provide a slightly stricter UI for some specific courses (which means the Forums/Topics).

    My situation is:

    Forum
    -Subforum
    –Topics
    —Replies
    –Topics
    —Replies
    -Subforum
    –Topics
    —Replies

    My problem is in one of the subforums where the topics created by our teachers are listed but (obviously) the students also see the ‘Create New Topic’ option (which they need elsewhere). I wish to remove that New Topic Creation option there. I can’t do it via the Forum Attributes eg Closed Status because it needs to remain open for other child topics in the same forum.

    I thought that using CSS (display:none) to remove the entire New Topic Entry box would work for me but my inexperience shows through because I can’t work it out even after hours looking online.

    Is it possible to apply such css by adressing it against a specific post id?

    I can remove the new topic box in the browser inspector various ways
    (eg .bbp-reply-form, .bbp-topic-form {display: none;} or with #new-topic-0 etc) but I can’t get it done just for the 1 Subforum/Topic) –
    This does not work: #bbpress-forums #bbp-forum-POSTID #new-topic-0. I also tried variations ul.bbp-parent-forum-21435 etc

    In this example my Forum is post 21435, the topic in it is 21437 and I want to remove the New Topic Entry box on that page (students should only go to 21437 and use Replies there, not create topics)(sorry, actual forums are in the school system so not public).

    Sorry for long post / cry for help. Maybe someone could assist… Thanks

Viewing 9 replies - 1 through 9 (of 9 total)

  • Robin W
    Moderator

    @robin-w

    you can do this by amending a template in bbpress (which I’ll helo you with if you wish, but requires FTP knowledge)

    or you could use

    Private groups

    you would set up 2 groups

    say group 1 teachers
    group 2 students

    in dashboard>settings>bbp private groups>group name settings

    then in

    dashboard>settings>bbp private groups>topic permissions

    you’ll actually see an example of how to do this


    fdittmar
    Participant

    @fdittmar

    Thanks for the assistance, Robin.
    Your plugin does indeed sound as if it can help me with the topic posting restriction but it would mean I would have to do a lot more manual work on an ongoing basis as I have around a 100 new forums with around 1000 replies per school term and with a 50% new student intake each time (who’s access to the areas where ‘their’ forums are located dictated by the school permission system).

    What would the ‘amending of the template’ do? A similar structural change or just a change to add selectors that would allow me to target just the 5 or so forums per term where I want to do this?


    Robin W
    Moderator

    @robin-w

    you only need to set restrictions on the forums you wish to restrict, if you don’t set a forum to a group or groups, then it is public/private just as now. So you would only need to set this up for 5 forums.

    then you would go to dashboard>settings>bbp private groups>assign groups to roles
    and as students would get the ‘subscriber’ role, you’d set that a ‘students’ and tick the add group on first login.

    You then manually change the groups just for teachers.

    new users would be subscribers by default so get the student role.

    Do teachers have the subscriber role or do they get different?

    If you went down a template route, you would still need some way of differentiating teachers from students.


    fdittmar
    Participant

    @fdittmar

    All site role:instructor are forum role:moderator
    All site role:student are forum role:participant

    Assigned automatically by our LMS


    Robin W
    Moderator

    @robin-w

    what wordpress roles are assigned ?


    fdittmar
    Participant

    @fdittmar

    I just realised that I don’t actually know what specific capabilities are assigned as it is all in place from the LMS modifications.

    So, the answer is ‘instructor’ and ‘student’…

    (I guess I could install some User Role Admin plugin if I wanted to find out which original WP roles were either renamed or modified. Sorry)


    Robin W
    Moderator

    @robin-w

    so you can use those


    fdittmar
    Participant

    @fdittmar

    I will try that, thank you very much.


    Robin W
    Moderator

    @robin-w

    come back if you need further help

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.
Skip to toolbar