Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'bbpress'

Viewing 25 results - 17,401 through 17,425 (of 64,516 total)
  • Author
    Search Results
  • #155770
    Robkk
    Moderator

    you can use CSS but using this plugin is a whole lot easier

    https://wordpress.org/plugins/bbpress-enable-tinymce-visual-tab/

    #155768
    Angelo Rocha
    Participant

    Hi!
    How to make the bbpress content show in wordpress search? I create a custom search:

    <div class="col-md-8 col-md-offset-4 searchform-top" id="searchform-top">
    <form class="input-group" role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">
        <input class="form-control input-block" id="appendedInputButton" type="text" placeholder="Buscar no site" name="s" id="s">
        <span class="input-group-btn">
            <button class="btn btn-primary" type="submit" id="searchsubmit">Buscar</button>
        </span>
    </form>
    </div>

    But bbpress results not appear when i search it.

    #155767
    cocoonfxmedia
    Participant

    Using WordPress 4.0
    BBPress 2.5.4

    I am new to BBPress to start with. We moved our site from one host to a new host. We mapped all the users with the posts/forums/replies. Then all of a sudden all Forums/Topics/Replies are all showing as the Default Keymaster (we have 2 one as support and one for our client).

    So Forum public show as Admin but the Creator of the forum in the back end shows the correct person. I have tried repairing the various areas of the forum.

    Is there away to change the Author in bulk say to the default Keymaster to another Keymaster.

    HELP!

    #155765
    siddardha
    Participant

    hello,

    i am new to bbpress and this is new to me

    does the icons look like this or is there an option to change them?

    bbpress new topic

    end users may not be able to understand them easily ( me too)

    how can they be changed?

    thank you.

    #155764

    In reply to: Remove Separator

    Robin W
    Moderator

    never write code whilst your other half is waiting to go out !

    ok, this works

    function remove_sep ($args) {
    $args['before'] = '' ;
    return $args ;
    }
    
    add_filter ('bbp_before_get_forum_subscribe_link_parse_args', 'remove_sep') ;
    

    On your larger point, there are a lot of resources, but it takes a lot of practice to get good at PHP, and to understand how any plugin works which is the size that bbpress is.

    Generally it is quicker to ask a question on here, than spend hours delving into bbpress. But if you start wanting to really tailor it, then the step by step guides and other documentation will try and get you into how to go about finding code within bbpress.

    I know nothing of php 18months ago (I’m just a humble bbpress user – I didn’t write any of it!), and now have several plugins for bbpress to add functionality, so it is quire do-able.

    I’ve tried to get much of my learning into the documentation, so have a look round

    Codex

    #155762
    derricksmith01
    Participant

    Hello,

    I really needed this feature so I dug into the code and came up with a solution that doesn’t modify core files. The solution hooks the query pre_get_posts and uses the buddypress ‘plugins’ template file to catch and display the group sub forums.

    This probably isn’t the most efficient solution but it seems to work in my environment. I’ll post back if I notice any issues as more subforums are created.

    Here are the functions – place in your theme’s functions.php. I also included my plugins.php file also.

    // functions.php

    
    //Filters bbpress forum permalink if on a group forum page.  Keeps users from being redirected to sitewide forums
    function buddyboss_forum_permalink($link){
    	global $wpdb, $bp;
    	if (strpos($link, "/forums/forum/")){
    
    			$forum = substr($link, strpos($link, "/forum/") + 7);   
    			$forums = explode("/",$forum);
    			$args=array(
    				'post_type' => 'forum',
    				'name' => $forums[0],
    			);
    			$root_forum = get_posts( $args );
    			$group_id = $wpdb->get_var(
    				" SELECT group_id
    				  FROM wp_bp_groups_groupmeta
    				  WHERE meta_key = 'forum_id' AND meta_value = '". serialize(array($root_forum[0]->ID)) ."'"
    			);
    			if (isset($group_id)){
    				$group = groups_get_group( array( 'group_id' => $group_id ) );
    				unset($forums[0]);
    				$forums = implode("/",$forums);
    				$permalink = bp_get_group_forum_permalink($group)."/".$forums;
    			} else {
    				$permalink = $link;
    			}
    			
    	}
    	return $permalink;
    }
    add_filter('bbp_get_forum_permalink','buddyboss_forum_permalink',10,1);
    
    //Filters bbpress topic permalink if on a group forum page.  Keeps users from being redirected to sitewide forums
    function buddyboss_topic_permalink($link){
    	global $wpdb, $bp;
    		if (strpos($link, "/forums/topic/")){
    			$start_topic = substr($link, strpos($link, "/topic/") + 7);   
    			
    			$args=array(
    				'post_type' => 'topic',
    				'name' => $start_topic,
    			);
    			$topic = get_posts( $args );
    			
    			$topic_forums = get_post_ancestors( $topic[0]->ID );
    
    			$root_forum_id = end($topic_forums);
    			$group_id = $wpdb->get_var(
    				" SELECT group_id
    				  FROM wp_bp_groups_groupmeta
    				  WHERE meta_key = 'forum_id' AND meta_value = '". serialize(array($root_forum_id)) ."'"
    			);
    			
    			if (isset($group_id)){
    				
    				$group = groups_get_group( array( 'group_id' => $group_id ) );
    				array_pop($topic_forums);  //Pop group's root forum
    				
    				foreach ($topic_forums as $forum){
    					$post = get_post($forum); 
    					$slug = $post->post_name;
    					$forum_parts .= $slug."/";
    				}
    				$permalink = bp_get_group_forum_permalink($group)."/".$forum_parts."topic/".$start_topic;
    			} else {
    				$permalink = $link;
    			}
    			
    		}	
    			
    	return $permalink;
    }
    add_filter('bbp_get_topic_permalink','buddyboss_topic_permalink',10,1);
    
    //Filters bbpress reply permalink if on a group forum page.  Keeps users from being redirected to sitewide forums
    function buddyboss_reply_permalink($link){
    	if (strpos($link, "/forums/reply/")){
    			$reply = str_replace(site_url()."/forums/reply/","reply/",$link);
    			$forum = str_replace("/forums/forum/".$bp->groups->current_group->slug, "/groups/".$bp->groups->current_group->slug ."/forum", bbp_get_topic_permalink(bbp_get_topic_id()));
    		$permalink = $forum.$reply;
    	}
    	return $link;
    }
    add_filter('bbp_get_reply_permalink','buddyboss_reply_permalink',10,1);
    
    function buddyboss_bbpress_pre_get_posts($query){
    	global $bp;
    
    	if( $query->is_main_query()) {
    		
    		if (bp_current_action() == 'forum'){
    		
    			if (!empty($bp->action_variables) && !in_array("topic", $bp->action_variables) && !in_array("reply", $bp->action_variables)){  //Sub Forum
    				$forum = end($bp->action_variables);
    				
    				$args = array(
    					'post_type' => 'forum',
    					'name' => $forum
    				);
    				$forums = get_posts( $args );	
    				$parent = $query->get('p');
    				$query->set('p','');
    				$query->set('post_parent',$parent);
    	
    				bbpress()->current_forum_id = $forums[0]->ID;
    				bbp_set_query_name( 'bbp_single_forum' );
    				
    				return $query;
    			} 
    			
    			if (empty($bp->action_variables) ) {  //Root Group Forum
    				bbp_set_query_name( 'bbp_single_forum' );
    				
    				return $query;
    				
    			}
    			
    			if (in_array("topic", $bp->action_variables) && !in_array("reply", $bp->action_variables)){  //Topic
    				$topic = end($bp->action_variables);
    				if ($topic == 'edit'){
    					$edit_key == array_search($topic,$bp->action_variables);
    					$topic = $bp->action_variables[$edit_key-1];
    				}
    				
    				$args = array(
    					'post_type' => 'topic',
    					'name' => $topic
    				);
    				$topics = get_posts( $args );	
    
    				$query->set('p','');
    				$query->set('post_parent',$topics[0]->post_parent);
    				
    				bbpress()->current_forum_id = $topics[0]->post_parent;
    				bbpress()->current_topic_id = $topics[0]->ID;
    				bbp_set_query_name( 'bbp_single_topic' );
    				if (end($bp->action_variables) == 'edit'){
    					bbpress()->current_view_id = 'edit';
    				}
    				
    				return $query;
    			}
    			
    			if (in_array("topic", $bp->action_variables) && in_array("reply", $bp->action_variables)){ //Reply
    				$reply = array_search('reply', $bp->action_variables);
    				$reply_id = $bp->action_variables[$reply+1];
    			
    				$reply_post = get_post( $reply_id );
    				$query->set('p',$reply_id);
    				
    				bbpress()->current_topic_id = $reply_post->post_parent;
    				bbpress()->current_reply_id = $reply_id;
    				bbp_set_query_name( 'bbp_single_reply' );
    				if (end($bp->action_variables) == 'edit'){
    					bbpress()->current_view_id = 'edit';
    				}
    				return $query;
    			}
    			
    		}
    	}
    	return $query;
    }
    add_action('pre_get_posts','buddyboss_bbpress_pre_get_posts',10, 1);
    
    function buddyboss_bbpress_is_edit($retval){
    	global $bp;
    	if (end($bp->action_variables) == 'edit') $retval = true;
    	return $retval;
    }
    add_filter('bbp_is_topic_edit','buddyboss_bbpress_is_edit', 10, 1);
    add_filter('bbp_is_reply_edit','buddyboss_bbpress_is_edit', 10, 1);
    
    function buddyboss_bbpress_form_reply_content($retval){
    	global $bp;
    	if (end($bp->action_variables) == 'edit' && in_array('topic', $bp->action_variables) && in_array('reply', $bp->action_variables)) {
    		$post = get_post( bbpress()->current_reply_id );
    		return esc_textarea( $post->post_content );
    	}
    }
    add_filter('bbp_get_form_reply_content','buddyboss_bbpress_form_reply_content', 10, 1);
    
    function buddyboss_bbpress_form_topic_content($retval){
    	global $bp;
    	if (end($bp->action_variables) == 'edit' && in_array('topic', $bp->action_variables) && !in_array('reply', $bp->action_variables)) {
    		$post = get_post( bbpress()->current_topic_id );
    	
    		return esc_textarea( $post->post_content );
    	}
    }
    add_filter('bbp_get_form_topic_content','buddyboss_bbpress_form_topic_content', 10, 1);
    
    function buddyboss_bbpress_form_title(){
    	global $bp;
    	if (end($bp->action_variables) == 'edit' && in_array('topic', $bp->action_variables) && !in_array('reply', $bp->action_variables)) {
    		$post = get_post( bbpress()->current_topic_id );
    		return esc_html( $post->post_title );
    	}
    }
    add_filter('bbp_get_form_topic_title','buddyboss_bbpress_form_title', 10, 1);
    
    //Filters bbpress admin links if on a group forum page.  Keeps users from being redirected to sitewide forums
    function buddyboss_reply_admin_links( $links, $args ) {
    	global $bp;
    	if (bp_current_action() == 'forum'){ 
    	$dom = new DOMDocument;
    		$dom->loadHTML($links);
    		
    		foreach ($dom->getElementsByTagName('a') as $node) {
    			//print_r($node);
    			if ($node->nodeValue == 'Edit'){
    				$forum = str_replace("/forums/forum/".$bp->groups->current_group->slug, "/groups/".$bp->groups->current_group->slug ."/forum", bbp_get_topic_permalink(bbp_get_topic_id()));
    				$reply = str_replace(site_url()."/forums/reply/","reply/",$node->getAttribute( 'href' ));
    				$node->setAttribute('href', $forum.$reply);
    			}
    			
    		}
    		$links = $dom->saveHTML();
    	}
    	return $links;
    }
    add_filter( 'bbp_get_reply_admin_links', 'buddyboss_reply_admin_links', 10, 2 );
    

    /buddypress/groups/single/plugins.php

    
    <?php
    global $bp;
    
    do_action( 'bp_before_group_plugin_template' );
    
    if (bp_current_action() == 'forum'){
    	if (empty($bp->action_variables)){  //Forum
    		$bp->groups->current_group->id;
    				$group_forum = groups_get_groupmeta( $bp->groups->current_group->id, $meta_key = 'forum_id');
    				$group_forum_id = $group_forum[0];
    
    				bbpress()->current_forum_id = $group_forum_id;
    				bbp_get_template_part('content','single-forum');	
    	} elseif (!empty($bp->action_variables) && !in_array("topic", $bp->action_variables) && !in_array("reply", $bp->action_variables)){ 
    		
    				bbp_get_template_part('content','single-forum');
    	} elseif (in_array("topic", $bp->action_variables) && !in_array("reply", $bp->action_variables)){  //Topic
    		if (bbpress()->current_view_id === 'edit'){
    			echo "<div id='bbpress-forums'>";
    			echo "<a href='".bbp_get_topic_permalink()."'><h4><img src='".get_stylesheet_directory_uri()."/images/back_button.png' />Back to Topic</h4></a>";
    			bbp_get_template_part('form','topic');
    			echo "</div>";
    		} else {
    			bbp_get_template_part('content','single-topic');
    		}
    	} elseif (in_array("topic", $bp->action_variables) && in_array("reply", $bp->action_variables)){ //Reply
    		if (bbpress()->current_view_id === 'edit'){
    			echo "<div id='bbpress-forums'>";
    			echo "<a href='".bbp_get_topic_permalink()."'><h4><img src='".get_stylesheet_directory_uri()."/images/back_button.png' /> Back to Topic</h4></a>";
    			bbp_get_template_part('form','reply');
    			echo "</div>";
    		} else {
    			bbp_get_template_part('content','single-reply');
    		}
    		
    	}	
    } else {
    	do_action( 'bp_template_content' ); 
    }
    ?>
    
    <?php do_action( 'bp_after_group_plugin_template' );
    
    Robkk
    Moderator

    you can place this code into your child themes functions.php file

    
    /**
     * Include bbPress 'topic' custom post type in WordPress' search results
     */
    function ntwb_bbp_topic_cpt_search( $topic_search ) {
    	$topic_search['exclude_from_search'] = false;
    	return $topic_search;
    }
    add_filter( 'bbp_register_topic_post_type', 'ntwb_bbp_topic_cpt_search' );
    
    /**
     * Include bbPress 'reply' custom post type in WordPress' search results
     */
    function ntwb_bbp_reply_cpt_search( $reply_search ) {
    	$reply_search['exclude_from_search'] = false;
    	return $reply_search;
    }
    add_filter( 'bbp_register_reply_post_type', 'ntwb_bbp_reply_cpt_search' );

    got the code from here, i see you also commented on it to šŸ™‚

    https://gist.github.com/ntwb/7363a1de1184d459f0c3

    #155760

    In reply to: Page Not Found Error

    Robkk
    Moderator

    why didnt you use the phpbb to bbPress importer in the bbPress plugin.

    https://codex.bbpress.org/import-forums/

    #155756
    Robkk
    Moderator

    @andriuss

    you should make sure you have a backup set just in case

    and then update bbPress to the latest version.

    #155754
    Robkk
    Moderator

    if you were here I’d give you a big kiss.

    uhhhhhhhhhhhhhh , your welcome i guess?? haha

    about it not being updated in over a year , the plugin is very simple it basically just outputs a shortcode at the bottom of blog posts.

    and also that this functionality is going to be implemented in the future release of bbPress.

    so when the update comes and says bbPress for WordPress comments in the changelog of the plguin. you can pretty much just remove the topics for posts plugin from there on and just use bbPress.

    #155752

    In reply to: resize bbpress forum

    Robkk
    Moderator

    add this anywhere you can add custom css and see if this works

    .bbpress .container {
    max-width:100%;
    }

    if it doesnt try this also

    .bbpress .container {
    max-width:100% !important;
    }
    #155751
    Robkk
    Moderator

    yeah you shouldnt edit the core files.

    i see there is additional quotation marks in your code maybe replacing it with this will help.

    <span class="bbp-topic-started-by"><?php printf( __( 'Started by: %1$s', 'bbpress' ), bbp_get_topic_author_link( array( 'size' => '90' ) ) ); ?></span>

    #155750
    Robkk
    Moderator

    @shortgigs

    its probably because your bbpress styling is custom or you need to clear some cache maybe.

    make an administrator account with also the forum role being keymaster. and send the login details to robkk17@gmail (dot) com and ill check on it later.

    i need an administrator/keymaster account just so i can check on the IP address thing.

    #155745
    dice2dice
    Participant

    It is the plugin. I had it turned off because WordPress warns that it hasn’t been updated for over a year.


    @robkk
    if you were here I’d give you a big kiss. I’ve had over 30 emails/contact form messages from website members complaining about the forums disappearing. My web designer in in the Arctic for Xmas, I couldn’t find anyone else with bbPress experience, couldn’t find any instance of a similar problem through many, many internet searches, it’s been a stressful 24 hours so thank you very kindly.

    #155743
    Robkk
    Moderator

    @skisma i think that was just a mockup from this website in the link below

    and the author of this topic just stumbled upon it.

    http://www.sitepoint.com/forums/showthread.php?630149-bbPress-theme-project-Design-wireframe-UI/page3

    and since this is from 2009 it is most likely the bbpress standalone version 1.0x and such

    but you could accomplish close to the same result using wp-usersonline plugin and also the inbuilt stats shortcode and just a little bit of CSS.

    create a new topic about this though.

    #155742
    Robkk
    Moderator

    untick topic/reply edit logging in settings>forums to disable the logging of future posts.

    and add this CSS anywhere you can add custom CSS to hide the edit logs on any existing posts.

    #bbpress-forums .bbp-topic-content ul.bbp-topic-revision-log, 
    #bbpress-forums .bbp-reply-content ul.bbp-topic-revision-log, 
    #bbpress-forums .bbp-reply-content ul.bbp-reply-revision-log {
    display: none;
    }
    #155741

    Topic: resize bbpress forum

    in forum Showcase
    Gotzak
    Participant

    Hi there,
    im pretty new to WordPress and css.
    Till now everything worked fine but now im trying to resize my bbpress forum (www.die-dunkle-wache.de/forum) to the whole width of the browser.
    I got it to width 100% so it has the same width as the navbar, but i want it without the margin left and right (dont know if its margin or max width).
    I tried to change the Template but this didnt work.
    I just want the forum to resize all the other pages and the navbar schould stay like they are.
    Hope u can help me.

    Best Regards,
    Gotzak

    #155739
    Robkk
    Moderator

    @dice2dice

    are you using bbPress Topics for Posts??

    because i think that plugin has that kind of functionality if i can recall.

    #155738
    dice2dice
    Participant

    See the following image which is in the ‘New Post’ section of the back end of the site. The arrow highlights where there used to be an option to add a bbPress forum but it’s now gone:

    http://whichinvestmenttrust.com/wp-content/uploads/bbPress-option-has-gone.jpg

    #155737
    dice2dice
    Participant

    Yes the forums still exist @Robk but they’ve disappeared from posts.

    What I mean by that is when you create a new post you have the option of adding a bbPress forum, an option which I always took so that every article has a new or an existing forum linked to it. But the option to add a forum has disappeared, and worse than that so have all the forums have disappeared from every post.

    Here is a great example of a post that that had man comments and that looks ridiculous without its forum:
    http://whichinvestmenttrust.com/investor-clinic-income-life-required-inheritance/

    Thor forum is always at the bottom of the page.

    I don’t understand how I simply cannot have forums on my posts any more and after 20 hours of searching around the internet I have no semblance of an answer.

    How does bbPress integrate with WordPress? What would prevent it from suddenly not integrating?

    #155733
    dice2dice
    Participant

    Where is bbPress support???????

    #155727
    Robin W
    Moderator
    #155722

    Topic: CSS issue

    in forum Showcase
    sharongraylac
    Participant

    Hello there,

    Just integrated bbpress into my website, and noticed a strange CSS issue.

    The replies in forums are shifted to the left, slightly wider than the original post. This not only makes the author’s avatar shift to the left, but it also hides my left-sided border.

    This occurred BEFORE I started tampering with the CSS.

    Any ideas how to fix this?

    Here’s my mock forum: http://bellynsoul.com/forums/topic/another-test-topic/#post-7650

    Thanks so much!
    Sharon

    #155721

    Topic: Remove Separator

    in forum Themes
    MaxLiao
    Participant

    My question is simple, but for the life of me I cannot find the answer.

    I am creating my own theme from scratch. Currently I’m working on bbPress integration. So far everything is going well; however, I would like to remove the | separator that appears between Favorite and Subscribe (Favorite | Subscribe) when viewing a post. I cannot find where this dang separator is located and it needs to be gone.

    Please see the attached image for further clarification. You’ll quickly see how the separator does not belong.

    Bad Separator

    thank you for any assistance.

    #155710
    Robin W
    Moderator
Viewing 25 results - 17,401 through 17,425 (of 64,516 total)
Skip to toolbar