0

i've been searching for a while now on how to show Cubepoints Points and Ranks in bbPress replies right below the user avatar and name...

Found the template file where to show the info, tho not sure this would be the correct one to grab the reply-author info, the "loop-single-reply.php" (using the default bbpress template files as a child-theme) and just bellow bbp_reply_author_link(); i'm placing the output (correct me if i'm wrong), and i discovered the functions to calculate and display Cubepoints and Ranks (cp_displayPoints($user->ID); & cp_module_ranks_getRank($user->ID)), correct me if i'm wrong again ^^

The question is, since working with bbpress is way more harder then wordpress due to the lack of easy to reach documentation (like wordpress codex), how can I get the reply-author ID and display the Cubepoints and Ranks, am I in the right way? what am I missing? thank you in advance!

4

1 回答 1

1

我找到了问题的解决方案,它是这样的:

<td class="bbp-reply-author">

        <?php do_action( 'bbp_theme_before_reply_author_details' ); ?>

        <?php bbp_reply_author_link( array( 'sep' => '<br />' ) ); ?>
        <!--Ranking -->
        <div class="bbp-ranking">
        <span class="bbp-rank"><?php echo cp_module_ranks_getRank(bbp_get_reply_author_id()); ?></span><br />
        <span class="bbp-points"><?php echo cp_getPoints(bbp_get_reply_author_id(); ?></span>
        </div>
        <!--Ranking -->

        <?php do_action( 'bbp_theme_after_reply_author_details' ); ?>

    </td>

在循环-single-reply.php

于 2012-06-24T23:30:10.160 回答