leromt (@leromt)

Forum Replies Created

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

  • leromt
    Participant

    @leromt

    For what it’s worth, here is what I ended up doing:

    1. I left my “parent” forum as a category.

    2. Around line 847 of bbpress/includes/forums/template.php, I added “true” to the if statement to force the “category” parent forum to be shown, as follows:

    // No link for categories until we support subscription hierarchy
     // @see https://bbpress.trac.wordpress.org/ticket/2475
    if ( true || bbp_is_forum_category() ) {
    $retval = bbp_get_user_subscribe_link( $r );
    }
    

    3. In bbpress/templates/default/loop-single-forum.php I replaced line 44 with the following:

    
    <?php 
    		
    $subForumList = bbp_forum_get_subforums();
    		
    if(sizeof($subForumList) > 1){
    
       echo "<ul style='margin-left: 20px;'>";
    
       foreach($subForumList as $currForum){
    
       // Create the arguments
       $r = bbp_parse_args( $args, array('forum_id' => $currForum->ID,
            'user_id' => 0,
            'before' => '',
            'after' => '',
            'subscribe' => __( 'Subscribe',   'bbpress' ),
            'unsubscribe' => __( 'x', 'bbpress' )
             ), 'get_forum_subscribe_link' );
    
        $isSubscribed = bbp_get_forum_subscription_link($r);
    
        // see if the returned html has 'is-subscribed' in it
        // if it does, then the user is subscribed to the forum
    
        if(strpos($isSubscribed, 'is-subscribed') != 0){
        echo "<li>" . $isSubscribed . "&nbsp;&nbsp;<a href='" . bbp_get_forum_permalink($currForum->ID) . "'>" . $currForum->post_title . "</a></li>";
        }
    			
       }
    
      echo "</ul>";
      } // end > 1
    ?>
    

    Feel free to criticize, pick apart, or provide feedback as you see fit…it works for me.


    leromt
    Participant

    @leromt

    I am having this same issue. I have a “parent” forum and then sub-forums under that parent, such as,

    Platoon Leader Forum
    — Additional Duties Forum
    — Supply Operations Forum
    — etc.

    If my users subscribe to the Additional Duties Forum and then check their subscriptions, the Additional Duties forum to which they just subscribed is not listed but instead the “parent” forum (Platoon Leader Forum) is shown and gives them the “+” symbol for them to subscribe to it but the Addition Duties sub-forum isn’t shown as having been subscribed to at all.

    I normally have the parent (Platoon Leader Forum) marked as a “Category” but even when I change it to back to a “Forum” I get the same results.

    I have a deadline pending to get this fixed. ANY help will be deeply appreciated.

    Tom

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