Search Results for 'code'
-
Search Results
-
Topic: 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.Topic: Admin Forums and Permissions
So I’m trying to allow Editors to manage forums and forum posts. I was able to set all the capabilities to allow them to manage topics and replies but in the admin panel forum access is still denied and the page is entirely hidden from the admin side.
I did run across this topic but it’s 3 years old – is this still an issue?
Here’s what the capabilities look like that have been added:
[moderate_comments] => 1 [manage_categories] => 1 [manage_links] => 1 [upload_files] => 1 [unfiltered_html] => 1 [edit_posts] => 1 [edit_others_posts] => 1 [edit_published_posts] => 1 [publish_posts] => 1 [edit_pages] => 1 [read] => 1 [level_7] => 1 [level_6] => 1 [level_5] => 1 [level_4] => 1 [level_3] => 1 [level_2] => 1 [level_1] => 1 [level_0] => 1 [edit_others_pages] => 1 [edit_published_pages] => 1 [publish_pages] => 1 [delete_pages] => 1 [delete_others_pages] => 1 [delete_published_pages] => 1 [delete_posts] => 1 [delete_others_posts] => 1 [delete_published_posts] => 1 [delete_private_posts] => 1 [edit_private_posts] => 1 [read_private_posts] => 1 [delete_private_pages] => 1 [edit_private_pages] => 1 [read_private_pages] => 1 [list_users] => 1 [create_users] => 1 [delete_users] => 1 [edit_users] => 1 [publish_forums] => 1 [edit_forums] => 1 [edit_others_forums] => 1 [delete_forums] => 1 [delete_others_forums] => 1 [read_private_forums] => 1 [read_hidden_forums] => 1 [publish_topics] => 1 [edit_topics] => 1 [edit_others_topics] => 1 [delete_topics] => 1 [delete_others_topics] => 1 [read_private_topics] => 1 [publish_replies] => 1 [edit_replies] => 1 [edit_others_replies] => 1 [delete_replies] => 1 [delete_others_replies] => 1 [read_private_replies] => 1 [manage_topic_tags] => 1 [edit_topic_tags] => 1 [delete_topic_tags] => 1 [assign_topic_tags] => 1 [spectate] => 1 [participate] => 1 [moderate] => 1 [throttle] => 1 [view_trash] => 1 [keep_gate] => 1As far as I can tell they’re exactly the same as the keymaster ( with some additional capabilities ) so why is the Forums still unaccessible in the admin panel?
Topic: Restricting to Single Forum
Hi
Is it possible to limit the WordPress plugin bbpress to a single forum? I want to only have a single forum on my site, where users can create new topics within that forum. I’d like to remove the Forum List page entirely as well.I’ve tried putting the shortcode from this post (Restricting bbpress to a single forum) on my individual forum page, but that didn’t seem to work…
Please let me know your thoughts!
Topic: Bug in bbPress
I am using WordPress 4.8 multisite and noticed a bug in bbPress 2.5.12 and 2.5.13 (possibly older versions as well) with PHP 7.1.6.
Lines 1798-1805 of includes/forum/functions.php is
// Default to public status if (empty( $post_stati ) ) { $post_stati[] = bbp_get_public_status_id(); // Split the status string } elseif ( is_string( $post_stati ) ) { $post_stati = explode( ',', $post_stati ); }For me $post_stati looks to be an empty string so the if is evaluating to true and the next line is failing with this error:
Fatal error: Uncaught Error: [] operator not supported for strings in /srv/www/tilth.org/current/web/app/plugins/bbpress/includes/forums/functions.php on line 1800
Changing line 1799 to:
if (is_array( $post_stati) && empty( $post_stati ) ) {looks to fix the error.
Perhaps adding a line inside the conditional of
$post_stati = array();is a better fix.
Hi everyone,
I think the title is clear. Is it possible (with some coding) to display a specific forum category as the index of the forum?
I tried using shortcodes in content-archive-forum, I wasn’t expecting much, and… I didn’t get much results.
Any clue?
Hi,
I created a custom shortcode for the site pages, posts.
But it’s not working in forum post.How can i do?
My custom shortcode code:
function custom_shortcode_errorbox( $atts , $content ) { // Attributes $atts = shortcode_atts( array( ), $atts, 'error' ); $output = '<div class="errorbox"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> ' . $content . '</div>'; return $output; } add_shortcode( 'error', 'custom_shortcode_errorbox' );I’ve been searching for an answer, that I couldn’t find here. It was actually quite easy to find the solution by myself. But just in case someone need do to this too, this is how you do it:
-> Create a new folder named “bbpress” at the root of your wordpress theme:
/wp-content/themes/YOURTHEMENAME/bbpress/-> Find the file named “content-single-forum.php” located here:
/wp-content/plugins/bbpress/templates/default/bbpress/content-single-forum.php
and copy into your newly created folder:
/wp-content/themes/YOURTHEMENAME/bbpress/content-single-forum.phpNow bbpress will use this file instead, if your “YOURTHEMENAME” is in use.
-> Open the file under
/wp-content/themes/YOURTHEMENAME/bbpress/content-single-forum.php
Go to line 48, and you should find this:
<?php bbp_get_template_part( 'form', 'topic' ); ?>
Comment this line this way:
<?php //bbp_get_template_part( 'form', 'topic' ); ?>And you’re done! Easy and clean!
Of course you might want to add a button to create a new topic.
You can do it, following these steps:https://bbpress.org/forums/topic/how-to-add-new-topic-button/
