Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'buddypress'

Viewing 25 results - 526 through 550 (of 73,985 total)
  • Author
    Search Results
  • #334458

    In reply to: Custom Development

    MattDotNet
    Participant

    Nothing has changed. This is the code I’ve tried to use.

    function my_custom_buddypress_function() {
        var_dump(__FUNCTION__);
        if ( ! function_exists('xprofile_get_field_data') ) {
            echo '<pre>BuddyPress xprofile component has not been loaded yet.</pre>';
        } else {
            echo '<pre>';
            var_dump(xprofile_get_field_data('Targa', wp_get_current_user()->ID));
            echo '</pre>';
        }
        exit;
    }
    
    add_action('bp_init', 'my_custom_buddypress_function', 20);

    And this is the output I received:

    string(29) “my_custom_buddypress_function”
    BuddyPress xprofile component has not been loaded yet.

    BuddyPress 12.5.0 is installed and active.

    #334456
    Abhishek Saini
    Participant

    @Kokiri
    Please change this function name “custom_bp_avatar_activity” and keep it unique and please remember this also that this will create a new activity So, you will get two activity for single profile uploads.

    // Add action to show new avatar in activity stream
    function bp_generate_custom_avatar_activity($user_id, $args) {
    // Get the user data
    $user = get_userdata($user_id);
    $user_link = bp_core_get_userlink($user_id);
    
    // Create the activity entry
    bp_activity_add(array(
    ‘user_id’ => $user_id,
    ‘action’ => sprintf(__(‘ % s has updated their avatar newly.’, ‘buddypress’), $user_link),
    ‘component’ => ‘profile’,
    ‘type’ => ‘new_avatar’,
    ‘item_id’ => $user_id,
    ));
    }
    add_action(‘bp_members_avatar_uploaded’, ‘bp_generate_custom_avatar_activity’, 10, 2);
    
    #334450
    Upen Singh
    Participant
    #334448

    In reply to: Custom Development

    Varun Dubey
    Participant

    First, ensure that BuddyPress is loaded and initialized before your plugin tries to call its functions. Since BuddyPress hooks its initialization to WordPress bp_init action, which typically fires on wp or init at a priority of 10, you should ensure your hook runs after this or directly on bp_init with a lower priority (higher number).

    You can try to debug like this.

    function my_custom_buddypress_function() {
        if ( ! function_exists('xprofile_get_field_data') ) {
            error_log('BuddyPress xprofile component has not been loaded yet.');
        } else {
            // Your code here
        }
    }
    
    add_action('bp_init', 'my_custom_buddypress_function', 20);
    #334447

    In reply to: Custom Development

    MattDotNet
    Participant

    It keeps throwing the same error: The function does not exist. I’m already developing a plugin and I’m inside a init callback.

    Hasn’t BP been auto-loaded yet at this stage?

    I also tried to recursively auto-load every single file contained in the buddypress/ folder. But this is not enough as I encounter other dependency errors. Therefore there must be a function/method/class to invoke in order to properly set up the system.

    #334446

    In reply to: Custom Development

    Varun Dubey
    Participant

    Ensure the BuddyPress plugin is active and add custom code in child theme functions.php or a custom plugin or using the code snippet plugin. xprofile_get_field_data is a valid function https://hooks.wbcomdesigns.com/reference/functions/xprofile_get_field_data/

    #334443

    In reply to: Custom Development

    MattDotNet
    Participant

    Thanks for your reply. The problem is that I’m getting the following error message:

    Fatal error: Uncaught Error: Call to undefined function xprofile_get_field_data()

    I’ve also tried to use the following code to auto-load the BuddyPress dependencies:
    require_once WP_PLUGIN_DIR . '/buddypress/bp-loader.php';

    What’s the correct way to auto-boot BuddyPress?

    #334438

    In reply to: Custom Development

    Varun Dubey
    Participant

    @mattdotnet BuddyPress does not save profile field values inside the user meta
    you can fetch them using the following approach and sync them with your requirement

        $field_name_gender = 'Gender'; // Replace with your actual xProfile field name
        $field_name_location = 'Location'; // Replace with your actual xProfile field name
    
        // Get the xProfile field values
        $gender_value = xprofile_get_field_data($field_name_gender, $user_id);
        $location_value = xprofile_get_field_data($field_name_location, $user_id);
    #334424
    Abhishek Saini
    Participant

    Buddypress by default provide the creating activity on profile uploads.

    https://prnt.sc/qg-NDzJP9nll

    If you want to add your custom activity as you have given in your code snippet you can use it like this because hook is deprecated.

    // Add action to show new avatar in activity stream
    function custom_bp_avatar_activity($user_id, $args) {
    // Get the user data
    $user = get_userdata($user_id);
    $user_link = bp_core_get_userlink($user_id);

    // Create the activity entry
    bp_activity_add(array(
    ‘user_id’ => $user_id,
    ‘action’ => sprintf(__(‘ % s has updated their avatar newly.’, ‘buddypress’), $user_link),
    ‘component’ => ‘profile’,
    ‘type’ => ‘new_avatar’,
    ‘item_id’ => $user_id,
    ));
    }
    add_action(‘bp_members_avatar_uploaded’, ‘custom_bp_avatar_activity’, 10, 2);

    https://prnt.sc/DHAc_eWrYJY7

    #334422

    In reply to: Members page sidebar

    athlios
    Participant

    1. Which version of WordPress are you running?
    6.5.4

    2. Did you install WordPress as a directory or subdomain install?
    Dir

    3. If a directory install, is it in root or in a subdirectory?
    Root

    6. Which version of BP are you running?
    12.5.1

    8. Do you have any plugins other than BuddyPress installed and activated? If so, which ones?
    Ad Inserter
    Advanced Editor Tools
    Akismet Anti-spam: Spam Protection
    BP Classic
    Classic Widgets
    Elementor
    Envato Market
    Happyforms
    Playerx Core
    Playerx Instagram Feed
    Playerx Twitter Feed
    reCaptcha by BestWebSoft
    Sidebar Login
    Site Kit by Google
    TablePress
    Ultimate Category Excluder
    VFB Pro
    VFB Pro – Form Designer
    VFB Pro – Notifications
    Webhook for Discord
    Wordfence Security
    WoW Progress
    WP Discord Invite
    WP-Optimize – Clean, Compress, Cache
    WPBakery Page Builder
    Yoast SEO

    10. Which theme do you use ?
    Playerx

    11. Have you modified the core files in any way?
    No

    12. Do you have any custom functions in bp-custom.php?
    No

    15. Which company provides your hosting?
    Top.Host

    16. Is your server running Windows, or if Linux; Apache, nginx or something else?
    Linux

    17. Which BP Theme are you using?
    Tried both legacy and new.

    18. Have you overloaded any BuddyPress template files.
    No

    #334421
    MattDotNet
    Participant

    Hello,

    I’m trying to develop an integration among BuddyPress and VikAppointments for one of our customers. This is the first time I dig into the BuddyPress framework and I’m unable to figure out how the fields-data mapping works.

    I tried to use the bp_profile_field_data function, but I get an error saying the latter hasn’t been declared. Doesn’t BP use a sort of autoloader?

    I also tried to look at the database structure, and in the user meta table I noticed that the values of the custom fields are structured in the following way:

    `
    meta_key | meta_value
    wbbpp_1715763478_1715763523 | Ford
    wbbpp_1715763478_1717482765 | Abarth
    `

    What do 1715763478, 1715763523 and 1717482765 stand for? I’m unable to see those identifier in other tables used by BP.

    There’s also a wbbpp_userdata record containing a serialized version of all the custom fields. But the problem is that if I manually edit those details, the new values are not applied in the front-end.

    In a few words I would like to know:

    • How can I retrieve the user custom fields?
    • How can I update the user custom fields?

    I’ll be waiting for some clarifications.

    Best Regards
    Matteo

    #334419
    Rainbow
    Participant

    PS: I used this code in conjunction with the buddypress tool (Repair total members count):

    /*
    * Paste in your theme functions.php or in bp-custom.php.
    * Load the site in a browser
    * Remove from your theme functions.php or bp-custom.php.
    */

    function buddypress_add_last_activity() {
    
      $members =  get_users( 'fields=ID' );
      // $members =  get_users( 'fields=ID&role=subscriber' );
      
      foreach ( $members as $user_id ) {
            bp_update_user_last_activity( $user_id, bp_core_current_time() );
      }
    
    }
    add_action('bp_init', 'buddypress_add_last_activity' );
    Rainbow
    Participant

    Hi Buddypress Community,

    I have the weirdest issue regarding users.

    My Admin dashboard shows ALL users (ALL 1,734 Participants 1,732 and Subscribers 1,732).

    All of them have been active on the site (I used some PHP code to make all members active to ensure everyone shows up).

    But when I go to all members in the buddypress activity wall on the front end of the site, i see MORE! It shows 1,786 Users…!

    – What is going on, and how to fix that so there’s no user discrepancy.

    Many thanks

    Adi

    #334417
    Kokiri
    Participant

    I tried writing this code however no luck.

    <?php
    // Add action to show new avatar in activity stream
    function custom_bp_avatar_activity($user_id, $args) {
    // Get the user data
    $user = get_userdata($user_id);
    $user_link = bp_core_get_userlink($user_id);

    // Create the activity entry
    bp_activity_add(array(
    ‘user_id’ => $user_id,
    ‘action’ => sprintf(__(‘%s has updated their avatar.’, ‘buddypress’), $user_link),
    ‘component’ => ‘profile’,
    ‘type’ => ‘new_avatar’,
    ‘item_id’ => $user_id,
    ));
    }
    add_action(‘xprofile_avatar_uploaded’, ‘custom_bp_avatar_activity’, 10, 2);

    // Add action to show profile update in activity stream
    function custom_bp_profile_update_activity($user_id, $posted_field_ids, $errors, $old_values, $new_values) {
    // Get the user data
    $user = get_userdata($user_id);
    $user_link = bp_core_get_userlink($user_id);

    // Create the activity entry
    bp_activity_add(array(
    ‘user_id’ => $user_id,
    ‘action’ => sprintf(__(‘%s has updated their profile.’, ‘buddypress’), $user_link),
    ‘component’ => ‘profile’,
    ‘type’ => ‘updated_profile’,
    ‘item_id’ => $user_id,
    ));
    }
    add_action(‘xprofile_updated_profile’, ‘custom_bp_profile_update_activity’, 10, 5);
    ?>

    #334416
    polsodestro
    Participant

    Hi, in our theme is incuded the Youzify Plugin that manages some graphic settings. At the moment we solved the header problem with Youzify, but it has limited settings.

    This is the actual situation of the site:

    the portal is divided in 3 main areas: community for members, specialist psychologists area, courses.

    We think to manage the community with Buddypress, so to make that users can share info between themselves. For courses we use Learnpress.

    Home page: “psicologiaintribunale.it/2023 ”
    Community page: ” psicologiaintribunale.it/2023/la-community/ ”
    Specilist page: ” psicologiaintribunale.it/2023/cerca-il-tuo-psicologo-giuridico/ ”

    For membership we are using PMP.

    Please be free to suggest us the best solutions to make better the site.

    #334412
    Kokiri
    Participant

    Okay let me put this short and simple – first of all I’m not a spammer I’m a regular user requesting support for buddypress…. Just cause I don’t have a profile picture doesn’t automatically mean I’m a spammer. Does somebody need to see my driver license to prove it?

    Why isn’t there a way to ban users permanently or set a time until their allowed with a custom message?

    #334409
    Venutius
    Moderator

    Yes, let”s do that. I think this must be something to do with your theme template, since my theme does not have this issue and I do not think it’s anything to do with Buddypress.

    It may be that your theme creator will not want to support Buddypress, but you should ask them. However, I have a suggestion for a workaround if they do not want to do this.

    I also use a plugin to set a custom header per page, and this works on my BP sites.

    Unique Headers

    #334399
    Venutius
    Moderator

    Thanks! 🙂

    What I can see is that the group menu option that you picked is pointing some odd post_type=buddypress url, which is wrong, it should simply point to https://yoursite.com/groups (or your translation of the word groups.

    You can either try editing that menu item, or create a custom link to that URL. (yoursite,com should be your own site address).

    Is that a psychology site you have there?

    #334395
    polsodestro
    Participant

    We have 2 menu links: the first to buddypress members page and the second to buddypress groups.
    These were running but from 2 days we have page 404.
    We dad tried to reset the slugs but the system had deleted all pages. Now we restored the site from a backup.
    How can we solve the not running links to buddy pages?
    Thanks in advance

    #334393
    polsodestro
    Participant

    Hi, we finded a database bkp in the hoster panel and recovered the site. We yet have the problem on the Buddy pages link (404).
    About slugs we had followed the link steps: settings -> Buddypress -> reset slugs to default ones.
    Ho could we solve the 404 page?

    Thanks

    Kokiri
    Participant

    Hello BuddyPress Support Team / Community,

    I hope this message finds you well. I am writing to request a feature enhancement for our BuddyPress community. We would love to see an option to automatically display when a user uploads or updates their avatar in the activity feed. This feature would significantly enhance user engagement by keeping the community informed of profile updates and encouraging interactions.
    Benefits:

    Increased Visibility: Members can immediately see when someone updates their avatar, promoting profile visits and interactions.
    Enhanced Engagement: Users are more likely to comment or react to avatar changes, fostering a sense of community.
    Streamlined User Experience: Automated updates in the activity feed ensure that members do not miss out on important profile changes.

    Suggested Implementation:

    Avatar Update Trigger: When a user uploads or updates their avatar, a trigger should generate a new activity entry.
    Activity Message: The activity entry could display a message like “User [Username] has updated their avatar.”
    Integration with Existing Feed: The new activity entry should seamlessly integrate with the existing activity feed, appearing in chronological order.

    Customization Options:

    Privacy Settings: Allow users to opt-out of broadcasting their avatar changes if they prefer privacy.
    Activity Message Customization: Option for users to add a custom message along with their avatar update notification.

    We believe this feature would greatly benefit our community and enhance user experience. Thank you for considering our request. We look forward to your response and any potential updates on this feature. We did find a way to block certain activity types from showing up in the activity feed – however we’re looking for a way to add this particular type in our feeds.

    Best regards,

    #334387
    polsodestro
    Participant

    We haven’t a backup becouse the site is work in progress. We reset the slugs becouse the buddypress pages weren’t more running

    #334384
    polsodestro
    Participant

    Hi, all the site pages was deleted after Buddypress slug reset. How can i recover all my pages?
    Please help me.

    Thanks

    thinlizzie
    Participant

    Where’s your approval functionality coming from ? … WordPress, Buddypress, or a plugin?

    kryzdev
    Participant

    Hello Support Team,

    I’m experiencing a frustrating issue with BuddyPress on my website. When users (including myself as Admin) try to upload a profile photo or banner, the media uploader works, and the image appears to upload successfully, displaying the “Profile picture updated successfully” message. However, upon refreshing the page or navigating to another section, the uploaded image disappears, and the profile reverts to having no profile image.

    Despite trying various plugins to manage upload sizes and file types, none of them make any changes. Deactivating all plugins didn’t resolve the issue either. The only temporary solution was switching themes, but I’ve invested significant time customizing my current theme, and starting over would mean losing all that work.

    I’ve tried:

    – Clearing cache
    – Using different browsers
    – Deactivating all plugins
    – Switching themes (temporarily resolved the issue, but the image disappeared again when switching back)

    Any suggestions or help would be greatly appreciated to resolve this issue and retain my theme and profile photos in BuddyPress.

    Thanks in advance!

Viewing 25 results - 526 through 550 (of 73,985 total)
Skip to toolbar