Search Results for 'code'
-
Search Results
-
Topic: group forum slug
Hi,
I am trying to change the group forum slug. E.g.
from
‘mysite.com/groups/mygroup/forum’
to
‘mysite.com/groups/mygroup/discussion’I am using this code:
function gi_rename_group_slug() { global $bp; if (isset($bp->groups->current_group->slug) && $bp->groups->current_group->slug == $bp->current_item) { $bp->bp_options_nav[$bp->groups->current_group->slug]['forum']['slug'] = 'discussion'; } } add_action('bp_init', 'gi_rename_group_slug');Unfortunately, nothing happens. What is the error? Thanks in advance.
—-
WP 4.8
bbpress 2.5.12Topic: Conversion problems
Hi,
I am trying to convert from phpBB but have come across a problem.
My reply subject and content is in a different table to the normal ‘posts’ table.
The standard code in the existing conversion file joins the topics table to the posts table like this:// Setup reply section table joins $this->field_map[] = array( 'from_tablename' => 'topics', 'from_fieldname' => 'topic_id', 'join_tablename' => 'posts', 'join_type' => 'LEFT', 'join_expression' => 'USING (topic_id) WHERE posts.post_id != topics.topic_first_post_id', 'to_type' => 'reply' );but I need to also join to the table with the subject and content, the ‘posts_text’ table.
Is this possible using the current conversion framework?
If so can anyone please help me with the syntax.Many thanks
Set up WordPress on my Windows PC. When I click on “Forums”, I get the error
Fatal error: Uncaught Error: [] operator not supported for strings in C:\xampp\htdocs\wordpress\wp-content\plugins\bbpress\includes\forums\functions.php:1800 Stack trace: #0 C:\xampp\htdocs\wordpress\wp-includes\class-wp-hook.php(298): bbp_pre_get_posts_normalize_forum_visibility(Object(WP_Query)) #1 C:\xampp\htdocs\wordpress\wp-includes\class-wp-hook.php(323): WP_Hook->apply_filters('', Array) #2 C:\xampp\htdocs\wordpress\wp-includes\plugin.php(515): WP_Hook->do_action(Array) #3 C:\xampp\htdocs\wordpress\wp-includes\class-wp-query.php(1683): do_action_ref_array('pre_get_posts', Array) #4 C:\xampp\htdocs\wordpress\wp-includes\class-wp-query.php(3248): WP_Query->get_posts() #5 C:\xampp\htdocs\wordpress\wp-includes\class-wp.php(617): WP_Query->query(Array) #6 C:\xampp\htdocs\wordpress\wp-includes\class-wp.php(735): WP->query_posts() #7 C:\xampp\htdocs\wordpress\wp-includes\functions.php(955): WP->main(Array) #8 C:\xampp\htdocs\wordpress\wp-admin\includes\post.php(1072): wp(Array) #9 C:\xampp\htdocs\wordpress\wp-admin\includ in C:\xampp\htdocs\wordpress\wp-content\plugins\bbpress\includes\forums\functions.php on line 1800
New forums can be created without any errors, but when I click on the URL of the new forum, I get the same error again.
