Search Results for 'code'
-
AuthorSearch Results
-
January 13, 2015 at 5:15 pm #156887
In reply to: Problem with header
Robkk
Moderatorok i think i found it this is whats causing the space on your other pages an not on the forum archive
it has this code close to the header, while on the bbPress forum archive doesnt
<div class=”container-inner”>
<p class=”site-title”>SDGR.pl</p>
`
<p class=”site-description”></p><div id=”wpai_widget-11″ class=”widget widget_wpai_widget”>
<div style=”display: table; margin: 20px auto;”>January 13, 2015 at 4:24 pm #156885In reply to: Problem with header
Robkk
Moderatorif you haven’t already create a bbpress.php file and put it in a bbpress folder in your child theme and see if this fixes your issue.
January 13, 2015 at 3:12 pm #156882In reply to: Category Tree
Robkk
Moderatorin your child theme create a folder called bbpress (unless you already have one)
use FTP by using software like Filezilla on your CPU or upload the file in the bbpress folder in your hosts file manager
to know what FTP is and how to use it go to the What is FTP and how do I access it? section in this document https://codex.bbpress.org/functions-files-and-child-themes-explained/
January 13, 2015 at 1:31 pm #156878In reply to: Change Breadcrumb url link
Robin W
Moderatorok, I’ve had a detailed look, and there is no simple filter, so we just copy the function, rename it, and the hook back
so post this in your functions file
function change_root( $args = array() ) { // Turn off breadcrumbs if ( apply_filters( 'bbp_no_breadcrumb', is_front_page() ) ) return; // Define variables $front_id = $root_id = 0; $ancestors = $crumbs = $tag_data = array(); $pre_root_text = $pre_front_text = $pre_current_text = ''; $pre_include_root = $pre_include_home = $pre_include_current = true; /** Home Text *********************************************************/ // No custom home text if ( empty( $args['home_text'] ) ) { $front_id = get_option( 'page_on_front' ); // Set home text to page title if ( !empty( $front_id ) ) { $pre_front_text = get_the_title( $front_id ); // Default to 'Home' } else { $pre_front_text = __( 'Home', 'bbpress' ); } } /** Root Text *********************************************************/ // No custom root text if ( empty( $args['root_text'] ) ) { $page = bbp_get_page_by_path( bbp_get_root_slug() ); if ( !empty( $page ) ) { $root_id = $page->ID; } $pre_root_text = bbp_get_forum_archive_title(); } /** Includes **********************************************************/ // Root slug is also the front page if ( !empty( $front_id ) && ( $front_id === $root_id ) ) { $pre_include_root = false; } // Don't show root if viewing forum archive if ( bbp_is_forum_archive() ) { $pre_include_root = false; } // Don't show root if viewing page in place of forum archive if ( !empty( $root_id ) && ( ( is_single() || is_page() ) && ( $root_id === get_the_ID() ) ) ) { $pre_include_root = false; } /** Current Text ******************************************************/ // Search page if ( bbp_is_search() ) { $pre_current_text = bbp_get_search_title(); // Forum archive } elseif ( bbp_is_forum_archive() ) { $pre_current_text = bbp_get_forum_archive_title(); // Topic archive } elseif ( bbp_is_topic_archive() ) { $pre_current_text = bbp_get_topic_archive_title(); // View } elseif ( bbp_is_single_view() ) { $pre_current_text = bbp_get_view_title(); // Single Forum } elseif ( bbp_is_single_forum() ) { $pre_current_text = bbp_get_forum_title(); // Single Topic } elseif ( bbp_is_single_topic() ) { $pre_current_text = bbp_get_topic_title(); // Single Topic } elseif ( bbp_is_single_reply() ) { $pre_current_text = bbp_get_reply_title(); // Topic Tag (or theme compat topic tag) } elseif ( bbp_is_topic_tag() || ( get_query_var( 'bbp_topic_tag' ) && !bbp_is_topic_tag_edit() ) ) { // Always include the tag name $tag_data[] = bbp_get_topic_tag_name(); // If capable, include a link to edit the tag if ( current_user_can( 'manage_topic_tags' ) ) { $tag_data[] = '<a href="' . esc_url( bbp_get_topic_tag_edit_link() ) . '" class="bbp-edit-topic-tag-link">' . esc_html__( '(Edit)', 'bbpress' ) . '</a>'; } // Implode the results of the tag data $pre_current_text = sprintf( __( 'Topic Tag: %s', 'bbpress' ), implode( ' ', $tag_data ) ); // Edit Topic Tag } elseif ( bbp_is_topic_tag_edit() ) { $pre_current_text = __( 'Edit', 'bbpress' ); // Single } else { $pre_current_text = get_the_title(); } /** Parse Args ********************************************************/ // Parse args $r = bbp_parse_args( $args, array( // HTML 'before' => '<div class="bbp-breadcrumb"><p>', 'after' => '</p></div>', // Separator 'sep' => is_rtl() ? __( '‹', 'bbpress' ) : __( '›', 'bbpress' ), 'pad_sep' => 1, 'sep_before' => '<span class="bbp-breadcrumb-sep">', 'sep_after' => '</span>', // Crumbs 'crumb_before' => '', 'crumb_after' => '', // Home 'include_home' => $pre_include_home, 'home_text' => $pre_front_text, // Forum root 'include_root' => $pre_include_root, 'root_text' => $pre_root_text, // Current 'include_current' => $pre_include_current, 'current_text' => $pre_current_text, 'current_before' => '<span class="bbp-breadcrumb-current">', 'current_after' => '</span>', ), 'get_breadcrumb' ); /** Ancestors *********************************************************/ // Get post ancestors if ( is_singular() || bbp_is_forum_edit() || bbp_is_topic_edit() || bbp_is_reply_edit() ) { $ancestors = array_reverse( (array) get_post_ancestors( get_the_ID() ) ); } // Do we want to include a link to home? if ( !empty( $r['include_home'] ) || empty( $r['home_text'] ) ) { $crumbs[] = '<a href="' . trailingslashit( home_url() ) . '" class="bbp-breadcrumb-home">' . $r['home_text'] . '</a>'; } // Do we want to include a link to the forum root? if ( !empty( $r['include_root'] ) || empty( $r['root_text'] ) ) { // Page exists at root slug path, so use its permalink $page = bbp_get_page_by_path( bbp_get_root_slug() ); if ( !empty( $page ) ) { $root_url = get_permalink( $page->ID ); // Use the root slug } else { $root_url = get_post_type_archive_link( bbp_get_forum_post_type() ); } // Add the breadcrumb //$crumbs[] = '<a href="' . esc_url( $root_url ) . '" class="bbp-breadcrumb-root">' . $r['root_text'] . '</a>'; $crumbs[] = '<a href="/forums/">Forums</a>'; } // Ancestors exist if ( !empty( $ancestors ) ) { // Loop through parents foreach ( (array) $ancestors as $parent_id ) { // Parents $parent = get_post( $parent_id ); // Skip parent if empty or error if ( empty( $parent ) || is_wp_error( $parent ) ) continue; // Switch through post_type to ensure correct filters are applied switch ( $parent->post_type ) { // Forum case bbp_get_forum_post_type() : $crumbs[] = '<a href="' . esc_url( bbp_get_forum_permalink( $parent->ID ) ) . '" class="bbp-breadcrumb-forum">' . bbp_get_forum_title( $parent->ID ) . '</a>'; break; // Topic case bbp_get_topic_post_type() : $crumbs[] = '<a href="' . esc_url( bbp_get_topic_permalink( $parent->ID ) ) . '" class="bbp-breadcrumb-topic">' . bbp_get_topic_title( $parent->ID ) . '</a>'; break; // Reply (Note: not in most themes) case bbp_get_reply_post_type() : $crumbs[] = '<a href="' . esc_url( bbp_get_reply_permalink( $parent->ID ) ) . '" class="bbp-breadcrumb-reply">' . bbp_get_reply_title( $parent->ID ) . '</a>'; break; // WordPress Post/Page/Other default : $crumbs[] = '<a href="' . esc_url( get_permalink( $parent->ID ) ) . '" class="bbp-breadcrumb-item">' . get_the_title( $parent->ID ) . '</a>'; break; } } // Edit topic tag } elseif ( bbp_is_topic_tag_edit() ) { $crumbs[] = '<a href="' . esc_url( get_term_link( bbp_get_topic_tag_id(), bbp_get_topic_tag_tax_id() ) ) . '" class="bbp-breadcrumb-topic-tag">' . sprintf( __( 'Topic Tag: %s', 'bbpress' ), bbp_get_topic_tag_name() ) . '</a>'; // Search } elseif ( bbp_is_search() && bbp_get_search_terms() ) { $crumbs[] = '<a href="' . esc_url( bbp_get_search_url() ) . '" class="bbp-breadcrumb-search">' . esc_html__( 'Search', 'bbpress' ) . '</a>'; } /** Current ***********************************************************/ // Add current page to breadcrumb if ( !empty( $r['include_current'] ) || empty( $r['current_text'] ) ) { $crumbs[] = $r['current_before'] . $r['current_text'] . $r['current_after']; } /** Separator *********************************************************/ // Wrap the separator in before/after before padding and filter if ( ! empty( $r['sep'] ) ) { $sep = $r['sep_before'] . $r['sep'] . $r['sep_after']; } // Pad the separator if ( !empty( $r['pad_sep'] ) ) { if ( function_exists( 'mb_strlen' ) ) { $sep = str_pad( $sep, mb_strlen( $sep ) + ( (int) $r['pad_sep'] * 2 ), ' ', STR_PAD_BOTH ); } else { $sep = str_pad( $sep, strlen( $sep ) + ( (int) $r['pad_sep'] * 2 ), ' ', STR_PAD_BOTH ); } } /** Finish Up *********************************************************/ // Filter the separator and breadcrumb $sep = apply_filters( 'bbp_breadcrumb_separator', $sep ); $crumbs = apply_filters( 'bbp_breadcrumbs', $crumbs ); // Build the trail $trail = !empty( $crumbs ) ? ( $r['before'] . $r['crumb_before'] . implode( $sep . $r['crumb_after'] . $r['crumb_before'] , $crumbs ) . $r['crumb_after'] . $r['after'] ) : ''; return apply_filters( 'change_root', $trail, $crumbs, $r ); } add_filter ('bbp_get_breadcrumb', 'change_root') ;January 13, 2015 at 1:09 pm #156876In reply to: Rersonal reply.
MadKort
ParticipantOk. Remove some code and this is what I need.
January 13, 2015 at 1:03 pm #156874Robkk
Moderatorits tricky to solve issues in premium themes.
first contact your theme authors support.
see if its only that themes issue
see if its a plugin issue , deactivate every plugin but bbPress if that solves it reactivate each one and try to pinpoint the one causing the issue.
if you havent created a bbpress.php file see if creating one fixes the issue.
January 13, 2015 at 12:50 pm #156872In reply to: Auto close topic after some time / days
Robin W
Moderatoryes just use ‘hours’ instead of ‘days’
eg
if ($last_active < strtotime( '-48 hours') )January 13, 2015 at 12:34 pm #156869In reply to: Category Tree
Robkk
Moderatordownload this .zip , extract the file loop-forums.php and copy it into a folder called bbpress in your child theme
https://github.com/robkk/bbPress-Hierarchical-Forum-and-Category-Layout
more on bbpress templates go to this.
codex.bbpress.org/theme-compatibility/
need anymore help setting it up please reply back.
January 13, 2015 at 11:41 am #156862In reply to: Search not working in default theme (twentyfifteen)
Robkk
Moderatori think i found it, i had the bbpress templates copied to my child theme of twenty-fifteen and it worked, i then removed it and i saw exactly what you explained.
you have to copy the bbPress templates to a folder called bbpress in your child-theme
follow this document and see if it fixes your issue.
January 13, 2015 at 10:37 am #156860j0n4h
ParticipantSorry for the late response! So, it was in fact a bug in the Avada theme code. Because of this, they just manually fixed it for me and are including the fix in their next patch, so hopefully it won’t happen to users in the future.
Their Dev response:
We have customized template files in the theme and there was a bug where Post count was not adding topic count on top of reply count which is what I have changed for you.
Anyways, I have fixed the post count issue for you and it will also be fixed in the next version of Avada.
January 13, 2015 at 10:04 am #156858In reply to: Change Breadcrumb url link
se7en1216
ParticipantSorry for the delay, was out yesterday evening.
I altered the template.php file and put the following at line 2266
Original:
// Add the breadcrumb // $crumbs[] = '<a href="' . esc_url( $root_url ) . '">' . $r['root_text'] . '</a>';Modified:
// Add the breadcrumb // $crumbs[] = '<a href="' . esc_url( $root_url ) . '">' . $r['root_text'] . '</a>'; $crumbs[] = '<a href="/forums/">Forums</a>'; }January 12, 2015 at 11:36 pm #156839Topic: bbp-single-forum issues
in forum Troubleshootingsciencegeek
ParticipantI’m very new to WP, so thanks for the support. After reading lots of support pages I’ve been able to create a simple home page showing a single Forum Topic; however, it also shows all of my other pages as boxes just below the forum box (e.g. registration, lost password, etc.) as one very long webpage. It looks like it shows all the website pages on one long page.
I’m just trying to setup my site and on the home page show only the Forum Topics. So I created a new page (lets call it “Start”) and redirected the home page to this “Start”. This worked fine.
Next I used the short code [bbp-single-forum id=49] to show my identified forum. The problem is that it shows everything else.
When I go to the forum page things look great (aka it only shows the forum, header and right column).
Go to http://www.sciencegeek.com to see the problem.Thanks again
January 12, 2015 at 10:15 pm #156838In reply to: User registration on multisite
jeffacubed
ParticipantThanks so much @korobochkin for sharing this in such detail! I’m going to test this out from start to finish on a 100% fresh bbPress, multi-site setup over the next few weeks. I’m thinking this is ‘finally’ a rock-solid sol’n to managing bbPress on multi-site, particularly in situations where the root site has no obvious visual/branding/etc relationship to the other sites on the network.
This sol’n looks very solid, much better than what I was previously doing with the Login With Ajax (lwa) plugin, wp-members (plugin) & hard-coded redirections (which while worked, seemed very ‘hacky’) & would not work with the [bbp_register] shortcodes, etc.
Thanks again Koyla!
-Jeff
January 12, 2015 at 6:45 pm #156833In reply to: post date not working
Robkk
Moderatorthats not the post-date its suppose to be an IP address
only keymasters and maybe moderators can see it and its for banning users from their IP addresses
use this custom CSS to make a little tidy
span.bbp-author-ip { font-family: "Helvetica Neue",Arial,Helvetica,"Nimbus Sans L",sans-serif; font-size: 11px; font-weight: bold; color: #AAA; word-wrap: break-word; }here is to remove it
span.bbp-author-ip { display:none; }January 12, 2015 at 5:40 pm #156824In reply to: How do I remove the yellow notices?
Robkk
Moderatorthe bbcodes one i think you can deactivate the message in gd bbpress tools settings.
go to the bbcodes section find BBCodes New Topic/Reply Notice and deactivate that.
the unrestricted HTML content message shows up for only keymasters so its not really worth messing with since you are the only one seeing it.
January 12, 2015 at 3:57 pm #156814Topic: How do I remove the yellow notices?
in forum TroubleshootingNekurahn
ParticipantThese are two notices I get when I’m logged in and about to post on the forums.
Is there any way to remove them?
“You can use BBCodes to format your content.”
“Your account has the ability to post unrestricted HTML content.”
Thank you for your time!
January 12, 2015 at 1:20 pm #156799Robin W
Moderatorok, lets break this down
A)
I was having trouble with a theme so I deactivated and reactivated bb press, since then all my “private” forums take me to a 404 page
and
However all the pages which I embedded the private forums via shortcode are still working
Can you explain further where you can and cannot see forums?
1. Are they visible from the backend
Dashboard>forums>all Forums and then ‘view’ a forum
2. On the ‘the pages which I embedded the private forums via shortcode are still working ‘ – so you can view here – yes?
3. when is the 404 page occurring – is it just the forum root page, and if so are these being listed but going to 404 when you click.
B) I presume you are logged on, at what level and can you try different levels eg participant, moderator and keymaster and tell us if this is different or the same.
c) You don’ tell us what trouble you were having with the theme, so it would be good to eliminate this and plugins so
Plugins
Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
Themes
If plugins don’t pinpoint the problem, as a test switch to a default theme such as twentytwelve, and see if this fixes.
January 12, 2015 at 10:43 am #156797In reply to: Group Forum Permalink Wrong
Sparkey
ParticipantThank you Robkk for the help. I deactivated all the plugins a couple weeks ago and checked that, no help at all.
I had forgotten about the theme thing, I did as you suggested this morning and changed to 2012, no help, I clicked on the hardcoded sidebar link and it redirected it to a bad ugly link. Which it wouldn’t do if I uncheck the “group forums” check box at bbpress settings.
Bummed
January 12, 2015 at 6:55 am #156794stevebradley1
ParticipantHi there,
I was having trouble with a theme so I deactivated and reactivated bb press, since then all my “private” forums take me to a 404 page and when I view the forum root page, it doesn’t show the private forums listed.
However all the pages which I embedded the private forums via shortcode are still working and all the posts are there?
Eeek! Please help!
January 12, 2015 at 5:03 am #156793Topic: Cannot create topic (No data received)
in forum Troubleshootingpydun
ParticipantHi everyone,
I installed bbpress on my company’s website, and when i tried to create new topic like what i am doing here, the brower will return “no data received” error, and if i click more information, i found the error code “ERR_EMPTY_RESPONSE”.
I’ve tried to deactivate most of the plugin except bbpress, and the problem remains.
And if I type something short, like “test”, it can be created.
Does this has to do with the usage of server space? Because I used about 80% of it.
Thank you in advance for your help. Please let me know if you need more information
January 11, 2015 at 10:05 pm #156787Topic: Custom Sidebar Problem
in forum Troubleshootingshootingtime
ParticipantWhile redesigning my website, I can not get the custom sidebar to work in the bbPress forum.
Plugins I have installed:
-Custom Sidebars
-bbPress WP Tweaks
Theme: Smart Mag
Forum URL: http://shootingtime.com/test2/archery-bowhunting-forum/This is how I got to where I’m at:
Attempt #1
1. I assigned bbPress to use the forum root slug /archery-bowhunting-forum/
2. I created a page with the url slug /archery-bowhunting-forum/
3. With the ‘Custom Sidebars’ plugin, I created a sidebar called ‘forums sidebar’.
4. I checked the box entitled ‘Allow this sidebar to be replaced’ on the sidebar named “main sidebar”
5. I went to the forum page (with the url slug /archery-bowhunting-forum/) and selected the ‘forums sidebar’ from the custom sidebar options
This did not work. I tried it with another individual page and it did work so I assume it’s a bbPress specific problem.
Attempt #2
1. I installed bbPress WP Tweaks
2. bbPress WP Tweaks gave me a widget called “bbPress sidebar” so I customized it.
It didn’t work.
I went to the forum page and selected “bbPress sidebar” in the option field. This didn’t work either.
There is one way I did get the forum index page and the custom sidebar to show up at the same time. It happened when the url slug was different the the bbPress forum slug and I used the bbPress shortcode for the forum to show up. When I clicked on a subforum, the custom sidebar disappeared though.
Please someone HELP!!!!!!!
Thanks
January 11, 2015 at 9:09 pm #156785In reply to: Topics remain hidden from members
renzoster
ParticipantHi!
I found some solution for this problem. Only you need to put this code on functions.php of your active theme:
function custom_bbp_show_lead_topic( $show_lead ) { if(!current_user_can('manage_options')){ $show_lead[] = 'true'; } return $show_lead; } add_filter('bbp_show_lead_topic', 'custom_bbp_show_lead_topic' );January 11, 2015 at 10:21 am #156772In reply to: Multiple forum titles
Robin W
ModeratorI’ve just added a shortcode to one of my plugins that lets you custom list forums
[display-forum-index forum= ‘2932, 2921′ breadcrumb=’no’ search=’no’] Displays the selected forum indexes – see the site for details
January 11, 2015 at 9:57 am #156767In reply to: Remove Forum text and search bar
Robkk
Moderatoryou can disable the search form in settings>forums in the backend dashboard of WordPress so that you wont have to use the CSS anymore.
and unless you already did you could remove the code that renders the title in your bbpress.php file.
if you haven’t created a bbpress.php you should
if you still need help copy the first half of the bbpress.php file you have in a reply here.
January 11, 2015 at 9:48 am #156766In reply to: bbp_setup_current_user was called incorrectly.
Robin W
ModeratorAs you no doubt already know, this is just a warning message, and bbpress say it is an issue with wordpress, and are waiting for wordpress to fix. Also as you know (but for others reading this), turning off debug fixes this.
If you want it to disappear whilst you are developing (and so need debug on), then go to
wp-content/plugins/bbpress/includes/core/sub-actions.php
and comment out/change line 147
_doing_it_wrong( __FUNCTION__, __( 'The current user is being initialized without using $wp->init().', 'bbpress' ), '2.3' );to
//_doing_it_wrong( __FUNCTION__, __( 'The current user is being initialized without using $wp->init().', 'bbpress' ), '2.3' );and change back after developing as well as turning debug off for the production environment
-
AuthorSearch Results