Skip to:
Content
Pages
Categories
Search
Top
Bottom

Per forum admin?

Published on January 9th, 2017 by Sadegh Hosseini

Hi,
Is there any plugin (or code) to create admin per forum that each admin can moderate only his forum and don’t have moderation tools for other forums.
Thanks

bbpress link error

Published on January 9th, 2017 by DolZikoo

hi.

Click on ‘forums’ and an error page will pop up.

# youtube https://youtu.be/1Ylj7TnghUA

Only WordPress installed.
I installed bbpress for the first time.

# wordpress path : korear.net/
# error page : http://korear.net/wp-admin/edit.php?post_type=forum

Server Specifications
– Centos 7
– Nginx: 1.10.2
– PHP7: 7.1
– Mariadb: 10.1
– WordPress 4.7

Show User Meta Field Below Display Name

Published on January 8th, 2017 by Alex Stine

Hello,

I have a custom user meta field which is a staff label field. For people with “staff” capability, they can go to their profile in WP admin and enter some text for a label such as “Lead Developer, Writer, Support, etc. I would like to output this label on BBPress profile but cannot figure out how to do it. I am using the currently displayed profile ID. In the following file:
/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/members-header.php

I know it’s bad to hack core files, I will move to my themes folder once it’s working. This is the code I have currently.

<?php
$member_id = bp_displayed_user_id();
if ( user_can( $member_id, 'staff' ) ) {
if ( get_the_author_meta( 'staff') ) {
$x = ( get_the_author_meta( 'staff', $member_id ) == '' ) ? "Staff" : get_the_author_meta( 'staff', $member_id );
echo '<div class="staff-label">';
echo $x ;
echo '</div>';
} 
} ?>

This code is working fine in the comments area with different logic to grab the user ID, just not working for BuddyPress. Any suggestions?

Thanks. 🙂

Can Anyone Help With This Error?

Published on January 8th, 2017 by GedBrockie

Hi all, installed Buddypress then BBpress. Everything good. As admin I can do whatever I want re posting etc. Problem is…no-one else can. Every time someone from the site tries to add a topic to a board they get this response…

“ERROR: Your topic cannot be created at this time.”

Now, I have scoured this forum and seen things like: “Have you looked at your spam filter”

It’s not the spam filter. So many people get this error message and problem, yet unbelievably there seems to be no-one who has a solution after all the years of BBpress being around.

Please, if I have missed a solution on these boards, please reply. My site is here http://www.guitarandmusicinstitute.com/forums/

Thanks in advance for any help.

Top Of Screen Error: Continue reading →” />

Published on January 8th, 2017 by grimbot

Hi, at the top of the pages of this forum, an error shows up. It says:

Continue reading→” />

This error would show up from time to time on user created pages when there was a format issue. To fix it there, I would just jiggle the code around until the error went away.

The forum pages are not user created though so I’m not sure how to clear this error.

Remove topic-author, but keep reply-authors

Published on January 8th, 2017 by blueshiningstar

I would like to remove topic author, but keep reply authors.
Please tell me how to change php files.

WordPress4.7
bbPress2.5.12
Twenty Sixteen1.3

(Or please summarize below.)

Is it possible to remove topic-author, but keep reply-authors

Problem with shortcodes

Published on January 6th, 2017 by davemiller58

Am using:

Twentythirteen wordpress theme

bbPress – Version 2.5.12

With bbPress I have created a number of forums

But – when I put the following short code into a page:

it shows nothing …

Please – what am I doing wrong?

How to create a page with new topic form in

Published on January 6th, 2017 by stagezero

How to create same page as https://bbpress.org/forums/new-topic/

an easy New Topic button

Published on January 5th, 2017 by mth75

Hi all,

I added an easy New Topic button (after reading a lot of other possible solutions):

New Topic button

Add to your loop-topics.php template (before the actual loop):

