Skip to:
Content

BuddyPress.org

Ticket #848: username_id_bbpress.patch

File username_id_bbpress.patch, 2.2 KB (added by burtadsit, 15 years ago)
  • bp-forums-templatetags.php

     
    171171        function bp_get_the_topic_poster_id() {
    172172                global $forum_template;
    173173
    174                 return apply_filters( 'bp_get_the_topic_poster_id', $forum_template->topic->topic_poster );
     174                return apply_filters( 'bp_get_the_topic_poster_id',bp_core_get_userid($forum_template->topic->topic_poster_name) );
    175175        }
    176176
    177177function bp_the_topic_poster_avatar() {
     
    180180        function bp_get_the_topic_poster_avatar() {
    181181                global $forum_template;
    182182
    183                 return apply_filters( 'bp_get_the_topic_poster_avatar', bp_core_get_avatar( $forum_template->topic->topic_poster, 1 ) );
     183                return apply_filters( 'bp_get_the_topic_poster_avatar', bp_core_get_avatar( bp_core_get_userid($forum_template->topic->topic_poster_name), 1 ) );
    184184        }
    185185
    186186function bp_the_topic_poster_name() {
     
    189189        function bp_get_the_topic_poster_name() {
    190190                global $forum_template;
    191191
    192                 return apply_filters( 'bp_get_the_topic_poster_name', bp_core_get_userlink( $forum_template->topic->topic_poster ) );
     192                return apply_filters( 'bp_get_the_topic_poster_name', bp_core_get_userlink( bp_core_get_userid($forum_template->topic->topic_poster_name) ) );
    193193        }
    194194       
    195195function bp_the_topic_last_poster_name() {
     
    197197}
    198198        function bp_get_the_topic_last_poster_name() {
    199199                global $forum_template;
    200 
    201                 return apply_filters( 'bp_get_the_topic_last_poster_name', bp_core_get_userlink( $forum_template->topic->topic_last_poster ) );
     200//var_dump($forum_template->topic);
     201                return apply_filters( 'bp_get_the_topic_last_poster_name', bp_core_get_userlink( bp_core_get_userid($forum_template->topic->topic_last_poster_name) ) );
    202202        }
    203203
    204204function bp_the_topic_last_poster_avatar() {
     
    207207        function bp_get_the_topic_last_poster_avatar() {
    208208                global $forum_template;
    209209
    210                 return apply_filters( 'bp_get_the_topic_last_poster_avatar', bp_core_get_avatar( $forum_template->topic->topic_last_poster, 1 ) );
     210                return apply_filters( 'bp_get_the_topic_last_poster_avatar', bp_core_get_avatar( bp_core_get_userid($forum_template->topic->topic_last_poster_name), 1 ) );
    211211        }
    212212
    213213function bp_the_topic_start_time() {