• Resolved liltrucks

    (@liltrucks)


    Is there a way to get a column to display each user’s percentage of profile completion? It is calculated in a buddyboss file called class-bp-xprofile-profile-completion-widget.php.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Deepak Khokhar

    (@deepakkite)

    Hi,

    Thanks for your suggestion. I just pushed a new version of the plugin that allows modifying the column value before displaying it.
    You can now use this – add_filter( ‘muc_filter_custom_col_val’, ‘YOUR_CUSTOM_CALLBACK_FUNCTION’, 10, 3 ); in a theme or plugin to achieve your results.

    I am not able to find the buddypress class you mentioned (I downloaded the latest BP plugin) and could not provide you the exact code required for your specific needs.

    However, the process will be like this:
    1. Add a new column – Enter it’s name and usermeta. The usermeta can be anything you like (as you would not need it to be loaded from database).
    2. Add the add_filter code I mentioned above in your theme’s functions.php file or a custom plugin
    3. Add the callback function that will return the modified value for a column.

    An example would look like this:

    add_filter( 'muc_filter_custom_col_val', 'muc_filter_col_val_callback', 10, 3 );
    function muc_filter_col_val_callback($custom_col_val, $column_id, $uid){
    	if( $column_id == 'custom_cal' ){
    		// logic to calculate user data
    		return 'User ID - ' . $uid;
    	}
    }

    Replace the column id in if condition. This is the usermeta that you entered while adding the new column. Also, update the code logic as per your requirements.

    I hope this helps but let me know if you have any questions.

    Thread Starter liltrucks

    (@liltrucks)

    BuddyBoss wrote, “We checked our resources regarding adding a column to the Users Dashboard about the completion percentage. We do not have the setting that will add this column on the Users Dashboard. For your reference, below is the file path that you will need to modify if you want to proceed with the column on the User’s Dashboard.?

    buddyboss-platform/bp-xprofile/classes/class-bp-xprofile-profile-completion-widget.php”

    Thread Starter liltrucks

    (@liltrucks)

    I have the actual PHP file and can send it to your email. I don’t see a way to attach here.

    Thread Starter liltrucks

    (@liltrucks)

    BuddyBoss updates their platform plugin files every day, and their theme files regularly. I would need a way to implement your idea in a way that would not get overwritten. I do have a BuddyBoss Child Theme.

    Thread Starter liltrucks

    (@liltrucks)

    If you solve this I will gladly donate $10 to the development

    Plugin Author Deepak Khokhar

    (@deepakkite)

    Unfortunately we can not retrieve the code from the theme you are using. I believe it’s a paid theme, right? Reaching out to the Buddyboss would be the best bet here as they can provide you the code that calculates the profile completeness percentage and then you can use that code inside the callback function I mentioned in previous reply.

    Thread Starter liltrucks

    (@liltrucks)

    They won’t provide it. I can email it to you.

    Plugin Author Deepak Khokhar

    (@deepakkite)

    If you have the PRO version, please reach out to the pro version support site – https://www.mediajedi.com/contact-us/

    Thread Starter liltrucks

    (@liltrucks)

    I have a PRO lic and i just now sent you that request.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘BuddyBoss Profile Completion’ is closed to new replies.