Skip to:
Content
Pages
Categories
Search
Top
Bottom

plugin Button to create new topic


  • caesarhills
    Participant

    @caesarhills

    hi,
    I’m using BBpress 2.5.4 and buddypress.2.1.1.
    I’d need for my forum a simple button for members to create new topic as I want they to see that option as soon as they log into the forum.
    Is there anything similar to what I ask?
    Thanks all in advance

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

  • caesarhills
    Participant

    @caesarhills

    P.s
    A very important thing would be also to force the user to select a category of the forum where to write up the title of his new topic


    geog272
    Participant

    @geog272

    Hi there, I am wondering this as well — using the short code [bbp-topic-form] is it possible to make the “Forum” dropdown menu a required field, and to require that in that drop down users choose a forum and not be able to choose “no forums” (which currently shows as the the default option).


    Robkk
    Moderator

    @robkk

    is it possible to make the “Forum” dropdown menu a required field, and to require that in that drop down users choose a forum and not be able to choose “no forums” (which currently shows as the the default option).

    I will create a trac ticket for this later today. It might be best for it to be required and for the default text to be “choose forum” instead.

    You can create a button to your new topic page easily by using the text widget provided from WordPress, and adding this simple HTML.

    <a href="http://yoursite.com/new-topic" class="button">New Topic</a>


    geog272
    Participant

    @geog272

    That would be great — thank you for creating a ticket. Your suggestion of having the default text be “choose forum” is perfect.


    Robkk
    Moderator

    @robkk

    Heck I might not need to, it may already be in the next major release.

    If you go to this sites new topic page, you will see the forum dropdown does not show the (no forum), it just displays the first form in the list by default.

    Create New Topic

    Will check to make sure later though.


    erich199
    Participant

    @erich199

    I”ve been reading these topic about “new topic button” and I’m just curious why this isn’t included in the plugin? Most major forums have this feature and when I click on “Start Topic” I don’t have to choose the forum where I want the topic posted. So if I click on “start new topic” in the “General Discussions” forum, it post the topic there. I don’t have to select where to post the topic.

    Would love to see this feature in future releases. Thanks for the hard work on bbpress.


    Robkk
    Moderator

    @robkk

    @geog272

    For having a forum show up instead of the (No Forum), copy form-topic.php in your child theme.

    In the code toward line 109 you would see something like this.

    <?php if ( !bbp_is_single_forum() ) : ?>
    
     <?php do_action( 'bbp_theme_before_topic_form_forum' ); ?>
    
    	<p>
    		<label for="bbp_forum_id"><?php _e( 'Forum:', 'bbpress' ); ?></label><br />
    			<?php
    				bbp_dropdown( array(
    				'show_none' => __( '(No Forum)', 'bbpress' ),
    				'selected'  => bbp_get_form_topic_forum()
    				) );
    			?>
    	</p>
    
    <?php do_action( 'bbp_theme_after_topic_form_forum' ); ?>
    
    <?php endif; ?>

    Remove 'show_none' => __( '(No Forum)', 'bbpress' ), so it would look like this.

    <?php if ( !bbp_is_single_forum() ) : ?>
    
     <?php do_action( 'bbp_theme_before_topic_form_forum' ); ?>
    
    	<p>
    		<label for="bbp_forum_id"><?php _e( 'Forum:', 'bbpress' ); ?></label><br />
    			<?php
    				bbp_dropdown( array(
    				'selected'  => bbp_get_form_topic_forum()
    				) );
    			?>
    	</p>
    
    <?php do_action( 'bbp_theme_after_topic_form_forum' ); ?>
    
    <?php endif; ?>

    geog272
    Participant

    @geog272

    Thanks so much for responding and providing this code. It doesn’t quite do it in my case, as it allows users to choose to post to categories as well as forums, and I’d like to force them to choose a forum.


    Robkk
    Moderator

    @robkk

    It should just be forums. Categories are greyed out and cannot be selected.


    geog272
    Participant

    @geog272

    Geez, I swear it was letting me pick the categories before, but went back and tested and it seems fine now. Must be gremlins in my machine. Thanks very much; this is very helpful.


    Robkk
    Moderator

    @robkk

    Oh they got you too. Freaking Gremlins 😆

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