• You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

    Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"

BuddyBoss Theme - Makes The BuddyBoss Platform Look Beautiful

BuddyBoss Theme - Makes The BuddyBoss Platform Look Beautiful v2.5.60

No permission to download
1603069815486.png

Now you can no longer use the theme options ?

@NullMaster - could you check please?
Same for me and I have this warning :

Code:
Warning: Use of undefined constant BP_PLATFORM_VERSION - assumed 'BP_PLATFORM_VERSION' (this will throw an Error in a future version of PHP) in /app/public/wp-content/themes/buddyboss-theme/inc/admin/admin-init.php on line 730
 
How did you do ?
use code edit in child theme function.php
add this code below the /*Write here your own functions */

PHP:
/*Write here your own functions */
if ( function_exists( 'get_avatar' ) ) {
function brw_get_avatar_shortcode ( $attributes ) {
    $current_user = wp_get_current_user();
       
    extract(shortcode_atts(array(
        'id' => $current_user->ID,
        'size' => 32,
        'default' => 'mystery',
        'alt' => '',
                'class' => '',
                'rating' => '',
                'extra_attr' => '',
                'width' => '',
                'height' => '',
                'force_display' => ''
    ), $attributes, 'get_avatar' ));

    $args = array(
                'class' => $class,
                'rating' => $rating,
                'extra_attr' => $extra_attr,
                'width' => $width,
                'height' => $height,
                'force_display' => $force_display
        );  
    return get_avatar( $id, $size, $default, $alt, $args );
}
    add_shortcode ('get_avatar', 'brw_get_avatar_shortcode');
}


function my_courses( $attributes ) {
    extract(shortcode_atts(array(
      'btn_color' => 'red',
   ), $attributes));
    $user_id = get_current_user_id();
    $user_meta = get_user_meta($user_id);
    $course_progress = unserialize($user_meta["_sfwd-course_progress"][0]);
    if (!empty($course_progress)):
        return '<hr style="background:#BABABA;height:1px;margin-top:10px;margin-bottom:40px;"><div class="courses">'.
        do_shortcode('[ld_course_list mycourses="true" progress_bar="true" num="3"]').
        '</div>';
    else:
        return '
        <div class="my_courses">
            <div class="no_courses">
                <h3>No Courses!</h3>
                <div>Choose a course from the Course Library<br> or use the button below to start</div>
                <a class="btn" href="/courses" style="background:'.$btn_color.'">+</a>
            </div>
        </div>';
    endif;
}
add_shortcode('pbd_my_courses', 'my_courses');



function count_badges() {
    $achievements = gamipress_get_achievements(["post_type"=>"badges", 'orderby' => 'data', 'order' => 'asc']);
    $user_achievements = gamipress_get_user_earned_achievement_ids();
    $count = 0;
    foreach ($achievements as $achievement)
    {
        if ( in_array($achievement->ID, $user_achievements ))
        {
            $count++;
        }
    }
    return $count;
}
add_shortcode('pbd_count_badges', 'count_badges');
function profile_tab_subscription_tag() {
    global $bp;

    $parent_slug = 'settings';

       
    //Add subnav item    
    bp_core_new_subnav_item( array(
    'name'            => 'Subscriptions',
    'slug'            => 'subscriptions',
    'parent_url'      => $bp->loggedin_user->domain . $parent_slug.'/',
    'parent_slug'     => $parent_slug,
    'screen_function' => 'subscription_screen',
    'position'        => 15    ) );
    bp_core_new_nav_item( array(
    'name'            => 'Goodies',
    'slug'            => 'goodies',
    'parent_url'      => bp_loggedin_user_domain() . '/goodies/',
    'parent_slug'     => $bp->profile->slug,
    'screen_function' => 'goodies_screen',
    'position'        => 90    ) );
}
add_action( 'bp_setup_nav', 'profile_tab_subscription_tag' );

function subscription_screen() {
   
    // Add title and content here - last is to call the members plugin.php template.
    add_action( 'bp_template_content', 'subscription_tab_content' );
    bp_core_load_template( 'buddypress/members/single/plugins' );
}


