Skip to:
Content
Pages
Categories
Search
Top
Bottom

Photo in Latest posts


  • Icaroferreira
    Participant

    @icaroferreira

    Hello,

    What is the procedure to display the profile photo, in the option “Latest posts”? Same have is here in this forum.

    Helpe me please.

    Regards,
    Icaro

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

  • Robkk
    Moderator

    @robkk

    explain what do you mean , you keep your question very vague, and it doesnt help me try to help you.


    Icaroferreira
    Participant

    @icaroferreira

    Look this link: http://ajudaroproximo.com.br/wp-content/uploads/2014/11/forum-pictures.jpg

    I want in my forum, please, what is the step by step ?


    Robkk
    Moderator

    @robkk

    bbPress looks like this by default in a unmodified fresh install with the show topics by freshness shown on the forums root.


    Icaroferreira
    Participant

    @icaroferreira

    But, how do I manage to get it on my forum ?

    I wish these photos appear on my forum, as I do ?


    Robkk
    Moderator

    @robkk

    since you have custom bbpress templates in your theme

    you would have to look at the loop-single-topic.php file in your bbpress folder and compare it to this one which is the plugins version of the file

    https://raw.githubusercontent.com/ntwb/bbPress/master/src/templates/default/bbpress/loop-single-topic.php

    basically you need this for the started by author avatar

    <?php do_action( 'bbp_theme_before_topic_started_by' ); ?>
    
    <span class="bbp-topic-started-by"><?php printf( __( 'Started by: %1$s', 'bbpress' ), bbp_get_topic_author_link( array( 'size' => '14' ) ) ); ?></span>
    
    <?php do_action( 'bbp_theme_after_topic_started_by' ); ?>

    and this for the freshness author avatar

    <?php do_action( 'bbp_theme_before_topic_freshness_author' ); ?>
    
    <span class="bbp-topic-freshness-author"><?php bbp_author_link( array( 'post_id' => bbp_get_topic_last_active_id(), 'size' => 14 ) ); ?></span>
    
    <?php do_action( 'bbp_theme_after_topic_freshness_author' ); ?>

    Icaroferreira
    Participant

    @icaroferreira

    Thank you.

    So, Please, where exactly I should enter these codes above, within my code I have in the folder: loop-single-topic.php

    see:

    <?php

    /**
    * Topics Loop – Single
    *
    * @package bbPress
    * @subpackage Theme
    */

    ?>

    <ul id=”bbp-topic-<?php bbp_topic_id(); ?>” <?php bbp_topic_class(); ?>>

    <li class=”bbp-topic-title”>

    <?php if ( bbp_is_user_home() ) : ?>

    <?php if ( bbp_is_favorites() ) : ?>

    <span class=”bbp-row-actions”>

    <?php do_action( ‘bbp_theme_before_topic_favorites_action’ ); ?>

    <?php bbp_topic_favorite_link( array( ‘before’ => ”, ‘favorite’ => ‘+’, ‘favorited’ => ‘×’ ) ); ?>

    <?php do_action( ‘bbp_theme_after_topic_favorites_action’ ); ?>

    </span>

    <?php elseif ( bbp_is_subscriptions() ) : ?>

    <span class=”bbp-row-actions”>

    <?php do_action( ‘bbp_theme_before_topic_subscription_action’ ); ?>

    <?php bbp_topic_subscription_link( array( ‘before’ => ”, ‘subscribe’ => ‘+’, ‘unsubscribe’ => ‘×’ ) ); ?>

    <?php do_action( ‘bbp_theme_after_topic_subscription_action’ ); ?>

    </span>

    <?php endif; ?>

    <?php endif; ?>

    <?php do_action( ‘bbp_theme_before_topic_title’ ); ?>

    “><?php bbp_topic_title(); ?>

    <?php do_action( ‘bbp_theme_after_topic_title’ ); ?>

    <?php bbp_topic_pagination(); ?>

    <?php do_action( ‘bbp_theme_before_topic_meta’ ); ?>

    <p class=”bbp-topic-meta”>

    <?php do_action( ‘bbp_theme_before_topic_started_by’ ); ?>

    <?php
    if (class_exists(‘userpro_api’)) {
    /* Integrating UserPro */
    global $userpro;
    $link = preg_replace(“/(?<=href=(\”|’))[^\”‘]+(?=(\”|’))/”, $userpro->permalink( bbp_get_topic_author_id() ),
    bbp_get_topic_author_link( array( ‘size’ => 14 ) ) );
    } else {
    $link = bbp_get_topic_author_link( array( ‘size’ => ’14’ ) );
    }
    ?>

    <span class=”bbp-topic-started-by”><?php printf( __( ‘Started by: %1$s’, ‘bbpress’ ), $link ); ?></span>

    <?php do_action( ‘bbp_theme_after_topic_started_by’ ); ?>

    <?php if ( !bbp_is_single_forum() || ( bbp_get_topic_forum_id() !== bbp_get_forum_id() ) ) : ?>

    <?php do_action( ‘bbp_theme_before_topic_started_in’ ); ?>

    <span class=”bbp-topic-started-in”><?php printf( __( ‘in: %2$s‘, ‘bbpress’ ), bbp_get_forum_permalink( bbp_get_topic_forum_id() ), bbp_get_forum_title( bbp_get_topic_forum_id() ) ); ?></span>

    <?php do_action( ‘bbp_theme_after_topic_started_in’ ); ?>

    <?php endif; ?>

    </p>

    <?php do_action( ‘bbp_theme_after_topic_meta’ ); ?>

    <?php bbp_topic_row_actions(); ?>

    <li class=”bbp-topic-voice-count”><?php bbp_topic_voice_count(); ?>

    <li class=”bbp-topic-reply-count”><?php bbp_show_lead_topic() ? bbp_topic_reply_count() : bbp_topic_post_count(); ?>

    <li class=”bbp-topic-freshness”>

    <?php //bbp_topic_freshness_link(); ?>

    <p class=”bbp-topic-meta”>

    <?php do_action( ‘bbp_theme_before_topic_freshness_author’ ); ?>
    <?php
    if (class_exists(‘userpro_api’)) {
    global $userpro;
    $link = preg_replace(“/(?<=href=(\”|’))[^\”‘]+(?=(\”|’))/”, $userpro->permalink( bbp_get_topic_author_id( bbp_get_topic_last_active_id() ) ), bbp_get_author_link( array( ‘post_id’ => bbp_get_topic_last_active_id(), ‘size’ => 30 ) ) );
    } else {
    $link = bbp_get_author_link( array( ‘post_id’ => bbp_get_topic_last_active_id(), ‘size’ => 14 ) );
    }
    ?>

    <span class=”bbp-topic-freshness-author”><?php echo $link; ?></span>

    <?php do_action( ‘bbp_theme_after_topic_freshness_author’ ); ?>

    </p>

    <!– #bbp-topic-<?php bbp_topic_id(); ?> –>


    Robkk
    Moderator

    @robkk

    in this code you pasted it looks like the exact code to display the avatars is already there.

    maybe you didnt install the template files right??

    wherever you see something like this below , this is what should be displaying the avatar

    ‘size’ => 14

    this is complete started by section showing the started by author avatar

    <?php do_action( ‘bbp_theme_before_topic_started_by’ ); ?>
    
    <?php
    if (class_exists(‘userpro_api’)) {
    /* Integrating UserPro */
    global $userpro;
    $link = preg_replace(“/(?<=href=(\”|’))[^\”‘]+(?=(\”|’))/”, $userpro->permalink( bbp_get_topic_author_id() ),
    bbp_get_topic_author_link( array( ‘size’ => 14 ) ) );
    } else {
    $link = bbp_get_topic_author_link( array( ‘size’ => ’14’ ) );
    }
    ?>
    
    <span class=”bbp-topic-started-by”><?php printf( __( ‘Started by: %1$s’, ‘bbpress’ ), $link ); ?></span>
    
    <?php do_action( ‘bbp_theme_after_topic_started_by’ ); ?>

    this is the complete freshness section showing the author avatar

    <?php do_action( ‘bbp_theme_before_topic_freshness_author’ ); ?>
    <?php
    if (class_exists(‘userpro_api’)) {
    global $userpro;
    $link = preg_replace(“/(?<=href=(\”|’))[^\”‘]+(?=(\”|’))/”, $userpro->permalink( bbp_get_topic_author_id( bbp_get_topic_last_active_id() ) ), bbp_get_author_link( array( ‘post_id’ => bbp_get_topic_last_active_id(), ‘size’ => 30 ) ) );
    } else {
    $link = bbp_get_author_link( array( ‘post_id’ => bbp_get_topic_last_active_id(), ‘size’ => 14 ) );
    }
    ?>
    
    <span class=”bbp-topic-freshness-author”><?php echo $link; ?></span>
    
    <?php do_action( ‘bbp_theme_after_topic_freshness_author’ ); ?>

    Icaroferreira
    Participant

    @icaroferreira

    If have not installed the right template files to show the photo of users, what should I do?


    Robkk
    Moderator

    @robkk

    @icaroferreira

    give me a link to your forum or take a picture so i can see how it is right now with the userpro templates installed with the place you want the small avatars.


    Icaroferreira
    Participant

    @icaroferreira

    O que estou respondendo aqui não aparece.


    Icaroferreira
    Participant

    @icaroferreira

    My website is in maintenance.

    Look my forum, click HERE. and HERE.


    Icaroferreira
    Participant

    @icaroferreira

    My website is in maintenance.

    Look my forum, click HERE.


    Robkk
    Moderator

    @robkk

    @icaroferreira

    if you were trying to post more than 2 links in your reply , this site site wont allow it as a SPAM prevention measure because of the latest SPAM attack.

    if you ever need to post more than 2 links just paste the url without the http://

    i can just highlight and search it in google.

    as for your site being in maintenance it is really hard to help.

    i suggest you use the inspecter tools in your browser

    select the author name both under the topic title and in the freshness section

    see in the source code if there is even an image with some something like img src by the name

    if there is

    check and see if the small avatars are hidden with CSS and most likely change display:none; to dipslay:inline;

    if the image is not even in the source code by the author names.

    contact the userpro plugin author and see if they will help you install the template right if that was the problem.

Viewing 13 replies - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.
Skip to toolbar