Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 4,476 through 4,500 (of 32,518 total)
  • Author
    Search Results
  • #190483
    angrywarrior
    Blocked

    Hi! ๐Ÿ™‚

    Pretty much as the subject says. Is there somewhere a list over all BBcodes that you can use in BBpress?

    I spent some time googleing after this but I could not find any published information.

    Thank you.

    Kind regards
    AngryWarrior

    #190475
    Robin W
    Moderator

    Sorry – I can’t immediately see a better way.

    I’m not a bbpress author, but to get code changed you’ll need to post in trac

    https://bbpress.trac.wordpress.org/

    #190474
    Robin W
    Moderator

    Nothing I know of dopes that, and not without a heap of bespoke code – sorry !

    #190471
    chumtarou
    Participant

    Apologies for the delay in responding!

    Thanks very much Robin for your great work – I am still working away on the site but your shortcodes and plugins are very useful. I will be sending in a donation soon. Greatly appreciated.

    And thanks for asking Pascal – I’m working on an internal staff forum for an existing intranet so I won’t be able to post here, sorry.

    #190470
    paschoolboards
    Participant

    We have come across and issue regarding bbPress and Groups in BuddyPress. Our organization decided against my wishes to start using the terminology Forums to describe Focus Groups and Committees. This has created an issue for our portal as Forums means something different in bbPress. After much digging I found an easy way to update the group navigation bar to reflect a name other than Forum, but the easiest way to make this work is to add apply_filters in setup_variables() in plugins/bbpress/includes/extend/buddypress/groups.php like this:

                    $this->name          = __( 'Forum', 'bbpress' );
                    $this->nav_item_name = __( 'Forum', 'bbpress' );
    
                    $this->nav_item_name = apply_filters('bbp_update_nav_item_title', $this->nav_item_name);
                    $this->name = apply_filters('bbp_update_forum_name', $this->name);
    

    then I just use add_filter in my plugin and it updates the Navigation Bar for groups to display something different.

    Is this the only way this can be done, or is there a filter/action i can use to change it without touching the bbpress code? I don’t want to keep changing code every time there is an update to bbPress.

    So my request is to add these apply_filter lines above to the groups.php file going forward for flexibility. I’m sure the same could be don with slug, but I don’t care much what the url is as long as the display name is correct.

    Thanks for everything you guys do!

    #190453

    In reply to: removing search button

    themichaelglenn
    Participant

    I know this thread is 2 years old but it didn’t have the solution I was looking for, so I did some digging and figured out how to remove the Search button entirely. (So I’m putting it here in case anyone else looks for the same thing.)

    CSS will work to hide the Search button, but you can also remove it completely by modifying the bbPress template files.

    It took me a long time to find the right one, but what you wanna do is go to your plugins folder, and find the bbpress folder. Then look inside bbpress > templates > default > bbpress, and find the file named ‘content-archive-forum.php’

    This file outputs the <div id="bbpress-forums"> code at the top of your index page, then immediately after that it outputs the search field and the breadcrumbs.

    To remove the search box ONLY from your Forum Index page, just comment out the following lines of code:

    <div id="bbpress-forums">
    
    	<?php 
        
        /* Comment these lines out to remove search from your Forum Index page.
        
        if ( bbp_allow_search() ) : ?>
    
    		<div class="bbp-search-form">
    
    			<?php bbp_get_template_part( 'form', 'search' ); ?>
    
    		</div>
    
    	<?php endif; */ ?>
    
    	<?php bbp_breadcrumb(); ?>

    This will ONLY disable the search box; if you want to remove the breadcrumbs as well, then you need to comment out (or delete) the bbp_breadcrum(); line as well.

    NOTE: The safest way to do this is to create a bbpress folder inside your theme, and save the modified content-archive-forum.php there (otherwise it’ll be overwritten the next time bbPress updates.)

    #190452
    kjwuan28
    Participant

    Hello,

    Is there a shortcode or a function that can retrieves all of subscribed forums,forums that you have replied? In short to get all forum/topics that you or a user have involvement in a single page.

    We are using.
    bbpress Version 2.5.14
    WordPress 4.9.4
    Custom made theme.

    #190450
    jimblais
    Participant

    I replaced the phpBB converter code as above and when I run it, it finds nothing. It runs through but does not create forums nor topics, etc. Please advise.

    #190442
    rcoyle56
    Participant

    @netweb I tried using your code in my site’s function.php, however, the code did not work and in fact caused display errors. I noticed that this post was a few years old. Do you know how the code would be updated to work with current bbpress? I need to remove the Home breadcrumb specifically. The forum and topic breadcrumbs are fine.

    #190420
    Robin W
    Moderator

    That’s great, and the info on the site page helped greatly, particularly that bbp_get_topic_reply_count() has a number with the comma in it.

    Replies are stored in the wp_posts table. The code creates an entry for the reply order in ‘menu_order’ where there is none, which is what I hoped my filter was fixing. But if the entry has already been created, then it just uses what is in the database. So when you look at a reply, if it has no entry it creates one and then uses that. So by merely looking at a reply you can alter the database! That may explain your funny but strange fact – just by examining an entry you may be changing what is stored !

    Where the reply appears in the display is held in that table under ‘menu_order’

    so I suspect that for instance reply id 119119 – which I looked at – has a bbp_get_topic_reply_count() value of 1,062.

    Can you check the entry in phpmyadmin

    SELECTmenu_orderFROMwp_postsWHEREID= '119119'

    and see if the entry reads 1,062 or 1062 or 0 !

    That will get us further forward

    #190412
    simondevries
    Participant

    Hi,

    Yes the plugin stops the whole embed. But thats not want i want equally.

    I want to remove the logo below and the white background.

    I have asked the THeme owner about the codes and he said. The code doesnt work because there is nothing in those blocks.

    #190408
    Robin W
    Moderator

    create a directory on your child theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

    where %your-theme-name% is the name of your child theme

    find
    wp-content/plugins/bbpress/templates/default/bbpress/content-statistics.php
    Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/content-statistics.php
    bbPress will now use this template instead of the original
    and you can amend this

    so copy this file to your PC and open it up.

    then remove lines 37-40 which say

    <dt><?php _e( 'Topic Tags', 'bbpress' ); ?></dt>
    	<dd>
    		<strong><?php echo esc_html( $stats['topic_tag_count'] ); ?></strong>
    	</dd>
    

    and save the file back to your website at wp-content/themes/%your-theme-name%/bbpress/content-statistics.php

    and yes being a child theme change it won’t get overwritten.

    #190403
    .:DDoS:.
    Participant

    @robin-w Yes! Just point me where and what file it is and where to insert codes. I’ll try my best. I hope it’s in Child Theme files so that it will not mess during update. Thank you!

    #190377
    Gomle
    Participant

    First of all, a big thank you to all contributors for this extremely nice forumsoftware. I’ve been on several over the years, and BBPress is a great one – out of the box!

    I also have a question about the bubble notification. I am not much of a coder, but I can understand some.

    So what I want is that when someone replies to a post in a topic you either started or have ticked the box “subscribe to” – I would like this to show up as a notification in buddypress, and not only by e-mail.

    I don’t think my theme handles this, although it’s ready for buddypress, so I think I have to make something out of it myself.

    Any suggestions on where I might look for an answer, or maybe there is already a plugin for it that you know of?

    #190373
    Robin W
    Moderator

    Much of this is written so that I can come back to it in future, so bear with me!!

    IF YOU JUST WANT THE ANSWER – IGNORE THIS SECTION

    bbp_reply_url() calls bbp_get_reply_url.

    This function does maths by dividing the reply position by the number of replies per page in /includes/replies/template on line 487

    $reply_page = ceil( (int) bbp_get_reply_position( $reply_id, $topic_id ) / (int) bbp_get_replies_per_page() );

    bbp_get_reply_position gets the menu order in line 1742

    $reply_position = get_post_field( 'menu_order', $reply_id );

    Now I’m not sure if this reply position is comma separated, or if it is blank, then the rest of this function is adding a comma. The remainder of then function calls bbp_get_reply_position_raw which is in /includes/replies/functions

    this calls bbp_get_topic_reply_count, and in this function I think we have the issue.

    The function is in /includes/topics/template but in includes/core/filters.php

    we have a hook in line 177 which has

    add_filter( 'bbp_get_topic_reply_count', 'bbp_number_format', 10 );

    ‘bbp_number_format’ by default pouts the 000’s comma separator in.

    so if we remove this filter it should work.

    END OF…..IF YOU JUST WANT THE ANSWER – IGNORE THIS SECTION

    So try this in your functions file

    add_action('plugins_loaded', 'rew_fix_reply_numbers');
    
    function rew_fix_reply_numbers () {
    	remove_filter( 'bbp_get_topic_reply_count',    'bbp_number_format', 10 );
    	add_filter( 'bbp_get_topic_reply_count',    'rew_number_format', 10 );
    }
    
    function rew_number_format( $number = 0, $decimals = false, $dec_point = '.', $thousands_sep = '' ) {
    
    	// If empty, set $number to (int) 0
    	if ( ! is_numeric( $number ) )
    		$number = 0;
    
    	return apply_filters( 'rew_number_format', number_format( $number, $decimals, $dec_point, $thousands_sep ), $number, $decimals, $dec_point, $thousands_sep );
    }

    Let me know either way if this works !!

    #190366
    Mal
    Participant

    When I create in /wp-content/themes/my-theme/bbpress/loop-topics.php then I can overwrite the default BBPress template this way.

    But creating /wp-content/themes/my-theme/bbpress/loop-topics-[FORUM_ID_HERE].php doesn’t use this template for that category ID which seems to be against https://developer.wordpress.org/themes/basics/template-hierarchy/ and https://codex.bbpress.org/themes/theme-compatibility/template-hierarchy-in-detail/

    Is there a way to create a separate page template per forum ID without using conditional tags in loop-topics.php?

    #190363
    alriknijdam
    Participant

    Hi there,

    I’m trying to write a script for displaying the recently active topics in general, and active topics since last visit for users. However, I’m running into a problem with bbp_reply_url();

    It works fine for most topics, but we also got some rather large topics. For those the url is not generated correct: It misses the /page/1234/ part, e.g:
    /forums/topic/kleine-vario-vragen-topic/#post-669703 is wrong.
    It should be /forums/topic/kleine-vario-vragen-topic/page/259/#post-669703

    The same thing happens when I click the reply ID in the reply header, it also generates an url without the /page/1234/ part.

    For those urls missing the /page/1234/ part they redirect me to the first page of the topic, instead of the last page & reply. Can anyone help me solve this?

    Best regards,

    #190355
    jyotixxx
    Participant

    The solution is quite simple. You have to just know where to add the code.

    To get the social login at the bottom of forum home, one need to add it to the bottom of content-archive-forum.php
    If u wish to show it under a single forum, then the template is content-single-forum.php
    If u wish to show it under all topic then it is bottom of content-single-topic.php

    #190342
    alriknijdam
    Participant

    Hi there,

    I’m expiriecing a minor template issue within BBpress.
    When I try to move or split a post the form is not showing as supposed to, for example:
    form not showing as supposed to
    It doesn’t matter if I make the screen big or small.
    <div class="inside-article"> has a width of 864px.

    It’s not a big issue as this function is only available for moderators, but still.

    Best regards,
    Alrik

    #190301
    Robin W
    Moderator

    you will also need to change the fonts as it is currently black, so also add these

    .wp-embed {
    	color: #fff !important;
    }

    and

    .wp-embed-heading a {
    	color: #fff !important;
    }
    #190300
    Robin W
    Moderator

    Easiest way is to change the display using css. Add these to your theme custom css

    remove logo by

    .wp-embed-footer {
    	display: none !important;
    }

    and change the background via

    .wp-embed {
    	background: #000 !important;
    }
    #190258
    Robin W
    Moderator

    the no follow is added at output, not on saving.

    so we need to see if the topic/reply is written by an admin or editor and then remove the filter that does the no-follow

    This coded is untested, but should work

    
    add_filter ('bbp_get_topic_content' , 'follow_topic_if_admin' , 10 , 2) ;
    
    function follow_topic_if_admin ($content, $topic_id) {
    	$user_id = bbp_get_topic_author_id( $topic_id ) ;
    	$user_meta=get_userdata($user_id);
    	$user_roles=$user_meta->roles;
    	$allowed_roles = array('editor', 'administrator');
    	if( array_intersect($allowed_roles, $user_roles ) ) { 
    		remove_filter( 'bbp_get_topic_content', 'bbp_rel_nofollow',   50   );
    	}
    return apply_filters( 'follow_topic_if_admin', $content, $topic_id );
    }
    
    add_filter ('bbp_get_reply_content' , 'follow_reply_if_admin' , 10 , 2) ;
    
    function follow_reply_if_admin ($content, $reply_id) {
    	$user_id = bbp_get_reply_author_id( $reply_id ) ;
    	$user_meta=get_userdata($user_id);
    	$user_roles=$user_meta->roles;
    	$allowed_roles = array('editor', 'administrator');
    	if( array_intersect($allowed_roles, $user_roles ) ) { 
    		remove_filter( 'bbp_get_reply_content', 'bbp_rel_nofollow',   50   );
    	}
    return apply_filters( 'follow_reply_if_admin', $content, $reply_id );
    }

    Add this to your functions file.

    Let me know if it works

    #190251

    In reply to: Importing data via sql

    Stephen Edgar
    Keymaster

    Sorry for the late reply Dirk, could you post your “custom” importer code to https://gist.github.com/ and I’ll take a look ๐Ÿ™‚

    kat45
    Participant

    Hi,
    A couple of questions related to link redirection and pagination:

    1. We’ve managed to implement threaded replies with paging with the help of this tutorial:
    https://wpup.co/bbpress-threaded-nested-replies-with-paging/
    but we’re still having problems with the links under recent comments and freshness, which won’t forward you to the correct page but to the first page of the topic. Any help on how to fix this?

    2. How can we include page numbers also on top of the topic page (currently page numbers are at the bottom of the page)? Tried to follow the suggestion at the tutorial site: “copy the code from Step 6 and paste it anywhere on top of where the the topic listing code starts” but it didn’t work.

    3. How can we include navigation (page numbers) on the forum’s topic page, next to the topic names?

    Our website
    We’re using WP v. 4.9.4, theme Himalayas (1.1.1) and bbPress v. 2.5.14.

    Any help would be greatly appreciated! ๐Ÿ™‚

    #190232
    Martin J
    Participant

    Actually…. the solution above wasn’t going to work because if breadcrumbs are enabled and someone clicks on the “Forum Home”, we lose all the effort. However, I finally found the conditional statement that works.

    This is only part of my code, but you can get the idea…I originally had this:

    
    // For Jetpack Portfolio heading
    elseif (is_post_type_archive()) :
    echo '<h1 id="bts-page-title">' . __( 'WordPress Themes', 'bts' ) . '</h1>';
    
    // For bbpress forum heading
    elseif (is_bbpress('forum')) :
    echo '<h1 id="bts-page-title">' . __( 'Support Forum', 'bts' ) . '</h1>';

    However, when I did this, it worked:

    // For bbpress forum heading
    elseif (is_bbpress('forum') || is_post_type_archive('forum') ) :
    echo '<h1 id="bts-page-title">' . __( 'Support Forum', 'bts' ) . '</h1>';
    
    // For Jetpack Portfolio heading
    elseif (is_post_type_archive()) :
    echo '<h1 id="bts-page-title">' . __( 'WordPress Themes', 'bts' ) . '</h1>';

    Now what is interesting, is that if I have the bbpress conditional “after” the Jetpack portfolio one, it would not work and the bbpress heading would be “WordPress Themes”. However, I had this sudden thought that perhaps there is a priority happening here, so I moved the bbpress conditional “before” the Jetpack one, and sure enough it works. The bbpress heading is “Support Forum” and the Jetpack portfolio is “WordPress Themes”.

    Something about the sequence caused an issue…what and why I do not know.

Viewing 25 results - 4,476 through 4,500 (of 32,518 total)
Skip to toolbar