amunds (@amunds)

Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Just thought of something, could you check if the $user_id variable outputs the correct value? For example by doing a printf on the user variable on the same page you are trying to render the output.

    Its output was as expected using the replies loop, I assume you copied my function (there are some minor changes from bbp_get_user_topics_started)? Also, did you add the function to functions.php? Lastly, could you link a pastie.org of your user-topics-replied.php file?

    Sorry, somehow the code did not output even if it looked like it would in the preview. Trying again:

    Then to list the replies just add to whatever page you want to list them:

    if ( bbp_get_user_replies() ) : 
       bbp_get_template_part( 'pagination', 'replies' ); 
       bbp_get_template_part( 'loop',       'replies' ); 
       bbp_get_template_part( 'pagination', 'replies' ); 
    endif;
    

    Remember to add the correct PHP tags before and after each line. Also included pastie with the entire post: Pastie with code

    I`m not sure how familiar you are with WordPress and PHP, I consider myself a novice in PHP but well-versed in WordPress. It might be a bit technical and it might be the wrong way to do things, but here is how I quickly put it together.

    Open functions.php in your theme.
    Add the following function to the file (within the PHP tags):

    function bbp_get_user_replies( $user_id = 0 ) {
    
    // Validate user
    $user_id = bbp_get_user_id( $user_id );
    if ( empty( $user_id ) )
        return false;
    
    // Query defaults
    $default_query = array(
        'author'         => $user_id,
        'show_stickies'  => false,
        'order'          => 'DESC',
    );
    
    // Try to get the topics
    $query = bbp_has_replies( $default_query );
    if ( empty( $query ) )
        return false;
    
    return apply_filters( 'bbp_get_user_replies', $query, $user_id );
    }
    

    Then to list the replies just add to whatever page you want to list them:

    As you can see this is basically the same code as the bbp_get_user_topics_started function, just modified to get the replies instead.

    If anyone have a better solution I`d love to hear it.

    It`s near impossible to troubleshoot this without having access to the site so we can see the HTML/CSS. Looks to be either a CSS clear or, as Melindrea said, an extra container.

    If you want more help than that we really must see the site itself.

    First of all let me just say it is nice of you to not be more impolite. Secondly I think you should trust him when he says:

    > Sorting out the forum/category hierarchy and layout is actually a pretty complex set of loops to automate, as it involves checking depth and walking a tree of forums that could potentially be outside of the current scope.

    My experience has been that people have embraced this style of forum and I have not had a single negative reaction so far (and I have asked them). So it might not be the forum software that is really the issue here.

    You really only have three options here: Wait for it to be added, find another forum software or pay someone to write a patch.

    You need to find the HTML for the button, in this case it`s .
    To get the button to align to the left you then have to overwrite the align CSS with the following:

    div.bbp-submit-wrapper {
      float: left;
    }
    

    Let me know if anything is unclear.

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