You need to port over a bbPress plugin and make it compatible with BuddyPress:
https://bbpress.org/plugins/topic/bb-topic-views/
How do I do that? I’m not a programmer at all
You can’t if you’re not familiar with code, as it takes some time getting used to how the plugin developer wrote the code to begin with and how to make it fit within BuddyPress.
@jillian, found the little snippet in the plugin from bbpress and attempted to implement it for you, experimenting myself: @r-a-y, help me on any corrections:
`// update meta
$value = get_site_option($bp->current_component”_topic_views_”.$topic);
add_site_option($bp->current_component”_topic_views_”.$topic, $value+1);`
Than the function added:
`function bp_the_topic_view_count($topic_id = false, $echo = true) {
global $action_variables;
global $bp;
global $forum_template;
if($topic_id == false)
$views = get_site_option($bp->current_component”_topic_views_”.$forum_template->topic->topic_id);
else
$views = get_site_option($bp->current_component”_topic_views_”.$topic_id);
if(!$views)
return false;
if($echo)
{
if($views == 1)
echo apply_filters( ‘bp_the_topic_post_count’, $views.” view” );
else
echo apply_filters( ‘bp_the_topic_post_count’, $views.” views” );
}else
{
if($views == 1)
return apply_filters( ‘bp_the_topic_post_count’, $views.” view” );
else
return apply_filters( ‘bp_the_topic_post_count’, $views.” views” );
}
`
Not tested.
Actually not from the bbpress, rather some from simple machines.
That code doesn’t look like it will work.
Should use internal bbPress meta functions to save the count, instead of WPs.
ok…. i dont know how to do that
i’ll pay you ray for a little small project?