Forum Replies Created
-
One other thing to be aware of is that currently activity feed integration doesn’t seem to be working if you’ve made your site private (using Settings->Reading or Settings->Privacy). Try allowing your site to be indexed and see if that solves the integration problem. There’s an open ticket for this issue if anyone is interested:
https://bbpress.trac.wordpress.org/ticket/2151In reply to: Topics remain hidden from membersWe are also experiencing this same problem on our site. If we set a forum to “Hidden” and then make it “Public” later, none of the associated topics appear inside the forum. We’re using the bbPress 2.0 plugin with BuddyPress 1.5.2, but are using the bbPress standalone forums rather than group forums.
I’m going to investigate this over the next week or so and will post back if I find anything.
In reply to: bbPress 2: Manual activity stream integrationYou can just copy the function but replace reply with topic. I’ve pasted the code below. So you’d have two functions, one for replies and one for topics:
function bpt_topic_activity($topic_id = 0, $forum_id = 0) {
$topic_id = bbp_get_topic_id($topic_id);
$user_fullname = bbp_get_user_profile_link(bbp_get_current_user_id());
$topic_link = '<a class="topic_link" href="' . bbp_get_topic_permalink($topic_id) . '" title="' . bbp_get_topic_title($topic_id) . '">' . bbp_get_topic_title($topic_id) . '</a>';
$forum_link = '<a class="forum_link" href="' . bbp_get_forum_permalink($forum_id) . '" title="' . bbp_get_forum_title($forum_id) . '">' . bbp_get_forum_title($forum_id) . '</a>';
$my_content = bbp_get_topic_content($topic_id);
$user_id = bbp_get_current_user_id();
$the_action = " created the topic ";
bp_activity_add(array(
'user_id' => $user_id,
'type' => 'new_forum_topic',
'action' => ''. $user_fullname . '' . $the_action . '' . $topic_link . '<span class="activity_forum_link"> in the forum ' . $forum_link . '</span>',
'item_id' => $topic_id,
'secondary_item_id' => $forum_id,
'content' => $my_content,
'component' => 'bbpress',
'recorded_time' => bp_core_current_time(),
'hide_sitewide' => false
));
return;
}
add_action('bbp_new_topic', 'bpt_topic_activity');In reply to: Ajax Broken w/ JS errorsI was having the same issue and found some information here: https://codex.wordpress.org/AJAX_in_Plugins.
I’m using BuddyPress, so I added the following to my functions.php file. If you are using regular WordPress I believe you’d need to substitute site_url(‘wp-load.php’) with admin_url(‘admin-ajax.php’):
function ajaxurl_fix () {
?>
<script> var ajaxurl = '<?php echo site_url('wp-load.php'); ?>';</script>
<?php
}
add_action( 'get_header', 'ajaxurl_fix');Edit: I changed the action hook from init to get_header because I was experiencing problems logging in.