joshnoworries (@joshnoworries)

Forum Replies Created

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

  • joshnoworries
    Participant

    @joshnoworries

    Thanks for all the suggestions! I will investigate the filter as that would be much more elegant. Here is what i am currently using, it’s ugly but i needed an urgent solution for a client:

    loop-single-forum.php

    REPLACED:
    <?php bbp_author_link( array( 'post_id' => bbp_get_forum_last_active_id(), 'size' => 14 ) ); ?>

    WITH:

    <?php if(bbp_get_forum_last_active_id()){?>
    <?php $last_post_id = bbp_get_forum_last_active_id(bbp_get_forum_last_topic_id()); ?>
    <?php $last_user_id = bbp_get_topic_author_id($last_post_id); ?>
    <a href="<?php echo bbp_topic_author_url($last_post_id) ?>"><?php bbp_topic_author_avatar($last_post_id,15); ?>
    <?php $user = get_user_by( 'id',$last_user_id ); echo $user->user_login ; ?></a>
    <?php } else { ?>
    <?php } ?>

    loop-single-topic.php

    REPLACED:

    <?php printf( __( 'Started by: %1$s', 'bbpress' ), bbp_get_topic_author_link( array( 'size' => '14' ) ) ); ?>
    

    WITH:
    Started by: <a href="<?php echo bbp_topic_author_url() ?>"><?php bbp_topic_author_avatar(0,15); ?><?php $user = get_user_by( 'id',bbp_get_topic_author_id() ); echo $user->user_login ; ?></a>

    REPLACED:
    <?php bbp_author_link( array( 'post_id' => bbp_get_topic_last_active_id(), 'size' => 14 ) );?>

    WITH:

    <?php $last_post_id = bbp_get_topic_last_active_id() ?>
    <?php $last_user_id = bbp_get_topic_author_id($last_post_id) ?>
    <a href="<?php echo bbp_topic_author_url($last_post_id) ?>"><?php bbp_topic_author_avatar($last_post_id,15); ?>
    <?php $user = get_user_by( 'id',$last_user_id ); echo $user->user_login ; ?></a>

    loop-single-reply

    REPLACED:
    <?php bbp_reply_author_link( array( 'sep' => '<br />', 'show_role' => true ) ); ?>

    WITH:

    <a href="<?php echo bbp_reply_author_url() ?>"><?php bbp_reply_author_avatar(0,80); ?><br/>
    <?php $user = get_user_by( 'id',bbp_get_reply_author_id() ); echo $user->user_login ; ?></a>
    <?php bbp_reply_author_role() ?>

    joshnoworries
    Participant

    @joshnoworries

    Hi, did you resolve this?

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