function subscription_tab_content() {
    $library_items = get_posts( array(
        'post_type'        => 'library',
        'numberposts'      => -1,
        'orderby'          => 'post_title',
        'order'            => 'ASC',
    ));
    ?>
    <div class="" style="flex-direction: column">
        <?php
            if (isset($_GET['action']) && $_GET['action'] == 'Cancel'){
                ?>
                <script>
                alert('Your cancellation request has been successfully processed.\n\nYour subscription will be cancelled on <?=$_GET['end_date'];?>');
                </script>
                <?php
            }
        ?>
        <?php echo do_shortcode('[memb_list_subscriptions status="active"]
           
            <h3>%%subscription.name%%</h3>
            <div style=" border-bottom: solid; border-width: 1px; border-color: #eaeaea; margin-bottom: 20px; ">Subscription Details</div>
            <div>$%%subscription.price%%</div>
            <div style="display:flex;justify-content: space-between;margin-top: 20px;">
                <div style=" display: flex; flex-direction: column; ">
                    %%subscription.nextbilling%%
                    <span style="font-size:12px">Next payment date
                </div>
                <div>%%cancel.button%%</div>
            </div>
           
            <div style=" border-bottom: solid; border-width: 1px; border-color: #eaeaea; margin-top:30px; margin-bottom: 20px; ">Payment Method</div>
            <div style="display:flex;justify-content: space-between;margin-top: 20px;">
                <div>%%creditcard.last4%%</div>
                <div><a href="" class="add_card_btn" style="font-size:14px">Change payment info</a></div>
            </div>
       
           
            [else_memb_list_subscriptions]
            Sorry, we didn\'t find any active subscriptions associated with your account.
            [/memb_list_subscriptions]');?>
        <?php echo do_shortcode('<div class="memberium-form">
            <div style="display:none" class="add_card">
                <h3>Change payment info</h3>
                [memb_add_creditcard successurl="/thank-you-for-updating-your-info/" failureurl="/payment-details-failure/" addonly="yes"]
            </div>
            </div>
');?>
    <style>
        input, select {
            width: 100%;
            margin-bottom: 20px;
        }
    </style>
    <script>
        jQuery(document).ready(function($){
            $('.add_card_btn').click(function(e){
           
                e.preventDefault();
                $(".add_card").slideDown();
               
            });
        });
    </script>
    </div>
    <?php
}


function goodies_screen() {
   
    // Add title and content here - last is to call the members plugin.php template.
    add_action( 'bp_template_content', 'goodies_tab_content' );
    bp_core_load_template( 'buddypress/members/single/plugins' );
}


function goodies_tab_content() {
    ?>
    <style>
        .gamipress-achievement-image {
            padding-right: 0 !important;
            width: 100% !important;
            text-align: center;
        }
        .gamipress-achievement-image img {
            width: 120px
        }
        .gamipress-achievement-title {
            text-align: center;
            padding-top: 10px;
        }
        .user-has-not-earned {
            position: relative;
        }
        .user-has-not-earned:before {
            content: "\e90d";
            font-family: "bb-icons";
            position: absolute;
            right: 20px;
            font-size:18px;
           
        }
    </style>
    <?php
    echo do_shortcode('[gamipress_achievements type="goodies" filter="no" search="no" limit="100" columns="3" orderby="menu_order" order="ASC"]');
   
}

function pbd_gamipress_update_user_points($user_id,$new_points ){
    $_SESSION["pbd_points_updated"] = true;
    //$_SESSION["pbd_points"] = $new_points;
}
add_action('gamipress_update_user_points', 'pbd_gamipress_update_user_points',10,2);

function pbd_points_updated() {
    if (isset($_SESSION["pbd_points_updated"]) && $_SESSION["pbd_points_updated"]){
        ?>
        <style>
        .progress_bar{
            animation: expandWidth 2s;
        }
        @keyframes expandWidth {
            0% { width: 0; }
        }
        </style>
        <script>
        jQuery(document).ready(function($){
                $('#points').each(function () {
                $(this).prop('Counter',0).animate({
                    Counter: $(this).text()
                }, {
                    duration: 2000,
                    easing: 'swing',
                    step: function (now) {
                        $(this).text(Math.ceil(now));
                    }
                });
            });
        });
       
        </script>
        <?php
        unset($_SESSION['pbd_points_updated']);
    }
}
add_action('wp_footer','pbd_points_updated');

// Add Shortcode
function pbd_restrict_content( $atts , $content = null ) {

    // Attributes
    $atts = shortcode_atts(
        array(
            'rank_id' => get_the_ID(),
        ),
        $atts
    );
    $user_id = get_current_user_id();
    //return $atts['rank_id'];
    //return $content;
   
    $achievement = gamipress_get_user_achievements(array('user_id'=>$user_id,'achievement_id'=>$atts['rank_id']));
    if (!empty($achievement)){
        return $content;
    }
   

}
add_shortcode( 'pbd_restrict_content', 'pbd_restrict_content' );
function pbd_courses_completed() {
    $courses = 0;
    $user_id = get_current_user_id();
    $user_meta = get_user_meta($user_id);
    $course_progress = unserialize($user_meta["_sfwd-course_progress"][0]);
    $defaults = array(
                'post_type' => 'sfwd-courses',
                'fields'    => 'ids',
                'nopaging'  => true,
            );

    $course_query_args = wp_parse_args( $course_query_args, $defaults );
    $course_query      = new WP_Query( $course_query_args );
    if ( ( isset( $course_query->posts ) ) && ( ! empty( $course_query->posts ) ) ) {
        $course_ids = $course_query->posts;
    }
   
    if (!empty ($course_ids)){
        foreach ($course_ids as $course_id){
            $courses = $courses + learndash_course_completed( $user_id ,$course_id );
        }
    }
    return ($courses);

}
add_shortcode( 'pbd_courses_completed', 'pbd_courses_completed' );


if( !function_exists('custom_user_login_redirect') ) {
function custom_user_login_redirect() {
$redirect_to = 'https://www.yourdomain.ltd/yourcustomlink';
return $redirect_to;
}
add_filter('login_redirect','custom_user_login_redirect',10,3);
}
?>

or u can use mine from attachment below, u can use it, as i got tutorial from babiato too, but forgot the thread name.

and for Plenty Gamipress Addons from @TassieNZ and Babiato Crew <3
 

Attachments

  • buddyboss-theme-child.zip
    102.3 KB · Views: 101
  • Love
Reactions: NextMan
doesnt work for me

"Warning: Access Restricted. Please enable BuddyBoss Theme License key HERE and try again."
 
I fixed the issue in 1.6 by commenting out the following functions in inc/admin/admin-init.php

buddyboss_theme_show_theme_option_jaherat_pehla()
buddyboss_theme_show_theme_option_jaherat_pachhi()
buddyboss_theme_options_avirat_sudharo()

The first two are in a block together while the last one was at the very end.

I also don't recommend using the code xpresotw posted. The functions.php has a LOT of stuff in it that won't help with the issue and the child theme supplied has a LOT of extra files in it (it's not a clean, empty, child theme and has a function in it to redirect traffic to "https://www.leg****m.co.id/dash***dku". While this may have been posted with good intentions, it may cause issues for folks who download and use it without understanding what they are installing.
 
Last edited:
I fixed the issue in 1.6 by commenting out the following functions in inc/admin/admin-init.php

buddyboss_theme_show_theme_option_jaherat_pehla()
function buddyboss_theme_show_theme_option_jaherat_pachhi()
function buddyboss_theme_options_avirat_sudharo()

The fist two are in a block together while the last one was at the very end.

I also don't recommend using the code xpresotw posted. The functions.php has a LOT of stuff in it that won't help with the issue and the child theme supplied has a LOT of extra files in it (it's not a clean, empty, child theme and has a function in it to redirect traffic to "https://www.leg****m.co.id/dash***dku". While this may have been posted with good intentions, it may cause issues for folks who download and use it without understanding what they are installing.

yup, replace "https://www.leg****m.co.id/dash***dku". with your own customdomain/url. it'll redirected my users to specific url when they're logged in.
FireShot Capture 034 - (2) BuddyBoss - Platform Theme - Babiato Forums - babiato.org.png
yup, as i said recently, "using a Plenty of Gamipress Addons from @TassieNZ " in my post :)
if you don't use theme, just remove the gamipress option from child theme.
 
Last edited:
  • Like
Reactions: qball
Are you commenting out the whole function - all of the lines associated with that function. I wasn't able to get it to work. Can you share an example?
 
I fixed the issue in 1.6 by commenting out the following functions in inc/admin/admin-init.php

buddyboss_theme_show_theme_option_jaherat_pehla()
buddyboss_theme_show_theme_option_jaherat_pachhi()
buddyboss_theme_options_avirat_sudharo()

The first two are in a block together while the last one was at the very end.

I also don't recommend using the code xpresotw posted. The functions.php has a LOT of stuff in it that won't help with the issue and the child theme supplied has a LOT of extra files in it (it's not a clean, empty, child theme and has a function in it to redirect traffic to "https://www.leg****m.co.id/dash***dku". While this may have been posted with good intentions, it may cause issues for folks who download and use it without understanding what they are installing.

This works perfect, than you.
 
Getting the following message when attempting to save styling via the Theme Options - Custom code block:
"This panel is set to be Read-Only. Saving is disabled. "

Download resources in this thread and use them as instructions below.

I fixed the issue in 1.6 by commenting out the following functions in inc/admin/admin-init.php

buddyboss_theme_show_theme_option_jaherat_pehla()
buddyboss_theme_show_theme_option_jaherat_pachhi()
buddyboss_theme_options_avirat_sudharo()

The first two are in a block together while the last one was at the very end.
 
The best way — add code to functions.php of child theme:

PHP:
add_action( 'wp_loaded', function(){
  remove_action( 'redux/page/buddyboss_theme_options/form/before', 'buddyboss_theme_show_theme_option_jaherat_pehla' );
  remove_action( 'redux/page/buddyboss_theme_options/form/after', 'buddyboss_theme_show_theme_option_jaherat_pachhi' );
  remove_action( 'wp_ajax_buddyboss_theme_options_ajax_save', 'buddyboss_theme_options_avirat_sudharo', 0 );
} );
 
Last edited:
The best way — add code to functions.php of child theme:

PHP:
add_action( 'wp_loaded', function(){
  remove_action( 'redux/page/buddyboss_theme_options/form/before', 'buddyboss_theme_show_theme_option_jaherat_pehla' );
  remove_action( 'redux/page/buddyboss_theme_options/form/after', 'buddyboss_theme_show_theme_option_jaherat_pachhi' );
  remove_action( 'wp_ajax_buddyboss_theme_options_ajax_save', 'buddyboss_theme_options_avirat_sudharo', 0 );
} );
This worked perfectly, many thanks
 
  • Like
Reactions: dr94101
AdBlock Detected

We get it, advertisements are annoying!

However in order to keep our huge array of resources free of charge we need to generate income from ads so to use the site you will need to turn off your adblocker.

If you'd like to have an ad free experience you can become a Babiato Lover by donating as little as $5 per month. Click on the Donate menu tab for more info.

I've Disabled AdBlock