Search Results for 'bbpress'
-
Search Results
-
Hello,
I would like to know the correct method to add a filter in a child theme for a template function.
For this example lets use ‘bbp_get_user_subscribe_link()’
I would like to insert
<icon class="icon-user"></i>
into the following before the %s
<span id="subscribe-%d" %s>%s
$html = sprintf( '%s<span id="subscribe-%d" %s>%s</span>%s', $r['before'], $topic_id, $sub, $url, $topic_id, $text, $r['after'] );
of this function bbp_get_user_subscribe_link()
function bbp_get_user_subscribe_link( $args = '', $user_id = 0, $wrap = true ) { if ( !bbp_is_subscriptions_active() ) return; // Parse arguments against default values $r = bbp_parse_args( $args, array( 'subscribe' => __( 'Subscribe', 'bbpress' ), 'unsubscribe' => __( 'Unsubscribe', 'bbpress' ), 'user_id' => 0, 'topic_id' => 0, 'before' => ' | ', 'after' => '' ), 'get_user_subscribe_link' ); // Validate user and topic ID's $user_id = bbp_get_user_id( $r['user_id'], true, true ); $topic_id = bbp_get_topic_id( $r['topic_id'] ); if ( empty( $user_id ) || empty( $topic_id ) ) { return false; } // No link if you can't edit yourself if ( !current_user_can( 'edit_user', (int) $user_id ) ) { return false; } // Decide which link to show $is_subscribed = bbp_is_user_subscribed( $user_id, $topic_id ); if ( !empty( $is_subscribed ) ) { $text = $r['unsubscribe']; $query_args = array( 'action' => 'bbp_unsubscribe', 'topic_id' => $topic_id ); } else { $text = $r['subscribe']; $query_args = array( 'action' => 'bbp_subscribe', 'topic_id' => $topic_id ); } // Create the link based where the user is and if the user is // subscribed already if ( bbp_is_subscriptions() ) { $permalink = bbp_get_subscriptions_permalink( $user_id ); } elseif ( bbp_is_single_topic() || bbp_is_single_reply() ) { $permalink = bbp_get_topic_permalink( $topic_id ); } else { $permalink = get_permalink(); } $url = esc_url( wp_nonce_url( add_query_arg( $query_args, $permalink ), 'toggle-subscription_' . $topic_id ) ); $sub = $is_subscribed ? ' class="is-subscribed"' : ''; $html = sprintf( '%s<span id="subscribe-%d" %s>%s</span>%s', $r['before'], $topic_id, $sub, $url, $topic_id, $text, $r['after'] ); // Initial output is wrapped in a span, ajax output is hooked to this if ( !empty( $wrap ) ) { $html = '<span id="subscription-toggle">' . $html . '</span>'; } // Return the link return apply_filters( 'bbp_get_user_subscribe_link', $html, $r, $user_id, $topic_id ); }So how would I construct my_custom_bbp_get_user_subscribe_link() function to add_filter( ‘bbp_get_user_subscribe_link’, ‘my_custom_bbp_get_user_subscribe_link’ ); ?
I hope the answer will serve as a general example to correctly add filters to many other template functions.
Thanks for your assistance.
Hi! I noticed that BBPress profile does not include several fields of the core WordPress profile. Is there any way to include them? It is very important for my website, because others plugins need those fields to work properly. Notice that I don´t need to create “custom fields”, but to include the core WordPress fields.
Topic: Force Login to View
On bbPress 1.x they had a plugin that forced login to view any pages within the forum, not just making the private once you’re on the forums.
Anything like this for bbPress 2?
Topic: Translation not shown
Hi,
I’ve installed bbPress 2.4.1 and I’ve the language files on:
wp-content/languages/plugins
bbpress-es_ES.mo
bbpress-es_ES.poI’ve also the correct configuration at wp-config.php:
define(‘WPLANG’, ‘es_ES’);The problem is that bbPress is showing the messages in english and not in spanish as I want.
What I’m doing wrong?
Any help will be appreciated.Thanks,
JavierGreetings all,
I am not sure even if it is possible, but I thought I seen that one could use an importer from phpbb to bbpress. Right now I use the wp-united but it seems that things are not being kept up. So am considering the transition. Is there such an importer? Stephen @netweb maybe you could help me with this? Or anyone in that matter. Part of my site is:
JosephStory Support GroupWill this be a difficult transition? Will I loose a lot?
Thanks to everyone willing to help and inform.
Joseph
Topic: french translation
Hello,
As part of a project for a forum in French which will be online soon, I completed the translation in French of bbPress and I improved (at least I hope) many strings already translated so that they are more true to the original english meaning and context.
I’m entering the translations one by one on translate.wordpress.org/projects/bbpress/2.4.x/fr/default and I would like to discuss with the french translation team about a number of aspects of the project, eg nomenclature, accents, etc.
Thank you and good day.
Hello i really need help! I have Buddypres (1.8.1) and bbpress (2.4.1), and now Participant get error message:
ERROR: Your reply cannot be created at this time.when trying post new topic in forum or replay to post.
Everything was fine in this morning until how i think in groups someone make “Group forum” after that none can post anything accept Administrator.PLEASE HELP!
Howdy,
I’ve got the latest bbPress installed on my site and I am wondering if there is a way to be notified when a new thread is created?
It would beat checking it multiple times to see any new activity.
Thanks!
Hi all,
for me is the following problem in the activation of bbPress 2.4.1:
Warning: Missing argument 1 for WP_User::__construct(), called in *… /wp-content/plugins/bbpress/bbpress.php on line 263 and defined in *…/wp-includes/capabilities.php on line 473
Warning: Missing argument 1 for WP_User::__construct(), called in *… /wp-content/plugins/bbpress/bbpress.php on line 264 and defined in *… /wp-includes/capabilities.php on line 473
Fatal error: Call to undefined function is_user_member_of_blog() in *… /wp-content/plugins/bbpress/includes/core/update.php on line 348
*… = The path I have hidden for safety reasons
On the website WordPress 3.7.1 is used. The website has an internal area. Here are pages only visible when a user has logged in. The goal of mine is to make bbPress run inside the internal area.
Reach that goal, I use on this time following plugins:WP-Members 2.7.3 from Chad Butler
Members Only Menu Plugin 2.0 from Brandon Wamboldtso far everything is stable, only now, after the installation of bbPress there is this error in the activation.
Please can any one help me with this problem?
I unfortunately am not familiar with PHP functions.Im having a really hard time finding any information about creating unique titles. Everytime I search for it, I get lead here: http://bbpress.org/forums/topic/post-count-plus/
In addition to unique titles, I was hoping to find a plugin or code that will mimic other forums with options for topic and comment counts per user. Maybe even some handy little badges that will show under their avatar.
Any help in pointing me in the right direction is greatly appreciated.bbPress stops working when WP E-Commerce plugin is used.
How can I set the width of bbpress as it should be? Thanks for your time.
Web. http://clubcamion.com/foro
WP Version. 3.7.1
BBPres Version. 2.4.1Topic: no primary role is assigned
i’m using a multisite install and need to set 2 different types of roles for my users. when a new user registers, it sets the role to participant and nothing in the primary role.
ex. new user registers, in my main site’s user panel (not under network admin), under the role column, it says ‘participant’. when i click to edit the user, it says ‘no role assigned’. this tells me the primary role is not being assigned, only the bbpress forum role.i used the ‘user role editor’ plugin to see what’s happening, and under primary role, the user has nothing (it says no role assigned). i tried unchecking the ‘auto assign role’ in bbpress settings, but then something weird happens for new registrations. no users appear in the user panel of my main site. they only appear in my network admin site.
i’m ok if bbpress assigns a participant role for the forum, but why isn’t the primary role being assigned?
thanks in advance!