Search Results for 'code'
-
Search Results
-
I’m customizing my buddypress/bbpress user pages to be taken out of their traditional framework and placing that data on indvidual pages. However, when I do this the code has issues recognizing the current user and automatically ignores the logged in user. Does anyone know how to resolve this issue?
URL: http://obeii.com/discussions-topics-started/
CODE: (topics started)
<?php do_action( 'bbp_template_before_user_topics_created' ); ?> <div id="bbp-user-topics-started" class="bbp-user-topics-started"> <div class="bbp-user-section"> <?php if ( bbp_get_user_topics_started() ) : ?> <?php bbp_get_template_part( 'pagination', 'topics' ); ?> <?php bbp_get_template_part( 'loop', 'topics' ); ?> <?php bbp_get_template_part( 'pagination', 'topics' ); ?> <?php else : ?> <p><?php bbp_is_user_home() ? _e( 'You have not started any topics.', 'bbpress' ) : _e( 'This user has not started any topics.', 'bbpress' ); ?></p> <?php endif; ?> </div> </div><!-- #bbp-user-topics-started --> <?php do_action( 'bbp_template_after_user_topics_created' ); ?>Topic: Change user color
Hello BBPRESS community,
I really want to change color of my usergroups in my forum made by bbpress.
I have the standard role (keymaster, moderator, blocked ecc) but with names modified by editing the file functions.php in my theme folder.Now I would like to change the color in the status bar and in the topic/threads, example Administrator in the red, moderators in blue ecc.
I tried a insert this code in bbpress/templates/default/css/bbpress.css:.bbp-author-role-keymaster { background:blue; color:white; padding:0 5px; }but it does not change anything, why?
I want to change color here
and in threads/topic discussion.
How I do?
Thank you very much.Hey, this is a bit of a unique situation, so I’m not sure how much you’ll be able to help. We had a bbPress forum which we closed in 2015. The “topics” we migrated to a custom post type so that we could keep them published, but without the forum framework.
Recently, we’ve decided to re-open the forums on a new site. I exported the Forums, the Topics (which I switched back to the “topic” custom post type), and the Replies. We’re having two issues:
1) The topics are not longer associated with their respective forums. Same for the replies with their topics. I know we can manually re-associate them, but there are hundreds of topics and replies. I’ve tried the Repair tool under the Tools menu, but it didn’t fix anything. Are there any other options?
2) Additionally, the replies are not appearing in admin at all. I can see that there are 300+ published replies but where the list should be, I instead get this fatal error:
Fatal error</b>: Allowed memory size of 33554432 bytes exhausted (tried to allocate 4096 bytes) in <b>xxxxxx\wp-includes\class-wp-hook.php</b> on line <b>279</b>Any help on either of these would be much appreciated. Thanks!
I get the error message “Oh bother! No topics were found here!”. I have installed bbpress and working on a divi theme. My shortcode for forum works but not my topics or index short code and I get this error. https://motionspecificrelease.ca/msr-community/
Topic: Syntax error in tools.php
tools.php
function bbp_admin_repair_user_favorites() { 643 $values[] = "('{$user->user_id}', '{$key}, '{$favorites_joined}')";Should be
function bbp_admin_repair_user_favorites() { 643 $values[] = "('{$user->user_id}', '{$key}','{$favorites_joined}')";Hi,
I have the following code in my themes functions.php
function bbp_reverse_reply_order( $query = array() ) { // bbp_has_replies_query is depricated ?
$query['order']='DESC';
return $query;
}
add_filter('bbp_has_replies_query','bbp_reverse_reply_order');This works fine except when a new reply is added, you get redirected to the page with the oldest replies instead of the page that contains the just added reply. This seems to be an old problem, have tried various plugins, but they all lead to the same outcome.
So the question is how to force, after adding a new reply, to be directed to the right page.
site freya.nl, latest versions WordPress and bbPress.
I would love to know how to hide buttons like login or register when the user is logged in and vice versa for opposite scenarios.
Im surprised that’s not how it functions by default. Why can i access the log in page when im logged in? There should be redirect options for this.
Does anyone have any suggestions that does not involve a ton of code. Remember, that’s the whole point of WP and plugins.
We have a BBPress forum that is behind a membership site, and we give them the capability of subscribing to threads. Our problem is that if a person stops subscribing they no longer have access to the site, and therefore have no way of unsubscribing from a topic.
Is there a way that we can generate a script/link to force an automatic unsubscribe from all topics when removing the user? Even if we need to manually create the link, it would be an improvement.
I can generate code if necessary-just don’t know where to start.
Thanks,
BobFYI I’m using version 4.9.6 of wordpress and version 2.5.14 of bbPress.
I added custom code to my theme functions.php page to add customized roles for bbPress. The roles show up when I edit users and want to change their roles, but when I go to save it, they just default back to a participant role. How can I fix this? Here is the code I used below:
/* bbPress Custom Roles */ function add_custom_role( $bbp_roles ) { $bbp_roles['my_custom_role2'] = array( 'name' => 'Producer', 'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants ); $bbp_roles['my_custom_role3'] = array( 'name' => 'Engineer', 'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants ); $bbp_roles['my_custom_role4'] = array( 'name' => 'Songwriter', 'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants ); $bbp_roles['my_custom_role5'] = array( 'name' => 'Staff', 'capabilities' => bbp_get_caps_for_role( bbp_get_moderator_role() ) // the same capabilities as keymaster ); $moderator = bbp_get_moderator_role() ; $bbp_roles[$moderator] = array( 'name' => 'Moderator', 'capabilities' => bbp_get_caps_for_role( bbp_get_moderator_role() ) // the same capabilities as keymaster ); $keymaster = bbp_get_keymaster_role() ; $bbp_roles[$keymaster] = array( 'name' => 'Chief Executive Officer', 'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() ) // the same capabilities as keymaster ); $apprentice = bbp_get_participant_role() ; $bbp_roles[$apprentice] = array( 'name' => 'Member', 'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants ); return $bbp_roles; } add_filter( 'bbp_get_dynamic_roles', 'add_custom_role', 1 );