Not exactly…
I have a page on my blog made in PHP with my own code. Let’s say something like <?php echo “Hello world” ?> For that I had to deactivate the Visual Editor for that page in the admin section.
And now I want the forum topic with ID number 12021 to appear below my PHP code in that page.
I guess using topic tags instead of forums would be a better idea performance-wise. The topic slug can be the tag slug and it could be automatically attached via a shortcode.
hi dannyjimmy.
The point was more to find some kind of way between blogcommenting that many times becomes such a stupid form of intellectual exchange, because it has become custom to not really think about what you want to bring attention to. Cheering, fanclubbing, “yeah i think so too” mixed in with people trying to decipher the thoughts revealed in an article, newspost, blog post or whatever. By making them type in a title and making and independent “in its own right”-kinda-style – they will be forced to be more focused and people considering responding will have to choose which comment to comment on – which again will make it more focused – because one thinks – why would I respond to this ?
But, seriously – this is awesome: http://hypercomments.com. Note the thing with marking a part of the text and it automatically becomes a topic separate from the comments – that is seriously good !
And besides using posts 2 posts plugin by scribu you can get some of the way – by making a forum quickly when making a post – check it out: https://wordpress.org/extend/plugins/posts-to-posts/
It is a matter of convenience because you can just make a forum and then include by shortcode. Alternatively one could display the category-text that belongs to the forum while listing the topics belonging to it. That is using the category as an aricle in its own right and somehow displaying it when listing the topics.
But thanks.
I just wanna ask, how did you add the latest discussion at the very top? Im kinda a newbie about this
So you’re wanting to display a list of topics related to a particular post at the bottom of said post?
So an example would be something like…
[post_title]
[post_content]
[related_forum_topics]
Is that correct? Do you need these topics to be added to the list automatically or would manual updates be ok?
I was troubleshooting an issue with a rather large migration to bbPress (1.6MM posts) and bbPress 2.0.2 is very slow to load thread pages.
It looks like bbPress (WP_Query) is trying to do an unindexed query lookup:
CAST(wp_postmeta.meta_value AS CHAR) = '787852'
The query takes quite some time and does a full table scan:
# Time: 120518 19:23:53
# User@Host: db[db] @ localhost []
# Query_time: 9.688145 Lock_time: 0.000050 Rows_sent: 3 Rows_examined: 1623367
SET timestamp=1337387033;
SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts INNER JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id) WHERE 1=1 AND wp_posts.post_type IN ('topic', 'reply') AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'closed') AND ( (wp_postmeta.meta_key = '_bbp_topic_id' AND CAST(wp_postmeta.meta_value AS CHAR) = '787852') ) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date ASC LIMIT 0, 25;
Here’s a simple stack trace:
/home/site/public_html/wp-includes/query.php 2498 get_sql () -- /home/site/public_html/wp-includes/
/home/site/public_html/wp-includes/query.php 2913 get_posts () -- /home/site/public_html/wp-includes/
/home/site/public_html/wp-includes/query.php 3000 query () -- /home/site/public_html/wp-includes/
/home/site/public_html/wp-content/plugins/bbpress/bbp-includes/bbp-reply-template.php 129 __construct () -- /home/site/public_html/wp-content/plugins/bbpress/bbp-includes/
/home/site/public_html/wp-content/themes/site/bbpress/content-single-topic.php 35 bbp_has_replies () -- /home/site/public_html/wp-content/themes/site/bbpress/
/home/site/public_html/wp-includes/theme.php 1117 require () -- /home/site/public_html/wp-includes/
/home/site/public_html/wp-includes/theme.php 1091 load_template () -- /home/site/public_html/wp-includes/
/home/site/public_html/wp-includes/general-template.php 128 locate_template () -- /home/site/public_html/wp-includes/
/home/site/public_html/wp-content/plugins/bbpress/bbp-includes/bbp-core-compatibility.php 144 get_template_part () -- /home/site/public_html/wp-content/plugins/bbpress/bbp-includes/
/home/site/public_html/wp-content/themes/site/single-topic.php 33 bbp_get_template_part () -- /home/site/public_html/wp-content/themes/site/
/home/site/public_html/wp-includes/template-loader.php 43 include () -- /home/site/public_html/wp-includes/
/home/site/public_html/wp-blog-header.php 16 require_once () -- /home/site/public_html/
/home/site/public_html/index.php 17 require () -- /home/site/public_html/
Here’s the $bbp_r query passed into WP_Query:
Array
(
[meta_query] => Array
(
[0] => Array
(
[key] => _bbp_topic_id
[value] => 1623928
[compare] => =
)
)
[post_type] => Array
(
[0] => topic
[1] => reply
)
[orderby] => date
[order] => ASC
[posts_per_page] => 25
[paged] => 1
=>
[post_status] => publish,closed
)
Hi there,
I’ve looking for a solution to show below one of my blog pages a topic discussion from bbpress forum. The problem I have is that this page has the Visual Editor off in order to write PHP inside for my convenience.
So I can’t use the shortocodes there and neither the php code as it appears in the plugin templates. Because the code has to make a loop to show all the discussion for this certain topic I think it is not possible to integrate a PHP code for that on my own PHP code…
Any idea about this?
WHOA. Face melting idea.
I could see it being good for blogs who post infrequently and get tons of traffic. Every post is so monumental it gets its own FORUM… this would be like… for the UN or the White House or something.
I’m in jest — anyone who gets more than 100 comments per thread might want this; 10-20 responding topics with 5-10 comments each…
I hear you… comments/replies can be spammy and dumb dumb… but, I mean, here’s the thing:
Once a user creates a topic, then all the conversation that follows in that forum will be, likewise, comments/replies. I.e. similarly unfocused and not very constructive. So I’m not sure that what you’re proposing solves the problem you’re presenting.
Also, forum topics are easier to skim the entire content of, forums not so much. And people want to skim blog comments.
That being said, I’m still smiling thinking about how epic it might be to spawn entire forums from single blog posts. (though I can’t claim I’d use the plugin if it were made)
You should be able to login here https://codex.bbpress.org/wp-admin/ with your bbPress username/pass.
Then just head to pages.
@softechnos : Main theme.
I am probably being stupid, but I can not see where I can contribute on any of the codex pages?
Yep! Anyone can login and edit that page or contribute to other pages on the codex
I am sure there is a better solution, but you could use something like
if ( bbp_has_topics( array( 'author' => 0, 'show_stickies' => false, 'order' => 'DESC', 'post_parent' => 'any', 'posts_per_page' => 5 ) ) )
bbp_get_template_part( 'bbpress/loop', 'latest-topics' );
Then use some css to remove everything except the avatars.
function bbp_list_forums( $args = '' ) {
// Define used variables
$output = $sub_forums = $topic_count = $reply_count = $counts = '';
$i = 0;
$count = array();
// Defaults and arguments
$defaults = array (
'before' => '<ul class="bbp-forums">',
'after' => '</ul>',
'link_before' => '<li class="bbp-forum">',
'link_after' => '</li>',
'count_before' => ' (',
'count_after' => ')',
'count_sep' => ', ',
'separator' => ', ',
'forum_id' => '',
'show_topic_count' => true,
'show_reply_count' => true,
'freshness_before' => '<td class="last-posted-box">',
'freshness_after' => '</td>',
'show_freshness_link' => true,
'freshness_author_before' => '<div class="author-box">',
'freshness_author_after' => '</div>'
);
$r = wp_parse_args( $args, $defaults );
extract( $r, EXTR_SKIP );
// Bail if there are no subforums
if ( !bbp_get_forum_subforum_count( $forum_id ) )
return;
// Loop through forums and create a list
if ( $sub_forums = bbp_forum_get_subforums( $forum_id ) ) {
// Total count (for separator)
$total_subs = count( $sub_forums );
foreach ( $sub_forums as $sub_forum ) {
$i++; // Separator count
// Get forum details
$count = array();
$show_sep = $total_subs > $i ? $separator : '';
$permalink = bbp_get_forum_permalink( $sub_forum->ID );
$title = bbp_get_forum_title( $sub_forum->ID );
// Show topic count
if ( !empty( $show_topic_count ) && !bbp_is_forum_category( $sub_forum->ID ) )
$count['topic'] = bbp_get_forum_topic_count( $sub_forum->ID );
// Show reply count
if ( !empty( $show_reply_count ) && !bbp_is_forum_category( $sub_forum->ID ) )
$count['reply'] = bbp_get_forum_reply_count( $sub_forum->ID );
// Counts to show
if ( !empty( $count ) )
$counts = $count_before . implode( $count_sep, $count ) . $count_after;
// Show topic count
if ( !empty( $show_freshness_link ) && !bbp_is_forum_category( $sub_forum->ID ) ) {
$freshness_link = bbp_get_forum_freshness_link( $sub_forum->ID );
$freshness_author = $freshness_author_before . bbp_get_author_link( array( 'post_id' => bbp_get_forum_last_active_id( $sub_forum->ID ), 'size' => 14 ) ) . $freshness_author_after;
$freshness_link = $freshness_before . $freshness_link . $freshness_author . $freshness_after;
}
// Build this sub forums link
$output .= $link_before . '<a href="' . $permalink . '" class="bbp-forum-link">' . $title . $counts . $freshness_link . '</a>' . $show_sep . $link_after;
}
// Output the list
echo $before . $output . $after;
}
}
This will give you more control over creating a theme which looks like Invision or PHPBB.
You will have to customize your theme as well to make sure it is compatible.
I just commented out the sidebar from all my bbpress template files, worked perfectly.
Did you add this in the main theme or in the bbpress twenty ten directory?
I think bbp-forum-template is a core file?
You would be better off using something like this inside loop-single-forum:
bbp_list_forums(array ('count_sep' => ''));
Good luck.
Sure thing, if you do find out a solution please post it here so I as well as others can learn from it for potential future situations
I think it’s still some kind of caching issue. We’ve got WP Super Cache installed and there may be issues with that, as well as the need to edit something in our .htaccess file, which i can’t find!
Will be talking to our hosting company tomorrow and hopefully we can pinpoint the problem! Thanks again….
We had gConverter do it. They did a good job, except for the fact that we had to hire someone else to assign roles to all of the users because participants couldn’t see any of the topics.
Also, in order to make the forums work, we had to first make them public, then private, then public again.
Good times.
It’s hard to say. I noticed it reverted back after I would go into the forum and edit a topic or reply. for example, it was showing the most recent on the forum front page, but then I went in and someone had posted the same comment 3 times, so I deleted the first 2, leaving the third, and went back to the main page and it was reverted back to the 35 day old post.
We’ve had multiple problems with caching. Our server shut us down b/c something was causing our site to show major traffic. We changed the settings on our caching plugin and that seemed to fix that problem. I sure hope it’s the caching plugin that’s causing this.
In our cafe, newer posts will show up, then somehow it keeps reverting back to a post that’s 35 days old, by the same person!
I finally just added a test reply to her post, so it would stop.
It’s only happening in the forum.
We just ported the whole thing over from vBulletin to bbpress and are obviously still working out the kinks.
Sorry to sound like an idiot, but when I open different php files or CSS files, I’m doing a search inside the code by using Command F to find it. Is there another way to find the code I need to change?
Thanks for your help, JarretC!
We’re using the Genesis theme with the Serenity child theme.
Which file should this go into, exactly? There are a ton of php files and then two CSS files, which don’t seem to have anything in them.
I looked in Theme Functions and did a search for the first line of code you mentioned, but couldn’t find it.
Also, not sure how I would have my own theme made…