Search Results for 'code'
-
AuthorSearch Results
-
December 24, 2015 at 4:02 pm #170153
In reply to: PHPBB3 to bbPress – large base import and problem
Stephen Edgar
KeymasterTheres some docs here that should help you in troubleshooting these issues:
Can I also suggest you use the development version of bbPress, there are some pretty big improvements for the importer in this upcoming version š
https://wordpress.org/plugins/bbpress/developers/
https://downloads.wordpress.org/plugin/bbpress.zipDecember 24, 2015 at 5:07 am #170144Robin W
ModeratorSUMMARY OF ISSUE AND TEMPORARY FIXES
So summary to save people needing to read this whole thread
There is an issue with WordPress 4.4 and bbpress which should (hopefully) be fixed by WordPress 4.4.1 when it is released.
The issue only affects sub forums that are private or hidden, when you will get a 404 error as the url cannot be correctly interpreted.
For those interested:
The root cause of the issue is hierarchal post URLās with custom post statuses, so in bbPress case if we have a āprivateā forum that uses a custom post status āprivateā, as such when we expect our URL to be e.g.: https://example.com/forums/forum/my-private-or-hidden-category/my-forum
If the forum or category my-private-or-hidden-category is private or hidden then the URL generated for the my-forum excludes the my-private-or-hidden-category part of the URL and the resulting url is https://example.com/forums/forum/my-forum which is incorrect, bad and makes us sad
To fix in the meantime you have 4 choices
either
a. Stay with 4.4 then implement the following
open wp-includes/post.php, scroll to about line 4300 to find function get_page_uri( $page )
In that function replaceif ( 'publish' === $parent->post_status ) {with
if ( ! empty( $parent ) ) {If you try this, please advise if this doesn’t fix for you.
or
b. Change your sub forums to main forums – it is only sub forums that are affected
or
c. In theory you could just make your private forums public, but suspect you have them private for a reason !
or
d. Revert to 4.3 and then for each forum affected change the status from private/hidden to public, save and then change back to how you want it and save.December 23, 2015 at 8:59 pm #170141Stephen Edgar
KeymasterThere is a new fix, rather an alternate that better detects and reflects the root cause of the issue:
Replace
if ( 'publish' === $parent->post_status ) {withif ( ! empty( $parent ) ) {The full details can be viewed in the WordPress ticket:
https://core.trac.wordpress.org/ticket/35084And the latest patch:
https://core.trac.wordpress.org/attachment/ticket/35084/35084.5.diffAlso please refrain from email, the bbPress team can only respond to issues we can read here in the public forums or our bug tracking and reporting system. If the current fix here is not working for you please add that here with as much detail as you can so that we can try and configure our forum configuration to match yours and reproduce the issue.
December 23, 2015 at 6:21 pm #170138In reply to: Change “Freshness” to show topic creator
Dreamsync
ParticipantAwesome thanks for the help! I just followed your instructions, and it didnt quite seem to work. It definitely did something, but not quite what was expected. Here’s a screenshot of what happened after i implemented your code: http://imgur.com/Txu9cAz
After seeing the bbpress.org forums, im realizing its not totally neccessary to replace the freshness (last post) column, but to simply add a “started by: author” section directly beneath the topic title – just like on the forums here.
Is that how it should look by default? Or are the bbpress.org forums customized?
December 23, 2015 at 8:25 am #170127In reply to: Change “Freshness” to show topic creator
rayjay
ParticipantMake a child theme of the bbpress first.
Then you need to edit the loop-single-topic.php file in your child theme to move the code below to replace the other code on the bottom..
<?php do_action( 'bbp_theme_before_topic_meta' ); ?> <p class="bbp-topic-meta"> <?php do_action( 'bbp_theme_before_topic_started_by' ); ?> <span class="bbp-topic-started-by"><?php printf( __( Started by: '%1$s', 'bbpress' ), bbp_get_topic_author_link( array( 'size' => '14' ) ) ); ?></span> <?php do_action( 'bbp_theme_after_topic_started_by' ); ?> <?php if ( !bbp_is_single_forum() || ( bbp_get_topic_forum_id() !== bbp_get_forum_id() ) ) : ?> <?php do_action( 'bbp_theme_before_topic_started_in' ); ?> <span class="bbp-topic-started-in"><?php printf( __( 'in: <a href="%1$s">%2$s</a>', 'bbpress' ), bbp_get_forum_permalink( bbp_get_topic_forum_id() ), bbp_get_forum_title( bbp_get_topic_forum_id() ) ); ?></span> <?php do_action( 'bbp_theme_after_topic_started_in' ); ?> <?php endif; ?> </p> <?php do_action( 'bbp_theme_after_topic_meta' ); ?>replace the abvoe code with below code..
<?php do_action( 'bbp_theme_before_topic_freshness_link' ); ?> <?php bbp_topic_freshness_link(); ?> <?php do_action( 'bbp_theme_after_topic_freshness_link' ); ?> <p class="bbp-topic-meta"> <?php do_action( 'bbp_theme_before_topic_freshness_author' ); ?> <span class="bbp-topic-freshness-author"><?php bbp_author_link( array( 'post_id' => bbp_get_topic_last_active_id(), 'size' => 14 ) ); ?></span> <?php do_action( 'bbp_theme_after_topic_freshness_author' ); ?> </p>December 22, 2015 at 10:57 pm #170116Topic: Change “Freshness” to show topic creator
in forum ShowcaseDreamsync
ParticipantHi there,
I have a community that has been providing feedback that it is confusing to them when it shows the last poster rather than the person who started the topic.. I am assuming there is a simple bit of code that can help me with this, but I am no php expert..
Ideally, Id like to change the Freshness column to a Creator column that shows who created the topic.. See example: http://imgur.com/Wv0FnQr
Thanks in advance š
December 22, 2015 at 7:30 pm #170115Topic: PHP Error When Migrating My BBPress 1.2 Forum
in forum Troubleshootinghonestscott
ParticipantHi,
I know I should be using the latest version of BBPress, but I can’t get it to import “correctly” and I don’t want to lose 7 years worth of posts.
With that said, I am moving my installation to a new host, and I keep getting these error messages. I have done this before, and didn’t have any problems.
So I am wondering why now?
I have a screen shot of the error codes here: http://fasteddypublishing.info/bbpress-error.png
I would really appreciate it if someone could help me figure if it’s something I am doing, or a problem with my new hosting server’s PHP.
Thanks!
Scott
December 22, 2015 at 3:16 pm #170109In reply to: Just blue links??
Pascal Casier
ModeratorHi,
To display more forums, I normally use a filter. Like Robbkk posted some days ago:function rkk_increase_forum_per_page( $args ) { $args['posts_per_page'] = get_option( '_bbp_forums_per_page', 150 ); return $args; } add_filter( 'bbp_before_has_forums_parse_args', 'rkk_increase_forum_per_page' );Just add this to your functions.php or put it in a child theme.
Pascal.December 22, 2015 at 1:46 pm #170108In reply to: No content or access to edit top level “Forums” page
Toni
ParticipantThis is odd, but stellar! Recently I still had problems with the main forum page. Both in my theme and 2015 theme. It was in the breadcrumb nav, finally, I don’t know why. There was no page generated for it in the Menu. Now it’s there. The final issue was that shortcode was not rendering on that page, I wanted the forum index there. Today it all works!
Everything is awesome! Maybe there was an update?
Fabulous Forum http://toni-esl.com/eslforum/write/
(The site http://toni-esl.com/eslforum/)December 21, 2015 at 10:29 pm #170099Topic: My forum does not display it’s title
in forum Troubleshootingtian94
ParticipantHi there, my forum doesn’t seem to display it’s title, i’m using the free ‘evolve’ theme. I’ve put in custom code for the subtitle to pop up; I was wondering if there is a code I can use to make the title appear too. Thanks!
http://promptbubble.com/forums/forum/written-prompts/scenario-prompts-2/action/
December 21, 2015 at 12:59 am #170083Topic: Index Displays in List Format
in forum Troubleshootingmulroyd
ParticipantHello,
Whenever I attempt to place my forum index on a page, using the [bbp-forum-index] shortcode, it displays with bullet points as though it is an unordered list of some kind. I’ve seen demos of people doing something similar and they don’t get the same result.
Thoughts?
Thank you,
Devin M.
December 20, 2015 at 11:00 pm #170082Stephen Edgar
Keymaster@mglasser The specifics of the cause are outlined in my post above
Oops! That page canāt be found on Sub Forums with WordPress 4.4
I upgraded to 4.4 and then reverted back to 4.3.1 and I think this caused my problem.
Try resaving the forum status, i.e. switch it to
public, then back toprivateWas this new logic in a new php file or a change to an existing file? Or did the upgrade make some change in the database?
See my link above also
I have learned that my host WPEngine does a non-destructive restore, so when I restored to revert back to 4.3.1 it did not remove the wp_termmeta table nor any new files that were added. But it should have reverted back any changes to existing files which would be calling this new code. My site is working now, but I am still curious how this happened so I can better understand how I should revert back to previous versions.
You should probably raise those concerns with WPEngine, there would be pros and cons of removing the
wp_termmetatable but I’d say it isn’t removed because its a “non destructive” restore, and yes the files reverted back would fix the issue, WPEngine should be able to confirm all of this for you.December 20, 2015 at 6:33 pm #170080In reply to: Blank page, still setting up
Robin W
Moderatoryour theme thinks it’s opening up a blog page – when you click genera discussion you’ll see that in menu blog is selected.
Have you followed
and looked at no. 8
December 20, 2015 at 11:45 am #170078mglasser
ParticipantJust curious what specifically changed to cause this problem. I upgraded to 4.4 and then reverted back to 4.3.1 and I think this caused my problem. Was this new logic in a new php file or a change to an existing file? Or did the upgrade make some change in the database? I have learned that my host WPEngine does a non-destructive restore, so when I restored to revert back to 4.3.1 it did not remove the wp_termmeta table nor any new files that were added. But it should have reverted back any changes to existing files which would be calling this new code. My site is working now, but I am still curious how this happened so I can better understand how I should revert back to previous versions.
December 20, 2015 at 8:26 am #170076Mihailo
ParticipantHere a solution that worked perfectly for me, from ‘Tylersoden’
If anyone stumbles upon this thread and is interested in a css solution, here is the code I use. It goes in the āAppearanceā -> āEditorā section on the wordpress control panel or in ā~/<your theme folder>/style.cssā:
.bbp-template-notice.info { display: none; }
December 19, 2015 at 7:17 pm #170068Stephen Edgar
KeymasterRobin wrote…
As far as I know for those that are affected (and thatās only a subset who have hidden/private sub forums I believe
This is correct
Robin wrote…
But this doesnāt seem to work for everyone orIt should work for everyone, if it doesn’t work for you please add a note to this thread letting me know it doesn’t please š
————————————————————
The root cause of the issue is hierarchal post URL’s with custom post statuses, so in bbPress case if we have a “private” forum that uses a custom post status “private”, as such when we expect our URL to be e.g.:
https://example.com/forums/forum/my-private-or-hidden-category/my-forumIf the forum or category
my-private-or-hidden-categoryisprivateorhiddenthen the URL generated for themy-forumexcludes themy-private-or-hidden-categorypart of the URL and the resulting url ishttps://example.com/forums/forum/my-forumwhich is incorrect, bad and makes us sad šDecember 19, 2015 at 2:35 pm #170062Robin W
ModeratorAs far as I know for those that are affected (and that’s only a subset who have hidden/private sub forums I believe – although let me know if different, the it is either
a. If you are staying with 4.4 then implement the following
open wp-includes/post.php, scroll to about line 4300 to find function get_page_uri( $page )
In that function replaceif ( 'publish' === $parent->post_status ) {with
if ( ! in_array( $parent->post_status, get_post_stati( array( 'internal' => true ) ) ) ){But this doesn’t seem to work for everyone or
b. Revert to 4.3 and then for each forum affected change the status from private/hidden to public, save and then change back to how you want it and save. That should be all you need to do. The private groups toggle is a red herring as far as I can work out
December 19, 2015 at 7:26 am #170052Topic: Layout to separate categories from forums
in forum ThemesBassSpleen
ParticipantHello,
I’m pretty new to wordpress+bbpress (been working with it for a few days now). In the past I have used other forum boards, but since I’m using wordpress now I figured while the hell not try out bbpress ?
So far I like it, I’m still working things out but I managed to do what i wanted using google when I was hitting a wall.Now, what i’d like to do is change bbpress layout from this :

to something like this :

Even with some research I don’t know what/how to modify this. I have read the “Layout and functionality ā Examples you can use” in the codex (and actually used one to get the forum list to be block instead of inline) but it doesn’t mention this kind of modification.
My html/css/php knowledge is really basic, and obviously not enough to do this on my own.
If someone could point me in the right direction I’d gladly appreciate it. Thanks !
Wordpress version : 4.4
bbpress version : 2.5.8-5815
theme used : vantageDecember 19, 2015 at 3:22 am #170049In reply to: Forums List
December 18, 2015 at 8:48 pm #170043In reply to: Random registered users can’t reply to posts
Robkk
ModeratorCould be a theme, plugin, or WordPress/bbPress issue. You can try the plugin and theme troubleshooting listed below to see if it is only your currently active theme having the issue present. After the troubleshooting come back with some results.
December 18, 2015 at 5:43 pm #170034In reply to: Embed Forum on Another Page?
Pascal Casier
ModeratorWhat I did at a certain moment was create a new page and use the [bbp-forum-index] shortcode (https://codex.bbpress.org/features/shortcodes/)
Then in my Appearance/Theme Settings, I have set the homepage to this created page.Not sure if this is what you want…
Pascal.
December 18, 2015 at 8:35 am #170025In reply to: BBPress not working on theme
Pascal Casier
ModeratorHi,
I would say to start from https://codex.bbpress.org/themes/ and read the subpages there to see if you get something out of them.
Pascal.December 17, 2015 at 8:27 pm #170021In reply to: Add close topic button/link
shazdeh
ParticipantHi!
bbP has
bbp_get_topic_close_linkfunction (defined in bbpress/includes/topics/template.php file) that outputs an anchor tag (<a>). However customizing the anchor tag proved difficult so we ended up using a bit of custom code to output the link:<?php if( is_singular( 'topic' ) && current_user_can( 'moderate' ) ) : ?> <div class="post-note"> <?php $topic = bbp_get_topic( bbp_get_topic_id() ); if( bbp_is_topic_open( $topic->ID ) ) { $uri = add_query_arg( array( 'action' => 'bbp_toggle_topic_close', 'topic_id' => $topic->ID ) ); $uri = wp_nonce_url( $uri, 'close-topic_' . $topic->ID ); echo '<a href="' . esc_url( $uri ) . '" class="bbp-topic-close-link button green">Close Thread</a>'; } ?> </div> <?php endif; ?>December 17, 2015 at 4:25 pm #170017In reply to: How to change color settings (for example font)
Pascal Casier
ModeratorHi,
Have a look here: https://codex.bbpress.org/bbpress-styling-crib/
Pascal.December 17, 2015 at 3:43 pm #170013In reply to: [bbp-topic-index] Breadcrumbs
Pascal Casier
ModeratorYou already tried something like this in CSS:
.bbp-breadcrumb:nth-of-type(1) { display:none; }Pascal.
-
AuthorSearch Results