Skip to:
Content
Pages
Categories
Search
Top
Bottom

Where can i remove the "this forum contains … topics… and … themes"?


  • freie-bildung
    Member

    @freie-bildung

    I would like to remove the Infoarea, who says “this forum contains … topics… and … themes”?

    In which file i find this?

Viewing 20 replies - 1 through 20 (of 20 total)
  • You can find it in /bbpress/bbp-includes/bbp-forum-template.php (I’m using bbPress 2.02)

    Remove the following lines:

    // Forum

    else

    $retstr = sprintf( __( ‘This forum contains %1$s and %2$s, and was last updated by %3$s %4$s ago.’, ‘bbpress’ ), $topic_count, $reply_count, $last_updated_by, $time_since );

    and these lines:

    // Forum

    else

    $retstr = sprintf( __( ‘This forum contains %1$s and %2$s.’, ‘bbpress’ ), $topic_count, $reply_count );

    and also these lines:

    ‘before’ => ‘<div class=”bbp-template-notice info”><p class=”bbp-forum-description”>’,

    You’ll need to remove those lines in bbpress.css (Assume I’m using bbp-twentyten, so the location is /bbpress/bbp-themes/bbp-twentyten/css/bbpress.css):

    div.bbp-template-notice.info {

    border: #cee1ef 1px solid;

    background-color: #f0f8ff;

    }

    This should remove the “this forum contains … topics… replies … ” while you still can see the “this topic contains … voices … replies… ” in each topic (Do you want to remove that too?)

    Keep in mind that this is not a recommended way of changing the bbPress, as you’ll lose the setting when you perform an update (so you have to keep changing after each update), although there’s nobody to make such plugin to do that.

    And make sure to make a backup for those files, in case you accidentally remove some important lines.


    freie-bildung
    Member

    @freie-bildung

    Thank you!!!! Thank you very much :-))

    It all works perfectly!

    …. And yes, I would also like to get rid of every post in this area – you’ve got a solution?

    Again, thank you very much!

    In /bbpress/bbp-includes/bbp-topic-template.php

    Remove the following lines:

    // Topic has no replies

    } else {

    $retstr = sprintf( __( ‘This topic has %1$s, contains %2$s.’, ‘bbpress’ ), $voice_count, $reply_count );

    }

    And these lines:

    // Topic has replies

    if ( $last_reply = bbp_get_topic_last_active_id( $topic_id ) ) {

    $last_updated_by = bbp_get_author_link( array( ‘post_id’ => $last_reply, ‘size’ => $size ) );

    $retstr = sprintf( __( ‘This topic has %1$s, contains %2$s, and was last updated by %3$s %4$s ago.’, ‘bbpress’ ), $voice_count, $reply_count, $last_updated_by, $time_since );

    And also these lines:

    ‘before’ => ‘<div class=”bbp-template-notice info”><p class=”bbp-topic-description”>’,

    You didn’t need to remove anything in bbpress.css, as the style it’s using is also used by the others.

    This should do the job.


    freie-bildung
    Member

    @freie-bildung

    Hello :-)

    I have just received a response in German bbpress forum where you can change the date when an update does not always need to manually (except changing the class name or the bbpress WP Theme gets an update) …

    In the wp-theme style.css add the following:

    div.bbp-template-notice.info {display: none !important;}

    This causes the system tray is no longer displayed in the forums and in the individual posts.

    I hope this will help any other peoples :-)

    But I’m still on the search, the number of posts and the number of topics to delete (numbers in parentheses after the forum) – because you know a solution?

    Thank you very much

    FYI a better way instal of hacking core or using CSS is placing this in your functions.php

    add_filter( 'bbp_get_single_forum_description', 'ja_return_blank' ) );

    add_filter( 'bbp_get_single_topic_description', 'ja_return_blank' ) );

    function ja_return_blank() {

    ja_return '';

    }


    katmmad
    Participant

    @katmmad

    Is there a good thread or other resource that I can use to read more about filters? Haven’t found one yet. Thank you!

    Hi Jaredatch,

    I tried to add the code in

    wp-content/plugins/bbpress/bbp-themes/bbp-twentyten/functions.php

    But the message still appearing.

    “Ce forum contient 5 sujets et 8 réponses, et a été mis à jour par”

    (it s in french).

    I added the code like that:

    add_filter( ‘bbp_get_single_forum_description’, ‘ja_return_blank’ ) );

    add_filter( ‘bbp_get_single_topic_description’, ‘ja_return_blank’ ) );

    function ja_return_blank() {

    ja_return ”;

    }

    ?>

    Just before the ?>

    I’m using Genesis WordPress Theme.

    I also tried to add the code there:

    wp-content/plugins/bbpress/bbp-themes/bbp-twentyten/functions.php

    Same problem a white page.

    My question is should i put your code here:

    wp-content/plugins/bbpress/bbp-themes/bbp-twentyten/functions.php

    or there:

    wp-content/themes/genesis/functions.php

    ?

    Is there a special spot in the file ?

    Thanks

    This would be better:

    add_filter( 'bbp_get_single_forum_description', 'ja_return_blank' );
    
    add_filter( 'bbp_get_single_topic_description', 'ja_return_blank' );
    
    function ja_return_blank() {
    
        return '';
    
    }
    

    kate.t
    Participant

    @katet-1

    hey jshultz, which file should I put this in? which functions.php?


    nikoski
    Participant

    @nikoski

    @jshultz:
    Bacuase of no idea about php: where exactly should i place you code in the “functions.php”?

    And what about removing the following lines from bbpress?…

    Viewing 2 posts – 1 through 2 (of 2 total)

    My original code snippet above is wrong. I had copied out of a plugin I wrote and it has a syntax error (extra parathesis) from ripping it out of a class.

    If you use the snippet @jshultz provides, that should be correct. You should be able to place it inside your theme’s functions.php file.

    Do not place anything (or modify at all) inside the /bbpress plugin folder, as you will lose all changes when you update bbPress.


    nikoski
    Participant

    @nikoski

    …sorry for the post above but i cannot edit anymore, here come the right one:

    Thanks jaredatch! I inserted the above code from “jshultz” at the end, just before the last “?>” in the functions.php of my theme and it seems to work well 🙂

    This code removes only the 1 item: “this forum contains … topics… and … themes”

    But i’d like to get rid also of 3 other following things from the info area:
    – Viewing x topics – 1 through x (of x total)
    – You may use these HTML tags and attributes: a href title abbr title acronym title blockquote cite
    – Topic Tags + the field below

    How could that be accomplished?

    It’s a pity no plugin does seem to exist allowing to surpress those things that are of no use for many less proficient members that use my forum.

    • This reply was modified 11 years, 5 months ago by nikoski.

    craig
    Participant

    @craigheyworth

    Hi all,

    So I’m now just trying to remove the ‘topic contains’ elements in bbpress, and I’ve used @jshultz ‘s code above in my themes function.php file, but it no longer seems to work.

    Would there be an update for this?


    Jayzzz
    Participant

    @jayzzz

    Yeah anyone with an update for the code? It’s not working on my theme either.


    jscooper
    Participant

    @jscooper

    I know this is old, but I added this code to a functions.php file in my custom theme folder

    add_filter( ‘bbp_get_single_forum_description’, ‘ja_return_blank’ );
    add_filter( ‘bbp_get_single_topic_description’, ‘ja_return_blank’ );
    function ja_return_blank() {
    return ”;
    }

    and now this appears at the top of my page (and the forum message is still there):

    add_filter( ‘bbp_get_single_forum_description’, ‘ja_return_blank’ ); add_filter( ‘bbp_get_single_topic_description’, ‘ja_return_blank’ ); function ja_return_blank() { return ”; }

    Any ideas?

    Thanks,

    Jeff


    jscooper
    Participant

    @jscooper

    I forgot the <? ?>

    I need a vacation.


    guillaumemolter
    Participant

    @guillaumemolter

    An even better solution is to use WordPress built-in return false shortcut, this way you don’t have to create a empty function each time.

    add_filter( 'bbp_get_single_forum_description', '__return_false' );
    add_filter( 'bbp_get_single_topic_description', '__return_false' );

    Mihailo
    Participant

    @mihailo

    Here 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; }

Viewing 20 replies - 1 through 20 (of 20 total)
  • You must be logged in to reply to this topic.
Skip to toolbar