Skip to:
Content
Pages
Categories
Search
Top
Bottom

Disable topic creation on certain forums


  • jaspervanveenhuizen
    Participant

    @jaspervanveenhuizen

    Hello! My website currently has a forum for ‘news’ and a forum for ‘other’.
    I want my users only to be able to create topics under ‘other’, but not under ‘news’. I do want them to be able to reply to both topics made in ‘news’ and ‘other’.

    I tried setting the ‘news’ forum status to closed, and the topics under there on open. But it still makes users unable to reply on them.
    Any way I can achieve my goal? Maybe with the help of another plugin?

    I’m currently using bbpress with buddypress and the free version of the theme Quest.
    I’m running WordPress 4.4.2, bbpress 2.5.8, buddypress 1.9 and Quest 1.4.1 (which are all the latest versions at creation of this topic)

    Thanks,
    Jasper

Viewing 1 replies (of 1 total)

  • Robin W
    Moderator

    @robin-w

    ok, so you need to amend form-topic.php

    Presumimg you can use FTP and use an editor

    create a directory on your theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

    where %your-theme-name% is the name of your theme

    find
    wp-content/plugins/bbpress/templates/default/bbpress/form-topic.php

    Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/form-topic.php

    bbPress will now use this template instead of the original
    and you can amend this

    So in form-topic.php you need to amend line 28 from

    <?php if ( bbp_current_user_can_access_create_topic_form() ) : ?>
    

    to

    <?php if ( bbp_current_user_can_access_create_topic_form() && (bbp_get_forum_title() == 'other'  ) : ?>
    

    This should then only allow new topics if the user can create a topic and the cforum title is ‘other’ forum

    This is untested, but should work !

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