Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 101 through 125 (of 32,374 total)
  • Author
    Search Results
  • #241552

    In reply to: PHP Deprecated

    Milan Petrovic
    Participant

    This is not bbPress related. This is error in Avada theme, most likely due to outdated code that is not updated for PHP 8.x. This message is related to changes in PHP 8.1. You need to update Avada, or contact Avada author to fix the problem.

    #241509
    Marisa
    Participant

    Is there an action I can use to execute PHP code before every bbPress page loads?

    Then maybe I can try altering cookies to make bbPress switch languages.

    I want language selection to be dynamic and user controlled.

    #241487
    smelendez
    Participant

    Hello, George.

    First of all, thanks for sharing that code modifications, it seems to fix the pagination for forums set up inside BuddyPress groups without any problem.

    While following your instructions, I have a problem with the pagination between replies and I would like to ask you. For testing purposes, I have set a maximum of 2 replies per page for each topic. When I create a first reply, it is displayed without problem as topic content, but when I create a second reply, it is not displayed and a new page is not created for pagination. However, when I create a third reply, a new page is created showing the second reply and the third reply.

    I think the problem could be with the initial content that is indicated when creating a topic. As you know, when you create a new topic you are asked for a title for that topic as well as some content as an introduction. When you enter the topic, this ‘introduction’ is displayed in the replies section but is not counted as a reply. So having set a maximum of 2 replies per page for each topic for testing, the first page shows the ‘introduction’ and replay 1, but when creating replay 2, as the same page is showing the ‘introduction’, this new reply is not shown and a second page is not created either as it detects only 1 replay on the first page.

    How could this be solved? On the other hand, the pagination between topics works very well.

    Thank you very much in advance, best regards.

    #241471
    pavlovscat
    Participant

    If you look on the linked page and see a big white block, the oEmbed on my site isn’t working (when someone makes a post in bbPress, it automatically embeds it as shown on the page, but the link doesn’t work). Everything looks right, but the link doesn’t work. I can’t figure out what I can do to fix it or disable it. I’ve turned to a friend who knows how to code (I don’t) and she said that her bbPress installation has the same issue.

    Here’s a page with an example:

    Kirk Hunter Farewell Sale

    Thanks for your help.

    #241468
    Clivesmith
    Participant

    Hi Robin,
    Thank you for replying.
    I did find something that was said years ago about not putting the topic title into the reply record, not sure why.
    So I create a record in the meta table, which is a custom field in the reply form using the following code and add the topic title as a custom field to the custom message in the Fs Poster plugin I am using to post to social media.

    
    function check_and_populate_top_title_on_edit() {
        global $pagenow;
    
        // Check if we are in the post.php page (edit post/reply screen) and in the admin area.
        if ($pagenow === 'post.php' && is_admin()) {
            // Get the post ID from the URL query string.
            $post_id = isset($_GET['post']) ? intval($_GET['post']) : 0;
    
            // If we have a valid post ID, proceed.
            if ($post_id) {
                $post = get_post($post_id);
    
                // Ensure we're working with a 'reply' post type.
                if ($post && $post->post_type === 'reply') {
    
                    // Check if the post title is empty.
                    if (empty($post->post_title)) {
                        // Get the parent post ID.
                        $parent_post_id = $post->post_parent;
    
                        // Check if a parent post exists.
                        if ($parent_post_id) {
                            // Get the parent post data.
                            $parent_post = get_post($parent_post_id);
    
                            // If the parent post exists and has a title, update the 'top_title' custom field.
                            if ($parent_post && !empty($parent_post->post_title)) {
                                // Add or update the 'top_title' meta field with the parent post's title.
                                update_post_meta($post_id, 'top_title', $parent_post->post_title);
                            }
                        }
                    }
                }
            }
        }
    }
    
    add_action('load-post.php', 'check_and_populate_top_title_on_edit');
    #241467
    Robin W
    Moderator

    sorry, been working on another project.

    If you fill in the title in the admin of a reply, as far as I know it will cause no issues, I’ve not seen any code that uses this field. I cannot be absolute, but best I can say.

    #241415
    Robin W
    Moderator

    basic economics –

    You using bbpress generates no income for anyone.

    bbpress is a wordpress product, so someone has to sponsor a coder to code stuff, ie someone has to pay for this, and unless there is a reason for this, it doesn’t happen.

    #241399
    uksentinel
    Participant

    Take a look at the below link as this works for a logged in user. The three shortcodes should help achieve what you are looking for.

    bbp topic count

    #241396
    George
    Participant

    I don’t have BuddyBoss installed. bbPress provides integration code that injects the “Forum” tab inside the group creation process. Normally:

    add_filter( 'groups_create_group_steps', function ( $steps ) {
        unset( $steps['forum'] );
        return $steps;
    } );

    or something of that sort would have solved the issue. I was wondering of bbPress injects the tab in a different way.

    I would appreciate if you could forward that to one of the devs, since you are a Mod, Robin, otherwise, thanks for the help.

    #241395
    Robin W
    Moderator

    But the integration code resides inside bbPress– not sure what you mean – the filters you quote are all buddypress or possibly buddyboss

    #241394
    George
    Participant

    But the integration code resides inside bbPress. If it was core BuddyPress filters, it would be much simpler, don’t you think?

    #241392
    George
    Participant

    I want to remove the “Forum” step from the BuddyPress group creation step but keep the group forums active. I have tried many solutions but I can’t seem to find a filter I could use.

    For example, this code:

    add_filter( 'groups_create_group_steps', function ( $steps ) {
        unset( $steps['group-settings'] );
        return $steps;
    } );

    removes the group settings from the group creation process.

    This code:

    function buddydev_remove_group_admin_settings() {
    
        if ( ! bp_is_group() ) {
            return;
        }
    
        bp_core_remove_subnav_item( groups_get_current_group()->slug . '_manage', 'group-settings', 'groups' );
    
        // reattach screen function to avoid 404.
        add_action( 'bp_screens', 'groups_screen_group_admin', 3 );
    }
    
    add_action( 'bp_template_redirect', 'buddydev_remove_group_admin_settings', 1 );

    removes the group settings from the Group “Manage” menu.

    Using this:

    function remove_unwanted_group_creation_steps() {
        global $bp;
        if ( isset( $bp->groups->group_creation_steps['forum'] ) ) {
            unset( $bp->groups->group_creation_steps['forum'] );
        }
    
    }
    add_action( 'bp_before_create_group_content_template', 'remove_unwanted_group_creation_steps', 9999 );

    removes the step but leaves the /create/step/forum/ step active, thus messing with the custom number of steps I have.

    Can you please help?

    #241383
    Kokiri
    Participant

    Hello,

    So I am trying to add Topics Counts and Reply counts in a widget box on activity page or member profiles – I’ve tried BBP Style Pack and the shortcodes don’t work.

    Any suggestions?

    #241339
    Salvatore Noschese
    Participant

    Thanks for reply but, sorry…
    Installed and keymaster issue (so, nothing work, I need to fix via your plugin): this is an important issue (cannot work without the fix by your plugin).
    Also, not work in FSE and also with your plugin I have bad result.
    FSE is out and default theme in wp from about 4 yrs and still not supported from bbpress.

    This really looks like an abandoned project.
    Other minor project (like asgaros
    And similar) work out of the box (install, shortcode, all work as expected).

    Best regards and I really hope bbpress team can work to fix asap this issue.

    #241337
    Salvatore Noschese
    Participant

    I tried to reinstall bbPress after a long time, but encountered several issues.

    First, there was no keymaster role after installation, which made the plugin unusable. I had to fix it via the BBP Style Pack plugin using the keymaster fix. It seems strange that I need one plugin just to make another work.

    After that, I faced a blank page issue. Even though the BBP Style Pack plugin helped fix this as well, I still encountered problems—such as the shortcode in the footer not being parsed and some graphical glitches.

    It seems impossible now to simply install bbPress, add a shortcode to a page, and use it like I did years ago.

    I’m really disappointed with the current state of the plugin. It feels like it has been abandoned.

    #241307
    Robin W
    Moderator

    but if you mean ‘error’ as in

    Warning: Illegal string offset ‘remember’ in /home/ob57bjdn4ubo/domains/tremendosaur.com/html/wp-includes/user.php on line 39

    then yes that would be useful, just take out the site name if that is what is worrying you

    #241305
    abd2002
    Participant

    i can’t share the link as it is linked to backend code, but i can share the screenshot of error page

    #241288
    gkldh
    Participant

    @robin-w thanks for share this code. is this possible to provide a separate trash tab display on profile for view all tresh message ? because right now when reply not permanently delete from admin until then post count display same on frontend. As of now user can’t permanently delete trash messages from frontend.

    regards
    gaurav

    #241287
    Robin W
    Moderator

    it cannot be removed with remove_action as the code is not part of an action.

    input#bbp_topic_tags {
    display: none;
    }
    label[for=bbp_topic_tags] {
    display: none !important;
    }

    Putting the above in your custom css area should do it

    #241285
    Robin W
    Moderator

    sorry, I just help out here, there are many things on localhost that are different including htaccess and maybe many others

    I have never developed on localhost, nothing against those that do, but developing on the same server using exactly the same code as live enables you to have confidence that the performance and configuration is exactly the same, just my view 🙂

    Anyway glad you are fixed !

    #241284
    gkldh
    Participant

    yes, @robin-w its working on server side by default buddyx-theme/twentytwenty and no need any additional code add. May i know the reason why didn’t work on localhost ??

    And Next time I will test it on the server first. If I face any problem then I will post it.

    thank you so much your great help @robin-w

    #241282
    gkldh
    Participant

    @robin-w thanks for reply, i have use child theme. but your code not working.

    i tried your code with both type :
    return 'http://localhost:8888' . $_SERVER['REQUEST_URI'];
    return 'http://buddypress.local/' . $_SERVER['REQUEST_URI'];

    screenshot : https://prnt.sc/CSTMlQ1ChCaG

    #241281
    Robin W
    Moderator
    add_filter( 'bbp_verify_nonce_request_url', 'my_bbp_verify_nonce_request_url', 999, 1 );
    function my_bbp_verify_nonce_request_url( $requested_url )
    {
    return 'http://localhost:8888' . $_SERVER['REQUEST_URI'];
    }

    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

    #241269
    gkldh
    Participant

    thanks jon, its working. Can it be removed with remove_action('','') this also?

    #241262
    Mads Gram-Hansen
    Participant

    Disabling Dynamic CSS in Divi (as advised by @robin-w here) worked for me too.

    When using the Divi Theme Builder you can not create a template for the user profile page. That is unexpected.

    Is it because the user profile page is not created as a custom post type like Topic, Reply etc.?
    It looks like that when I inspect the plugin code (especially the template.php-files in the includes folder).

    If the user profile page (and search page) was created as a custom post type, would it fix these situations (?):
    – that you have to disable Dynamic CSS in Divi to get the stylesheets to load
    – that you can’t create a template for profiles with the Divi Theme Builder
    – the similar issue with the other themes

    Best regards and thanks for a great plugin!
    /Mads

Viewing 25 results - 101 through 125 (of 32,374 total)
Skip to toolbar