function bcg_fix_permalink($post_link, $id, $leavename)
{
    if (!bcg_is_component() || !in_bcg_loop()) {
        return $post_link;
    }
    $post_link = bcg_get_post_permalink(get_post($id));
    return $post_link;
}
	<div class="post" id="post-<?php 
        the_ID();
        ?>
">
        <div class="author-box">
            <?php 
        echo get_avatar(get_the_author_meta('user_email'), '50');
        ?>
            <p><?php 
        printf(__('by %s', 'bcg'), bp_core_get_userlink($post->post_author));
        ?>
</p>
        </div>
        <div class="post-content">
            <h2 class="posttitle"><a href="<?php 
        echo bcg_get_post_permalink($post);
        ?>
" rel="bookmark" title="<?php 
        _e('Permanent Link to', 'bcg');
        ?>
 <?php 
        the_title_attribute();
        ?>
"><?php 
        the_title();
        ?>
</a></h2>
            <p class="date"><?php 
        the_time();
        ?>
 <em><?php