<?php if (!is_user_logged_in() ) :?>
<?php else : ?>
<div class="new-topic">
	<input type="submit" name="submit" value="New Topic"  onclick="location.href='#new-post';">
</div>
<?php endif; ?>

Add some css for styling when needed:

.new-topic {  
	position: relative;
	z-index:1;
	float: right;
}

Regards,

Marc

Integrating Buddypress favorite system (aka like system) with BBPress

Published on January 5th, 2017 by mth75

Hi all,

I’m trying to integrate the BuddyPress favorite (aka like system) system with BBPress.

On my site: www.starry-night.nl I use the BuddyPress Activity page as homepage, this means that forum topics and replies are
shown on the activity wall, and can be liked.

SN Activity (Home) Page

For easy navigation I made a custom “comment” button which links to the BBPress topic or reply. BBPress activity items (topics or replies)
can be liked.

Going to a forum topic of replies of course doesn’t show any likes in the BBPress topic and replies.

SN Topic/Replies

Integrating the BuddyPress favorite system with BBPress is at least in my mind the cleanest way and from a functionality point of view, the way
to go.

On the BuddyPress forum I found the following code (below) which implements the BuddyPress favorite button in blogpost (and this works), so a rewrite
should be possible to make this work for BBPress.

In single.php for blogpost and in the future in the loop-single-reply.php for BBPress.

<?php echo get_fav_or_unfav_button_for_post( $post ); ?>

In function.php:

/ Buddypress favorites
function get_fav_or_unfav_button_for_post( $post ) {
global $bp, $activities_template;
        // user is not logged ? Show nothing.
	if ( ! is_user_logged_in() ) {
	return '';
	}
	
	$activity_id = bp_activity_get_activity_id( array(
		'user_id' => $post->post_author,
		'type' => 'new_blog_post',
		'component' => 'blogs',
		'item_id' => 1,
		'secondary_item_id' => $post->ID
		) );
	
	if ( ! $activity_id ) {
	return '';
	}
	
		bp_has_activities(); // update $activities_template of user's fav
		$old_value = false;
		
		if ( isset( $activities_template->activity->id ) ) {
		$old_value = $activities_template->activity->id;
		$activities_template->activity->id = $activity_id;
		} else {
		$activities_template->activity = (object) array( 'id' => $activity_id );
		}
	
		// building the template
	$code = '';
	$code .= '<div class="activity-meta">'."\n";

		if ( ! bp_get_activity_is_favorite() ) {
		// if not favorited, add a fav button
		$code .= ' <a href="'.bp_get_activity_favorite_link( ).'" class="button fav bp-secondary-action" title="'.__( 'Like', 'buddypress' ).'">'.__( 'Like', 'buddyboss' ).'</a>'."\n";
		
		} else {
		
		// if already favorited, a button to unfav
		$code .= ' <a href="'.bp_get_activity_unfavorite_link( ).'" class="button unfav bp-secondary-action" title="'.__( 'Unlike', 'buddypress' ).'">'.__( 'Unlike', 'buddyboss' ).'</a>'."\n";
		
		// bonus button to show user's all favs
		$code .= ' <a href="'.bp_loggedin_user_domain() . 'activity/favorites/" class="button unfav bp-secondary-action">'.__( 'My Likes', 'buddyboss' ).'</a>'."\n";
		}
		
		// closing .activity-meta
	$code .= '</div>'."\n"; 

		if ( false !== $old_value ) {
		$activities_template->activity->id = $old_value;
		} else {
		$activities_template->activity = null;
		}
	return $code;
}

I’m having problems with rewriting the array for bbpress:

$activity_id = bp_activity_get_activity_id( array(
		'user_id' => $post->post_author,
		'type' => 'new_blog_post',
		'component' => 'blogs',
		'item_id' => 1,
		'secondary_item_id' => $post->ID
		) );

Help for figuring this one out is appreciated.

Best regards,

Marc

Skip to toolbar