izzyian (@izzyian)

Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • @izzyian

    Participant

    Thank you so much I found that the following css fixed my problem while using the 1st functions if then statement code

    a.bbp-backto-forum {
        margin-right: 8px;
    }
    #subscription-toggle, #favorite-toggle {
        display: block;
        float: right;
        padding-right: 8px !important;
        padding-top: 0 !important;
    }

    @izzyian

    Participant

    Wow thank you so much ! 🙂 … This is my loop replies php with the code in it, but I dont know if I put it in right because even though it shows, it does not appear in the same row as subscribe and favorites but rather a little above the row, and any css i added did not help.

    <?php do_action( 'bbp_template_before_replies_loop' ); ?>
    
    <div id="topic-post-list" class="item-list" role="main">
    
    <div class="forum-head-reply-tools">
    
     <a class="bbp-backto-forum" href="<?php bbp_forum_permalink(); ?>">Back to <?php bbp_forum_title(); ?></a> <?php bbp_user_subscribe_link('before=&nbsp;'); ?> <?php bbp_user_favorites_link(); ?></div>
    <div class="clear"></div>
    
    <ul>
    		<?php while ( bbp_replies() ) : bbp_the_reply(); ?>
    
    			<?php bbp_get_template_part( 'loop', 'single-reply' ); ?>
    
    		<?php endwhile; ?>
    </ul>
    </div><!-- #topic-<?php bbp_topic_id(); ?>-replies -->
    
    <?php do_action( 'bbp_template_after_replies_loop' ); ?>

    Here is a picture of the row so you can see the new button is a little above the row
    http://bitfiu.com/wp-content/uploads/2014/12/button-example.png

    @izzyian

    Participant

    @robkk,

    Thank you for that here is a little more info because i don’t understand where to place that code:

    What I want to do is add a button ( which I will later style in my css) that will just take the user back to the forum (basically a button that is a breadcrumb).

    I would place all the information here but bbpress reply box is not letting me for some reason. But you can read the information here where I placed it in the wrong section before I asked it here https://buddypress.org/support/topic/how-do-i-add-a-button-in-loops-replies-php-file/

    @izzyian

    Participant

    @robkk , That worked ! Thank you so much for breaking it down for me. you have no idea how long iv been trying to make this work 🙂

    @izzyian

    Participant

    @robin-w

    Hi, no this does not work :

    function role_show ($args) {
    $displayed_user = bbp_get_reply_author_id() ;
    $role = bbp_get_user_role( $displayed_user);
    if ( bbp_is_user_keymaster($displayed_user) ||$role == 'bbp_moderator')  $args['show_role'] = true ;
    else $args['show_role'] = false ;
    return $args ;
    }
    add_filter ('bbp_before_get_reply_author_link_parse_args', 'role_show' )

    This is a screen shot of that result :
    http://bitfiu.com/wp-content/uploads/2014/11/functions-picture.png

    @izzyian

    Participant

    This works for me :

    function role_show () {
    $displayed_user = bbp_get_reply_author_id() ;
    $role = bbp_get_user_role( $displayed_user);
    if ( bbp_is_user_keymaster($displayed_user) ||$role == 'bbp_moderator')  $args['show_role'] = true ;
    else $args['show_role'] = false ;
    return $args ;
    }
    add_filter ('bbp_before_get_reply_author_link_parse_args', 'role_show' )
    

    BUT

    It removes the avatar from showing and the “last post by” name, on the Forums topic post lists. How can I fix this ?

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