Skip to:
Content
Pages
Categories
Search
Top
Bottom

Removing buttons from HTML toolbar


  • colecoboy84
    Participant

    @colecoboy84

    Hello,

    I want to display the link and img buttons above the text area in my forum but not the other buttons – the reason being that my users are pretty far from being techies, and I’m afraid all these buttons will be confusing/imtimidating.

    Can someone point me to the file I need to edit to remove these buttons?

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)

  • Robkk
    Moderator

    @robkk

    i just did this with css.

    #qt_bbp_topic_content_code.button ,#qt_bbp_topic_content_close.button , 
    #qt_bbp_topic_content_li.button , #qt_bbp_topic_content_ol.button ,
    #qt_bbp_topic_content_strong.button , #qt_bbp_topic_content_em.button ,
    #qt_bbp_topic_content_block.button , #qt_bbp_topic_content_del.button ,
    #qt_bbp_topic_content_ul.button,
    #qt_bbp_reply_content_code.button ,#qt_bbp_reply_content_close.button , 
    #qt_bbp_reply_content_li.button , #qt_bbp_reply_content_ol.button ,
    #qt_bbp_reply_content_strong.button , #qt_bbp_reply_content_em.button ,
    #qt_bbp_reply_content_block.button , #qt_bbp_reply_content_del.button ,
    #qt_bbp_reply_content_ul.button
    {
    display:none;
    }

    drewamca
    Participant

    @drewamca

    @robkk

    Hi, I’m looking for this kind of code for a long time and I’m so glad to find it. But I didn’t understand that where I should paste this code?

    Thanks :)


    drewamca
    Participant

    @drewamca

    I tried to put this code to my theme’s bbpress.css file but it didn’t work. Also I tried buddypress plugin’s bbpress.css but it didn’t work either.

    @robkk


    Robkk
    Moderator

    @robkk

    @drewamca using this PHP code snippet will also work too. Add this function to your child themes functions.php file or add it to a seperate plugin like functionality.

    function filter_bbp_get_quicktags_settings( $settings ) {
    
     $buttons_array = explode( ',', $settings['buttons'] );
    
     $buttons = array_diff( $buttons_array, array(
       'del','ul','ol','li','close'
     ) );
    
     $settings['buttons'] = implode( ',', $buttons );
    
         return $settings;
     };
    
     add_filter( 'bbp_get_quicktags_settings', 'filter_bbp_get_quicktags_settings', 10, 1 );

    Here is a list of the default buttons you can add to the function.

    strong, em, link, block, del, img, ul, ol, li, code, close


    drewamca
    Participant

    @drewamca

    @robkk

    Thank you so much. Work as a charm :)

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