Search Results for 'code'
-
Search Results
-
For our restricted members bbPress forum, I would like to display a user’s BadgeOS points below their username next to their posts/replies. I already found some code to display these points but I am not sure if it’s correct and how to make it show below the username.
function badgeos_get_users_points( $user_id = 0 ) {
// Use current user’s ID if none specified
if ( ! $user_id )
$user_id = wp_get_current_user()->ID;
// Return our user’s points as an integer (sanely falls back to 0 if empty)
return absint( get_user_meta( $user_id, ‘_badgeos_points’, true ) );
}Any help would be much appreciated!
FYI: we also use the latest versions of BuddyPress and the Boss theme.
Topic: BBCodes bbpress list?
We have come across and issue regarding bbPress and Groups in BuddyPress. Our organization decided against my wishes to start using the terminology Forums to describe Focus Groups and Committees. This has created an issue for our portal as Forums means something different in bbPress. After much digging I found an easy way to update the group navigation bar to reflect a name other than Forum, but the easiest way to make this work is to add apply_filters in setup_variables() in plugins/bbpress/includes/extend/buddypress/groups.php like this:
$this->name = __( 'Forum', 'bbpress' ); $this->nav_item_name = __( 'Forum', 'bbpress' ); $this->nav_item_name = apply_filters('bbp_update_nav_item_title', $this->nav_item_name); $this->name = apply_filters('bbp_update_forum_name', $this->name);then I just use add_filter in my plugin and it updates the Navigation Bar for groups to display something different.
Is this the only way this can be done, or is there a filter/action i can use to change it without touching the bbpress code? I don’t want to keep changing code every time there is an update to bbPress.
So my request is to add these apply_filter lines above to the groups.php file going forward for flexibility. I’m sure the same could be don with slug, but I don’t care much what the url is as long as the display name is correct.
Thanks for everything you guys do!
Topic: Tracked Discussions
Hello,
Is there a shortcode or a function that can retrieves all of subscribed forums,forums that you have replied? In short to get all forum/topics that you or a user have involvement in a single page.
We are using.
bbpress Version 2.5.14
WordPress 4.9.4
Custom made theme.When I create in /wp-content/themes/my-theme/bbpress/loop-topics.php then I can overwrite the default BBPress template this way.
But creating /wp-content/themes/my-theme/bbpress/loop-topics-[FORUM_ID_HERE].php doesn’t use this template for that category ID which seems to be against https://developer.wordpress.org/themes/basics/template-hierarchy/ and https://codex.bbpress.org/themes/theme-compatibility/template-hierarchy-in-detail/
Is there a way to create a separate page template per forum ID without using conditional tags in loop-topics.php?
Hi there,
I’m trying to write a script for displaying the recently active topics in general, and active topics since last visit for users. However, I’m running into a problem with
bbp_reply_url();It works fine for most topics, but we also got some rather large topics. For those the url is not generated correct: It misses the /page/1234/ part, e.g:
/forums/topic/kleine-vario-vragen-topic/#post-669703is wrong.
It should be/forums/topic/kleine-vario-vragen-topic/page/259/#post-669703The same thing happens when I click the reply ID in the reply header, it also generates an url without the /page/1234/ part.
For those urls missing the /page/1234/ part they redirect me to the first page of the topic, instead of the last page & reply. Can anyone help me solve this?
Best regards,
Topic: Small template issues
Hi there,
I’m expiriecing a minor template issue within BBpress.
When I try to move or split a post the form is not showing as supposed to, for example:

It doesn’t matter if I make the screen big or small.
<div class="inside-article">has a width of 864px.It’s not a big issue as this function is only available for moderators, but still.
Best regards,
Alrik