Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'buddypress'

Viewing 25 results - 576 through 600 (of 73,985 total)
  • Author
    Search Results
  • #334140
    Mike Witt
    Participant

    I’m currently running BuddyPress 12.5.0 and BP Classic 1.4.0
    Also I’m using “Legacy” so site notices should be displayed as a banner at the top of each page.

    I rarely use site notices, so I don’t know exactly when the problem started (I’m guessing with BP 12).

    Site notices now show up normally, at the top of BuddyPress constructed pages. But on other WordPress pages, the notices show up at the bottom, under the page footer.

    I’d appreciate any ideas about how to fix this.

    Thanks!

    Mike

    stephunique
    Participant

    I want to be able to add a description that tells users their profile slug would use their username rather than their first or surname. Unfortunately, the username field is not editable in the Profile Fields section of the Buddypress profile like other fields are.

    Wondering if there is a different way to add the message?

    #334130
    thinlizzie
    Participant

    Have you tried forcing Buddypress to send emails using the WordPress email function?
    It might help.

    #334120
    marinambm
    Participant

    It’s due to SMTP. You must log in to SMTP using your website email address.
    Not enough, unfortunately only with Buddypress, you then also have to identify the email address with the website provider DMARk, use the Easy WP SMTP plugin
    You need to contact your website provider.
    Also check the spam

    We are welcome to network, register if necessary and give each other tips.

    Nachbarschaftstreff Hamburg – Harburg – Basteln Workshops

    #334119
    marinambm
    Participant

    It’s because of SMTP. You have to log in to SMTP with your website email address.
    Not enough, unfortunately only with Buddypress, you then also have to identify the email address with the website provider DMARk, use the Easy WP SMTP plugin
    You have to contact your website provider.
    Also look in the spam

    We are welcome to connect and perhaps register each other and give each other tips.

    Nachbarschaftstreff Hamburg – Harburg – Basteln Workshops

    locker17
    Participant

    Hello,
    I am using this script to add a random filter to the members loop:

    Add custom filters to loops and enjoy them within your plugin

    Furthermore I limited the number of users to return to 5 at the bp_has_members() function.

    If I switch to random it always shows the same members in a random order but not 5 from ALL members randomly.

    What can I do to achieve this?

    #334116
    ferencvaros
    Participant

    Hi!

    I have a WordPress website with the theme Jannah. It is compatible with both BuddyPress and BBPress which I use for forums.

    I have just now installed BuddyPress, and I think it looks great. It gives me all the features that I’m looking for, for my small community.

    However, there is something that annoys me. It is the “name” field. It appears automatically in the registration page, and of course on the edit user page.

    How can I get rid of this field? Basically I would just like to have these as required fields:

    – Username
    – Email
    – Password

    Thanks

    stephunique
    Participant

    Hello

    I am using buddypress Version 12.5.0. I am not a developer but I know how to add code to the functions.php file or code snippets plugin and add CSS.

    I have discovered that when a user registers for my site with the Buddypress registration form, the conformational email has the surname in the “to” field but the first name in the email body so it looks like this: https://ibb.co/pyPGFS5

    I created a test user with the following names:
    For the username, I called it “Username2”. For the first name, I called it Name2. For the surname, I called it “surname2”.

    In the screenshot I used Mailinator to test registrations and you can see that the name in the “to” field is the username and different to the name in the email body which is the first name.

    I’d like to make the name in the “to” field also the first name so it is consistent with the email body. Ideally I would also like to be able to customise the email body.

    Thank you to anyone who can help.

    stephunique
    Participant

    I have tried the solutions found on the internet including the one here on Buddypress Forum, and also this one: https://www.cozmoslabs.com/docs/profile-builder/add-ons/buddypress/#Hide_8220This_field_can_be_seen_by8221_notification_displayed_under_the_fields

    but they all seem to hide only the message on the registration form and not in their profile. I want to hide it everywhere.

    Anyone with a new idea?

    #334107
    ahmadmirza09
    Participant

    Hey BuddyPress Community,

    I’m facing performance issues on my site. Despite optimization attempts, it’s still slow. Any tips to speed it up? Thanks!

    Emma lily

    stephunique
    Participant

    I am testing out Buddypress Version 12.5.0 and I made a registration form with Buddypress’ profile fields as well as a third party plugin “User Registration” by WPEverest. I tested both separately and noticed that Buddypress registration form does not collect the surname of the user, only the first name, because there is no field for surnames. I made a separate text box field and named it “surname” but obviously it does not connect to actual surname field in the buddypress and wordpress back end.

    User Registration has an actual surname field and can collect the user’s surname which shows up correctly in the back end, but it displays the user’s username as the name when the person logs in. For example if a person’s name is “Jane Doe” but their username is “gelato”, in the top right corner when they log in it says “gelato” which is not good, so I can’t use this.

    So I am wondering if anyone has a way to force the Buddypress registration form to collect the surname correctly so it shows in the backend?

    Thanks

    #334104
    marinambm
    Participant

    So that’s because of Buddypress
    I have uninstalled all other plugins from buddypress
    I still receive the activation email from strangers
    and when I click on login during activation
    I am redirected to my website provider account
    and not on my website

    #334103
    marinambm
    Participant

    Hello
    If you can’t create posts for subscribers or open new groups and invite friends, you need an extra plugin for this
    Thank you very much

    buddypress Version: 12.5.0
    WP-Version

    6.5.3

    #334101
    marinambm
    Participant

    https://www.nachbarschaftstreff-harburg.de/registrieren/

    Hello
    Do you have an explanation for why I receive the activation email when interested parties register?
    And why when I view my profile I don’t get to my website but to the website of my website

    WP-Version

    6.5.3

    Buddypress Version Version 12.5.0

    Reventlov
    Participant

    Hello,

    Thank you for your thread which helped me to find a solution.
    I was lokking to noindex profiles pages in buddypress.
    At least it works on my side. Hope that will help you guys.

    // Set a high priority to remove Yoast meta robots tags before they are added
    function remove_yoast_meta_robots() {
        if (function_exists('buddypress') && bp_is_user()) {
            // Remove Yoast's meta robots tag
            add_filter('wpseo_robots', function($robots) {
                return 'noindex, follow';
            });
        }
    }
    add_action('wp', 'remove_yoast_meta_robots', 1);
    
    #334096
    TKServer
    Participant

    Been on BuddyPress for years. Just got an email from a user today that was unable to register. I tested it out and on submission I get a screen flash, then nothing. There are no errors in the dev tools console. There are no php errors logged. I’m a little stumped. I switched themes to a default 2024 theme, and the issue happens on that as well. Would appreciate any suggestions.

    #334093
    Koka boka
    Participant

    I created a small plugin where users can subscribe to authors, but for some reason users are not notified when the author publishes a new post. Please help to solve this problem. I checked the logs, it shows that the notification was sent, but the notification itself is not there!

    <?php
    /*
    Plugin Name: Author Subscription and Notification
    Description: Allows users to subscribe to authors and receive notifications when authors publish new posts.
    Version: 1.3
    Author: test
    */
    
    // Hook to create the database table upon plugin activation
    register_activation_hook(__FILE__, 'create_subscriptions_table');
    
    function create_subscriptions_table() {
        global $wpdb;
        $table_name = $wpdb->prefix . 'author_subscriptions';
        $charset_collate = $wpdb->get_charset_collate();
    
        $sql = "CREATE TABLE $table_name (
            id bigint(20) NOT NULL AUTO_INCREMENT,
            user_id bigint(20) NOT NULL,
            author_id bigint(20) NOT NULL,
            PRIMARY KEY (id),
            UNIQUE KEY user_author (user_id, author_id)
        ) $charset_collate;";
    
        require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
        dbDelta($sql);
    }
    
    // Hook to add subscription button in the post content
    add_filter('the_content', 'add_author_subscription_button_to_post');
    
    function add_author_subscription_button_to_post($content) {
        if (is_single() && is_user_logged_in()) {
            $author_id = get_the_author_meta('ID');
            $current_user_id = get_current_user_id();
            
            global $wpdb;
            $table_name = $wpdb->prefix . 'author_subscriptions';
    
            // Check if user is already subscribed
            $is_subscribed = $wpdb->get_var($wpdb->prepare(
                "SELECT COUNT(*) FROM $table_name WHERE user_id = %d AND author_id = %d",
                $current_user_id, $author_id
            ));
    
            $button_text = $is_subscribed ? 'Unsubscribe' : 'Subscribe';
            $button_html = '<button id="subscribe-author" class="subscribe-button" data-author-id="' . esc_attr($author_id) . '">' . esc_html($button_text) . '</button>';
            $button_html .= '<div id="subscription-message"></div>';
            
            $content .= $button_html;
        }
        return $content;
    }
    
    // Enqueue the JavaScript file and localize script
    add_action('wp_enqueue_scripts', 'enqueue_subscription_script');
    
    function enqueue_subscription_script() {
        if (is_single() && is_user_logged_in()) {
            wp_enqueue_script('subscription-script', plugin_dir_url(__FILE__) . 'subscription.js', array('jquery'), '1.0', true);
            wp_localize_script('subscription-script', 'subscriptionData', array(
                'ajax_url' => admin_url('admin-ajax.php'),
                'nonce'    => wp_create_nonce('subscription_nonce')
            ));
        }
    }
    
    // Handle the AJAX request for subscription
    add_action('wp_ajax_handle_author_subscription', 'handle_author_subscription');
    
    function handle_author_subscription() {
        check_ajax_referer('subscription_nonce', 'nonce');
    
        if (is_user_logged_in()) {
            global $wpdb;
            $table_name = $wpdb->prefix . 'author_subscriptions';
    
            $current_user_id = get_current_user_id();
            $author_id = intval($_POST['author_id']);
            $operation = sanitize_text_field($_POST['operation']);
            
            if ($operation === 'subscribe') {
                $wpdb->insert($table_name, array(
                    'user_id' => $current_user_id,
                    'author_id' => $author_id
                ));
                wp_send_json_success('Subscribed successfully.');
                error_log("User ID $current_user_id subscribed to author ID $author_id");
            } else if ($operation === 'unsubscribe') {
                $wpdb->delete($table_name, array(
                    'user_id' => $current_user_id,
                    'author_id' => $author_id
                ));
                wp_send_json_success('Unsubscribed successfully.');
                error_log("User ID $current_user_id unsubscribed from author ID $author_id");
            }
        }
        wp_send_json_error('Failed to update subscription.');
    }
    
    // Hook to send notifications when an author publishes a new post
    add_action('publish_post', 'notify_subscribers_on_new_post');
    
    function notify_subscribers_on_new_post($post_id) {
        global $wpdb;
        $table_name = $wpdb->prefix . 'author_subscriptions';
    
        $post = get_post($post_id);
        $author_id = $post->post_author;
    
        error_log("New post published by author ID: " . $author_id);
    
        // Get subscribers
        $subscribers = $wpdb->get_results($wpdb->prepare(
            "SELECT user_id FROM $table_name WHERE author_id = %d",
            $author_id
        ));
    
        error_log("Subscribers found: " . count($subscribers));
    
        foreach ($subscribers as $subscriber) {
            // Send BuddyPress notification
            bp_notifications_add_notification(array(
                'user_id'           => $subscriber->user_id,
                'item_id'           => $post_id,
                'secondary_item_id' => $author_id,
                'component_name'    => 'buddypress',
                'component_action'  => 'new_post_by_subscribed_author',
                'date_notified'     => bp_core_current_time(),
                'is_new'            => true,
            ));
            error_log("Notification sent to user ID: " . $subscriber->user_id);
        }
    }
    
    // Custom notification format
    add_filter('bp_notifications_get_notifications_for_user', 'custom_bp_notification_format', 10, 5);
    
    function custom_bp_notification_format($content, $item_id, $secondary_item_id, $action, $component_name) {
        if ($component_name === 'buddypress' && $action === 'new_post_by_subscribed_author') {
            $author_name = get_the_author_meta('display_name', $secondary_item_id);
            $post_title = get_the_title($item_id);
            $post_url = get_permalink($item_id);
            
            $content = sprintf(__('New post by %s: <a href="%s">%s</a>', 'text-domain'), $author_name, $post_url, $post_title);
        }
        
        return $content;
    }
    ?>
    [23-May-2024 09:42:15 UTC] a:0:{}
    [23-May-2024 09:42:40 UTC] New post published by author ID: 1
    [23-May-2024 09:42:40 UTC] Subscribers found: 2
    [23-May-2024 09:42:40 UTC] Notification sent to user ID: 1
    [23-May-2024 09:42:40 UTC] Notification sent to user ID: 27
    [23-May-2024 09:42:43 UTC] a:0:{}
    #334081
    foxfossati
    Participant

    Hello, Is it possible tu use subgroups, hierarchical subgroups?
    I saw very old topics about this problem and i would like to know if there are any news about.
    I would like to use buddypress (Version: 12.5.0) but it dipends of this problem.
    I know there is a plugin but i don’t know if it’s the best solution.
    https://github.com/dcavins/hierarchical-groups-for-bp
    Thank you for your help.

    Koka boka
    Participant

    I’m trying to create a block with notifications that should be displayed using a shortcode, but for some reason I get one message (Error: Unable to retrieve notification data.) in the place of the notifications themselves. Tell me where did I mess up?
    The code itself:

    <?php
    /*
    Plugin Name: BuddyPress Real-Time Notifications
    Description: 
    Version: 1.0
    Author: 
    */
    
    // JavaScript
    function bprtn_enqueue_scripts() {
        wp_enqueue_script('bprtn-scripts', plugin_dir_url(__FILE__) . 'scripts.js', array('jquery'), null, true);
    }
    
    add_action('wp_enqueue_scripts', 'bprtn_enqueue_scripts');
    
    // CSS
    function bprtn_enqueue_styles() {
        wp_enqueue_style('bprtn-styles', plugin_dir_url(__FILE__) . 'styles.css');
    }
    
    add_action('wp_enqueue_scripts', 'bprtn_enqueue_styles');
    
    // function
    function bprtn_display_notification($notification) {
        if (isset($notification->component_name) && isset($notification->component_action) && isset($notification->item_id)) {
            echo '<div class="bprtn-notification">';
            echo '<p class="bprtn-description">' . bp_the_notification_description($notification->component_action, $notification->item_id) . '</p>';
            echo '<p class="bprtn-date">' . bp_the_notification_time_since($notification->date_notified) . '</p>';
            echo '<div class="bprtn-actions">';
            // buttons
            bp_the_notification_action_links(array('before' => '<div class="bprtn-action">', 'after' => '</div>', 'notification' => $notification));
            echo '</div>';
            echo '</div>';
        } else {
            echo '<p class="bprtn-notification-error">Error: Unable to retrieve notification data.</p>';
        }
    }
    
    // function load notifications
    function bprtn_load_notifications() {
        $user_id = bp_loggedin_user_id();
        $notifications = bp_notifications_get_notifications_for_user($user_id);
    
        if (!empty($notifications)) {
            foreach ($notifications as $notification) {
                bprtn_display_notification($notification);
            }
        } else {
            echo '<p class="bprtn-no-notifications">No new notifications.</p>';
        }
    }
    
    // shortcode
    function bprtn_notifications_shortcode() {
        ob_start();
        bprtn_load_notifications();
        return ob_get_clean();
    }
    
    add_shortcode('bprtn_notifications', 'bprtn_notifications_shortcode');
    
    // AJAX
    function bprtn_mark_as_read() {
        if (isset($_POST['notification_id'])) {
            $notification_id = $_POST['notification_id'];
            bp_notifications_mark_notifications_by_id(array($notification_id), 'read');
        }
        wp_die();
    }
    
    add_action('wp_ajax_bprtn_mark_as_read', 'bprtn_mark_as_read');
    ?>
    stephunique
    Participant

    Hello
    I know this question has been asked before, but I am not a dveloper and the previous solutions are either old or not easily understood.

    The best way to hide certain members from the Buddypress directory seems to be using the codes found here: https://gist.github.com/sbrajesh/2142009

    My problem is, there is a lot of discussion around the code and there has not been a definitive answer that is non-developer friendly, so I hope someone could provide one here that would benefit everyone with the same question.

    The original code had several alterations (eg, when someone said to replace one part of the code with another, or mistakes on a certain line, and finally, an altered code that hides all but one role, which is what I want) but none specify exactly where to put it or what part to replace, or where to put the user roles you want to hide or show.

    So I am hoping someone here can provide a definitive answer about how we can hide all user roles except one (my case), or, what others might find useful, how to hide a single or a few user roles from the directory. The last code is what I need but I don’t know if I am supposed to use that as is, or if it replaces part of the original code (and if so, what part), and where to add the user roles I want to hide or include.

    Thank you.

    marinambm
    Participant

    This is displayed to me as I come from Germany

    I am sorry to inform you that your message was not possible
    be delivered to one or more recipients. It is attached below.

    (2a00:1450:4025:c01::1b) said: 550 5.7.1 This message does not comply with RFC 5322
    compliant. There are several To headers. To reduce the amount of spam sent to
    Gmail, this message has been blocked. For more information, see
    Check https://support.google.com/mail/?p=RfcMessageNonCompliant and RFC 5322
    Specifications 4fb4d7f45d1cf-5733c2d5aa2si13175593a12.240 – GSMTP

    #334067
    hossin0241
    Participant

    Hello
    Good time
    in this version of BuddyPress, I want to limit the default pages such as the user directory with “Restrick Content Pro” plugin.
    In the new version of BuddyPress, there is no user directory and other pages in the “page” section on WordPress Dashboard, so that I can not limit them with the mentioned plugin.

    Now how should I do this?

    mionigba
    Participant

    Hello everyone,

    My Organisation has branches in different locations:
    — Ikeja.
    — Victoria Island.
    — Lekki.
    — Sanders Almond Road, Maryland.
    and so on.

    These are Member Types, but I want them to be translated as “Locations”.

    So I used the code below:

    add_filter( 'bp_members_member_type_base', function( $base ) {
    
    	// Replace custom with your desired string.
    	return _x( 'custom', 'member type URL base', 'buddypress' );
    } );

    to help me call them “Locations”– as what they are, as you can see here — https://prnt.sc/l0ypmQxEGzSP

    2.) You will notice that in my screenshot, when I want to view members of a specific directory who belong to a specific location, it says “Viewing members of the type: Maryland”.

    Now, Maryland is a location. Instead of using the word/text “Type”, I want that text to say “Location”– so that it becomes “Viewing members of the location: Maryland”.

    Is there any PHP Code Snippet that can help me change that Text from “Type” to “Location” ?

    Regards.

    #334060
    thinlizzie
    Participant

    Thanks venutius for removing all potential spam from this forum, it’s appreciated.

    The question was regarding: why are forums not showing on my Buddypress site?

    My reply: Buddypress does not include forum functionality by default.
    Usually this can be added via another plugin eg. bbpress.

    Find the bbpress plugin on the WordPress plugins website.

    Install it, that should solve your issue.

Viewing 25 results - 576 through 600 (of 73,985 total)
Skip to toolbar