Skip to:
Content
Pages
Categories
Search
Top
Bottom

Stop users from making topics


  • jtstables
    Participant

    @jtstables

    I am very new to this so I’m not very technical.

    I need to restrict users to only be able to reply to topics I make as the admin and not make new topics themselves. How can I do this?

    Thanks.

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

  • Robin W
    Moderator

    @robin-w

    ok,

    create a directory on your theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress
    find
    wp-content/plugins/bbpress/templates/default/bbpress/content-single-forum.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/content-single-forum.php
    bbPress will now use this template instead of the original

    then change lines
    <?php if ( !bbp_is_forum_category() && bbp_has_topics() ) : ?>

    <?php bbp_get_template_part( ‘pagination’, ‘topics’ ); ?>

    <?php bbp_get_template_part( ‘loop’, ‘topics’ ); ?>

    <?php bbp_get_template_part( ‘pagination’, ‘topics’ ); ?>

    <?php bbp_get_template_part( ‘form’, ‘topic’ ); ?>

    <?php elseif ( !bbp_is_forum_category() ) : ?>

    <?php bbp_get_template_part( ‘feedback’, ‘no-topics’ ); ?>

    <?php bbp_get_template_part( ‘form’, ‘topic’ ); ?>

    <?php endif; ?>

    to
    <?php if ( !bbp_is_forum_category() && bbp_has_topics() ) : ?>

    <?php bbp_get_template_part( ‘pagination’, ‘topics’ ); ?>

    <?php bbp_get_template_part( ‘loop’, ‘topics’ ); ?>

    <?php bbp_get_template_part( ‘pagination’, ‘topics’ ); ?>

    <?php elseif ( !bbp_is_forum_category() ) : ?>

    <?php bbp_get_template_part( ‘feedback’, ‘no-topics’ ); ?>

    <?php endif; ?>

    and save

    that should do it


    jtstables
    Participant

    @jtstables

    Oh wow. OK, I’ll try. Kind of intimidating for me. I have no idea what 90% of that is. LOL!


    jtstables
    Participant

    @jtstables

    OK, I can’t figure out how to make a directory. I’ve looked all the options and can’t find it. How do you create a directory? I’m sorry but as I said I’m very new to this with little technical knowledge. I know how to a little HTML coding but that’s about it. I’m using theme Twenty Eleven and access my WordPress through HostGator.


    Robin W
    Moderator

    @robin-w

    ok, no problem, I can’t judge how technical people are 🙂

    You can do this in your main theme, but you would do better to create a child theme

    Don’t be intimidated, the following should explain

    Functions files and child themes – explained !

    when you get to

    What is FTP and how do I access it?

    To access your files, you’ll need an FTP client. Some host providers do with within their administration area, check with your host provider if in doubt

    I’m pretty sure form memory that hostgator has an area that does that called c-panel, but check with them if in doubt


    jtstables
    Participant

    @jtstables

    I went to the link above on how to create a child theme but when I tried to follow this link,https://make.wordpress.org/training/modules-in-progress/child-theme-module/ it was a 404 error. So I’m going to try and change the main theme. I go to the Twenty Eleven theme directory on the ftp to make the ‘bbpress’
    ie wp-content/%your-theme-name%/bbpress directory. Correct? Should I this be the exact name of the directory? ‘bbpress’ie wp-content/%your-theme-name%/bbpress


    jtstables
    Participant

    @jtstables

    Should I use ‘bbpress’ie or should the directory just be wp-content/%your-theme-name%/bbpress ? And should I use %your-theme-name% or should use my theme name, twentyeleven ? I am very confused and don’t want to mess this up.


    jtstables
    Participant

    @jtstables

    Oh, if you couldn’t tell I have made it into the ftp and found the file and the twentyeleven directory.


    Robin W
    Moderator

    @robin-w

    no problem, I remember my first time playing with FTP, which was only two years ago !

    Great that you making progress !

    the directory should be

    wp-content/themes/twentyeleven/bbpress


    Robin W
    Moderator

    @robin-w

    just edited the above !

    Forgot the theme directory in the first post !

    and have just edited earlier post to correct for future 🙂


    jtstables
    Participant

    @jtstables

    Ok. Made the changes but now the topics won’t come up. The only thing is shows in the forum a box that says, “This forum contains 3 topics, and was last updated by admin 13 seconds ago”. But I can’t see the 3 topics that I created.


    Robin W
    Moderator

    @robin-w

    ok, at least we know you’ve got the right file !

    Try the following

    delete all the content from wp-content/themes/twentyeleven/bbpress/content-single-forum.php

    and then paste the following in

    
    <?php
    
    /**
     * Single Forum Content Part
     *
     * @package bbPress
     * @subpackage Theme
     */
    
    ?>
    
    <div id="bbpress-forums">
    
    	<?php bbp_breadcrumb(); ?>
    
    	<?php bbp_forum_subscription_link(); ?>
    
    	<?php do_action( 'bbp_template_before_single_forum' ); ?>
    
    	<?php if ( post_password_required() ) : ?>
    
    		<?php bbp_get_template_part( 'form', 'protected' ); ?>
    
    	<?php else : ?>
    
    		<?php bbp_single_forum_description(); ?>
    
    		<?php if ( bbp_has_forums() ) : ?>
    
    			<?php bbp_get_template_part( 'loop', 'forums' ); ?>
    
    		<?php endif; ?>
    
    		<?php if ( !bbp_is_forum_category() && bbp_has_topics() ) : ?>
    
    			<?php bbp_get_template_part( 'pagination', 'topics'    ); ?>
    
    			<?php bbp_get_template_part( 'loop',       'topics'    ); ?>
    
    			<?php bbp_get_template_part( 'pagination', 'topics'    ); ?>
    
    		<?php elseif ( !bbp_is_forum_category() ) : ?>
    
    			<?php bbp_get_template_part( 'feedback',   'no-topics' ); ?>
    
    		<?php endif; ?>
    
    	<?php endif; ?>
    
    	<?php do_action( 'bbp_template_after_single_forum' ); ?>
    
    </div>
    

    save and then try it.


    jtstables
    Participant

    @jtstables

    SUCCESS!!!

    Thank you so much!

    Jason


    Robin W
    Moderator

    @robin-w

    Great – glad you’re fixed !


    bobey
    Participant

    @bobey

    you could ban them for spam reason to stop them make new topic


    Robin W
    Moderator

    @robin-w

    @bobey but that would stop them making replies as well


    jtstables
    Participant

    @jtstables

    OK, having a new problem. I received an email stating that WordPress had been updated to 4.1.1. Now even though people are logged into my site the forum tells them that to reply to this topic you must be logged in. The system even tells me this as adimn. So I tried I logged out then back in to make sure that would not fix the problem. It didn’t, the forum still tells me that I must be logged in to reply to this topic even though I am logged in

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