WordPress.org

Ready to get started?Download WordPress

Forums

bbPress Topics for Posts
[Error] Not appearing all forums (3 posts)

  1. javiarques
    Member
    Posted 2 years ago #

    Hi there again.

    We were having a problem when selecting the forum in which to create the topic, since not all existing forums appeared. I made a small modification to the code, and now I think it works well.

    I have just used the bbPress forums dropdown function and modified a little de JS:

    Instead of:

    <select name="bbpress_topic[forum_id]" id="bbpress_topic_forum">
        <option value="0" selected><?php _e('Select a Forum', 'bbpress-post-topics' ); ?></option>
         <?php while ( bbp_forums() ) : bbp_the_forum(); ?>
    	<?php if(bbp_is_forum_category())	continue; ?>
    	<option value="<?php echo bbp_get_forum_id() ?>" <?php selected( $bbpress_topic_options['forum_id'], bbp_get_forum_id() ) ?>><?php if( bbppt_get_forum_parent_id() ) echo '— ' ?><?php echo bbp_get_forum_title(); ?></option>
    	<?php endwhile; ?>
    </select>

    I put:

    <span id="bbpress_select_forum">
    	<?php
    	$forum_args = array (
    	        'selected'           => $bbpress_topic_options['forum_id'],
    		'sort_column'        => 'menu_order',
    		'numberposts'        => -1,
    		'select_id'          => 'bbpress_topic[forum_id]',
                    'show_none'          => 'Select forum',
    		'disable_categories' => true
    					);
    		bbp_dropdown( $forum_args );
    				?>
    </span>

    And then in the JS tha disable the topic slug, I have just modified the selector:
    jQuery('#bbpress_select_forum select')

    Hope you like it!

    http://wordpress.org/extend/plugins/bbpress-post-topics/

  2. javiarques
    Member
    Posted 2 years ago #

    I have a couple of more modifications in the code tha could be interesting for you Dean, this is my Twitter in case you want to contact me @javiarques

  3. David Dean
    Member
    Plugin Author

    Posted 2 years ago #

    Hi, javiarques! I tried to send you some twitter messages earlier in the week but was denied. I'll try again soon, but wanted to give you a heads up that I'm @gtddean.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.