Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 1,401 through 1,425 (of 32,577 total)
  • Author
    Search Results
  • #226066
    AdventureRidingNZ
    Participant

    The Author section seems to have a width of 115px and I’d like to widen that. I’ve tried using the below code which I pulled from a the inspect bar in Chrome and pasted into my child themes styles.css but it doesn’t work.

    Can anybody help?

    EddieB’s BMW R100GS

    /* Make Forums author section wider */
    #bbpress-forums div.bbp-forum-author, #bbpress-forums div.bbp-reply-author, #bbpress-forums div.bbp-topic-author {
        width: 140px !important;
    }
    #226049
    Robin W
    Moderator

    try this

    add_filter( 'get_the_archive_title', function ($title) {
     if ( is_category() ) {
     $title = single_cat_title( '', false );
     } elseif ( is_tag() ) {
     $title = single_tag_title( '', false );
     } elseif ( is_author() ) {
     $title = '<span class="vcard">' . get_the_author() . '</span>' ;
     }
     
     return $title;
    });

    Put this in your child theme’s function file –

    ie wp-content/themes/%your-theme-name%/functions.php

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

    or use

    Code Snippets

    AdventureRidingNZ
    Participant

    On pages where I use the bbp-single-forum shortcode I am having an issue with the ‘Create new Topic’ text box displaying.

    The topic Title field displays and can be populated fine but the main content textbox appears as a slim expandable box only a few pixels high. If you expand it no text can be entered into the box.

    Also on the pages where the bbp-single-forum shortcode is being used the Home and Update icons do not display correctly, instead presenting a broken image type icon. Removing the bbp-single-forum shortcode makes the admin bar icons display correctly.

    An example of a page with this issue is https://www.adventureridingnz.co.nz/motorcycles/bmw/

    #226014
    Robin W
    Moderator

    I am not certain, but on save a function is run that includes the wordpress function ‘sanitize_text_field’ which may well be stripping the @

    what the code does is to try and find out the user_id of the name entered, and then passes this to

    bbp_add_moderator( $forum_id, $user_id );

    If I am guessing that this is not something you need to do too often, you could do it programatically if you know how?

    in essence there are 2 functions

    bbp_add_moderator( $forum_id, $user_id );
    bbp_remove_moderator( $forum_id, $user_id );
    #225998
    nes421
    Participant
    Active Style Pack, logged in:
    
    <div class="bbp-reply-author">
    <a href="(....)" title="Zobacz profil: uzytkownik421" class="bbp-author-link">
    <span class="bbp-author-avatar">
    <img alt="" src="(....)" srcset="(....)" class="avatar avatar-80 photo" loading="lazy" width="80" height="80">
    </span>
    <span class="bbp-author-name">
    uzytkownik421
    </span>
    </a>
    
    Active Style Pack, logged out:
    
    <div class="bbp-reply-author">
    <img alt="" src="(....)" srcset="(....)" class="avatar avatar-80 photo" loading="lazy" width="80" height="80">
    uzytkownik421
    		
    
    Looks like something replaces 'function bbp_get_reply_author_link' bbpress/includes/replies/template.php
    #225996
    Robin W
    Moderator

    ok, I am seeing this when logged in or logged out with style pack active

    <span class="topic-author">
    <a href="/forums/user/testuser1/" title="View testuser1's profile" class="bbp-author-link">
    <span class="bbp-author-avatar">
    <img alt="" src="..." srcset="..." class="avatar avatar-14 photo" loading="lazy" width="14" height="14">
    </span>
    <span class="bbp-author-name">testuser1
    </span>
    </a>
    </span>

    not sure which you are saying is different as your original post says ‘when user logged in’ in both cases??

    Robin W
    Moderator

    find
    wp-content/plugins/bbpress/templates/default/bbpress/feedback-no-access.php

    transfer this to your pc and edit the text as desired

    and save

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

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

    Then transfer the file you saved above and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/feedback-no-access.php

    bbPress will now use this template instead of the original

    untested, but of you add

    <?php bbp_get_template_part( 'form', 'user-login' ); ?>

    to the end of that form, it should also show a login

    #225899
    Robin W
    Moderator

    I appreciate your frustration, but not sure ‘fault’ is the correct word.

    bbpress has changed something – but the ‘fix’ when it comes may not ‘fix’ you, as your site is adding a no-js class (from either the ‘Publisher’ theme or a plugin) which then isn’t overwritten as is normal practice by a test within your theme or the plugin.

    you could try adding this to the custom css of your theme

    .no-js {
    display : inline !important
    }

    to override the bbpress setting

    #225897
    Robin W
    Moderator

    Untested, but find
    wp-content/plugins/bbpress/templates/default/bbpress/form-topic.php

    transfer this to your pc and edit

    change line 31

    from

    <?php if ( bbp_current_user_can_access_create_topic_form() ) : ?>

    to

    <?php if ( bbp_current_user_can_access_create_topic_form() && (bbp_get_forum_id() != '2927') ) : ?>

    and save

    where 2927 is the forum you don’t want to show the form for

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

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

    Then transfer the file you saved above and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/form-topic.php

    bbPress will now use this template instead of the original

    If you want multiple forums, you could create and array and test against that

    #225894
    Robin W
    Moderator

    so do you want to hide the new topic form every time this particular forum displays (easier), or just for this particular shortcode on a page (more difficult) ?

    #225886
    Editor Mike
    Participant

    My dashboard takes me here when I click for latest updates.

    Releases

    But that is not up to date, how do we know what is in an update before we install it?

    #225871
    bradm413
    Participant

    bbPress Version 2.6.9
    WP version 5.8.2
    site: https://branchtheworld.com

    I have searched and haven’t found an exact case like what I’m looking for. I would like to hide the “New Topic” form that displays when using this shortcode:

    [bbp-single-forum id=$forum_id] – Display a single forums topics. eg. [bbp-single-forum id=32]

    See screenshot here:
    screenshot

    Is this something I’ll need to do with custom coding, or is there a plugin or another simple way to achieve this?

    #225855
    Robin W
    Moderator

    your theme/developer has added the ‘no-js’ class to the very top, hence why the other codes are not working.

    can you try this snippet

    add_action( 'wp_footer', 'rew_supports_js' );
    
    function rew_supports_js() {
    	echo '<script>document.documentElement.className = document.documentElement.className.replace(/\bno-js\b/g, '') + " js ";</script>';
    }

    Put this in your child theme’s function file –

    ie wp-content/themes/%your-theme-name%/functions.php

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

    or use

    Code Snippets

    #225835

    In reply to: Forum Width

    Robin W
    Moderator

    The width is governed by a div with the class rt-container, but it is not clear what craetes that.

    Try this in the custom css part of your theme

    .rt-container {
    	width: 1500px !important;
    }
    #225824
    dusemedia
    Participant

    That plugin works fine for the WP Classic Editor but not for the BBPress Teeny editor.

    The paste as plain text code in the documentation above works fine for the regular BBPress TinyMCE editor but not for the BBPress Teeny editor.

    #225804
    Robin W
    Moderator

    buddypress has profile fields –

    User Extended Profiles

    #225795
    Robin W
    Moderator

    bbp_get_topic_last_reply_id( $topic_id)

    #225780
    Robin W
    Moderator

    @oscowordpress1

    There is a temporary fix, either

    1. use code

    if( !function_exists( 'bbpress_browser_supports_js' ) ){
    	function bbpress_browser_supports_js() {
    		echo '<script>document.body.classList.remove("no-js");</script>';
    	}
    	add_action( 'wp_footer', 'bbpress_browser_supports_js' );
    }

    Put this in your child theme’s function file –

    ie wp-content/themes/%your-theme-name%/functions.php

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

    or use

    Code Snippets

    or

    2. install and activate

    bbp style pack

    #225767
    pannenkoek
    Participant

    Oh wait wrong code and not able to edit original post… here is the good one

    jQuery("form.bbp-login-form").find(".bbp-submit-wrapper").append( '<button class="button" onclick="location.href=\'http://LINK-TO-REGISTER-PAGE\'" type="button">Registreer</button>' );

    #225764
    pannenkoek
    Participant

    And then I stumbled on to the same problem. I came up with the following solution.

    Create a page and add the shortcode [bbp-register] to display the register screen.

    Then add the following code to your functions.php

    function add_bbp_register_button() {
    ?>
    <script type="text/javascript">
         jQuery('.bbp-submit-wrapper').append( '<button onclick="location.href=\'http://LINK-TO-REGISTER-PAGE\'" type="button">Register</button>' );
    </script>
    <?php
    }
    add_action('wp_footer', 'add_bbp_register_button');
     

    cheers

    #225759
    Robin W
    Moderator
    #225728
    Robin W
    Moderator

    this is a temporary fix, the bbpress authors are looking at a permanent one

    if( !function_exists( 'bbpress_browser_supports_js' ) ){
    	function bbpress_browser_supports_js() {
    		echo '<script>document.body.classList.remove("no-js");</script>';
    	}
    	add_action( 'wp_footer', 'bbpress_browser_supports_js' );
    }

    Put this in your child theme’s function file –

    ie wp-content/themes/%your-theme-name%/functions.php

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

    or use

    Code Snippets

    #225727
    Robin W
    Moderator

    @johnjamesjacoby –

    as far as I understand, the issue is detailed in changeset 7190 – yes?

    so it is basically to hide the ‘generate passwword’ in form-user-passwords.php if the user’s browser does not support js or it is disabled.

    If so, at the moment all bbpress pages end up with a no-js class as bbpress sets ‘no-js’ as the default, which means that the quicktags do not display on the topic and reply forms as they need js but the css thinks it is no-js, and the visual editor does not work for the same reasons.

    At the moment you only test for js using the script technique in form-user-passwords.php viz

    <script type="text/javascript">
    	document.body.className = document.body.className.replace( 'no-js', 'js' );
    </script>

    so I would suggest 1 of 2 approaches

    1. putting this test in more generally so it runs on any bbpress page (as usefully suggested by @webcreations907) maybe by adding to the main function, or adding a filter in \includes\core\filters.php to run the script

    so something like :

    add_filter ('bbp_body_class' , bbp_test_js) ;
    function bbp_test_js ($classes) {
    ?>
    <script type="text/javascript">
    	document.body.className = document.body.className.replace( 'no-js', 'js' );
    </script>
    <?php
    return $classes ;
    }

    so that others could disable it

    2. changing the class to bbp-no-js should work, if you do this in the bbp_body_class function and the form-user-passwords.php and in css, then I can no reason why it would not work if that is the sole intention of this.

    #225721

    @robin-w – any suggestions on improvements bbPress should make?

    I was thinking of renaming no-js to bbp-no-js to try and avoid an issue with other plugins or themes already doing something with that class, but I’m not sure that solves this specific problem.

    #225719

    There is also…

    do_action( 'bbp_add_user_subscription', $user_id, $object_id, $type );

    …and…

    do_action( 'bbp_remove_user_subscription', $user_id, $object_id, $type );

    …if you need something a bit more lower-level, that isn’t tied directly to the request handler.

Viewing 25 results - 1,401 through 1,425 (of 32,577 total)
Skip to toolbar