This topic has 26 replies, 3 voices, and was last updated 11 years by Bottosso.

#6972
 Bottosso
Participant

Hi

I have the same problem, I tried put the code which you talk about in this link: https://archived.seventhqueen.com/forums/topic/how-to-add-more-tabs-next-to-the-profile-image
but the problem still the same. I have been using WP multisites and I’m using the sweedate-child theme.

My currently page example: http://cl.ly/image/372Y3L1P0t3X
Currently DB: http://cl.ly/image/2m1J3H2n1L0M
Plugins activated: http://cl.ly/image/3A210p1O3g1n

Thanks

#7014
 Satnamliv
Participant
This reply has been set as private.
#7016
 Satnamliv
Participant
This reply has been set as private.
#7044
 Bottosso
Participant

Sorry “justpaulius” I can’t see your answers it is marked as private.

#7055
 SQadmin
Keymaster

Paste here the code you have added, or better the sweetdate-child/functions.php file

Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
#7060
 Bottosso
Participant


<?php
/**
* @package WordPress
* @subpackage Sweetdate
* @author SeventhQueen <themesupport@seventhqueen.com>
* @since Sweetdate 1.0
*/

/**
* Sweetdate Child Theme Functions
* Add extra code or replace existing functions
*/

// TOP MEMBERS - PICTURE SIZE
if (!function_exists('kleo_top_members')) {
function kleo_top_members( $atts, $content = null ) {
extract(shortcode_atts(array(
'style' => 'standard'
), $atts));

$output = '

<div class="section-members">
<div class="item-options" id="members-list-options">
'.__("Newest", 'kleo_framework').'
'.__("Active", 'kleo_framework').'
'.__("Popular", 'kleo_framework').'
</div>';

$output .= '<ul class="item-list kleo-bp-active-members">';
if ( bp_has_members( 'type=active&max=30' ) ) :
while ( bp_members() ) : bp_the_member();
$output .= section_members_li();

endwhile;
endif;
$output .='';

$output .= '<ul class="item-list kleo-bp-newest-members" style="display:none;">';
if ( bp_has_members( 'type=newest&max=30' ) ) :
while ( bp_members() ) : bp_the_member();
$output .= section_members_li();

endwhile;
endif;
$output .='';

$output .= '<ul class="item-list kleo-bp-popular-members" style="display:none;">';
//if ( bp_has_members( 'type=popular&max=30&meta_key=' . $wp_table ) ) :
if ( bp_has_members( 'type=popular&max=30' ) ) :
while ( bp_members() ) : bp_the_member();
$output .= section_members_li();

endwhile;
endif;
$output .='';

$output .= '</div><!--end section-members-->';

$output .= <<<JS
<script type="text/javascript">
jQuery(document).ready(function() {

jQuery(".members-switch").click(function() {
var bpMembersContext = jQuery(this).parent().parent();
var container = "ul.kleo-bp-"+jQuery(this).attr('data-id')+"-members";

jQuery("ul.item-list", bpMembersContext).hide();
jQuery(".members-switch").removeClass("selected");
jQuery(this).addClass("selected");
jQuery(container, bpMembersContext).show(0, function() {
jQuery(container+" li").hide().each(function (i) {
var delayInterval = 150; // milliseconds
jQuery(this).delay(i * delayInterval).fadeIn();
});
});
return false;
});
});

jQuery(function () {
jQuery('.kleo-bp-active-members').hide();
jQuery('.section-members').one('inview', function (event, visible) {
if (visible) {
var container = ".kleo-bp-active-members";
jQuery(container).show(0, function() {
jQuery(container+" li").hide().each(function (i) {
var delayInterval = 150; // milliseconds
jQuery(this).delay(i * delayInterval).fadeIn();
});
});
}
});

});

</script>
JS;
return $output;

}
add_shortcode('kleo_top_members', 'kleo_top_members');
}

// REMOVE PROFILE NAVIGATION
add_action('after_setup_theme','kleo_remove_actions');
/**
* Override existing actions
* Use these functions to replace/remove existing actions
* @since Sweetdate 1.3
*/
function kleo_remove_actions()
{
remove_action('kleo_after_breadcrumb', 'bp_add_profile_navigation');
}

// REDIRECT FOR THEIR PROFILE AFTER LOGIN
add_filter("login_redirect","kleo_redirect_to_profile",100,3);

function kleo_redirect_to_profile($redirect_to_calculated,$redirect_url_specified,$user){
/*if no redirect was specified,let us think ,user wants to be in wp-dashboard*/
if(!is_super_admin($user->ID))
return bp_core_get_user_domain($user->ID );
else
return $redirect_to_calculated; /*if site admin*/
}

// REMOVE SOME THINGS - BP PROFILE
function bp_remove_nav_tabs() {
bp_core_remove_nav_item( 'forums' );

}

add_action( 'bp_setup_nav', 'bp_remove_nav_tabs', 15 );

// TAB - ABOUT ME
add_action('after_setup_theme','kleo_my_custom_tabs');
function kleo_my_custom_tabs()
{
global $bp_tabs;
$bp_tabs = array();

$bp_tabs['base'] = array(
'type' => 'regular',
'name' => __('About me', 'kleo_framework'),
'group' => 'Base',
'class' => 'regulartab'
);
}

?>

#7065
 Satnamliv
Participant

this code works for you ?

#7073
 SQadmin
Keymaster

That should work if your group name under Users – Profile fields is Base
Modify it in the code if it is different

Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
#7089
 Bottosso
Participant

Hi justpaulius / admin

This code below not working for me.


// TAB - ABOUT ME
add_action('after_setup_theme','kleo_my_custom_tabs');
function kleo_my_custom_tabs()
{
global $bp_tabs;
$bp_tabs = array();

$bp_tabs['base'] = array(
'type' => 'regular',
'name' => __('About me', 'kleo_framework'),
'group' => 'Base',
'class' => 'regulartab'
);
}

My currently settings: http://cl.ly/image/1W221g0D1q32

I installed the sweet date theme with multisites, everinthing works fine but only this tab never shows up to me.

#7092
 Satnamliv
Participant

did you changed name of base name ir bp profile fields?

#7093
 Bottosso
Participant

This is my currently DB: http://cl.ly/image/2m1J3H2n1L0M

I have one BP social network each website in my network.

#7095
 Bottosso
Participant

Table wp_2_bp_xprofile_groups: http://cl.ly/image/0h0p3r3z1y3y

#7113
 Satnamliv
Participant

<?php
/**
* @package WordPress
* @subpackage Sweetdate
* @author SeventhQueen <themesupport@seventhqueen.com>
* @since Sweetdate 1.0
*/

/**
* Sweetdate Child Theme Functions
* Add extra code or replace existing functions
*/
// TAB – ABOUT ME
add_action(‘after_setup_theme’,’kleo_my_custom_tabs’);
function kleo_my_custom_tabs()
{
global $bp_tabs;
$bp_tabs = array();

$bp_tabs[‘base’] = array(
‘type’ => ‘regular’,
‘name’ => __(‘About me’, ‘kleo_framework’),
‘group’ => ‘Pagrindinis’,
‘class’ => ‘regulartab’
);
}
?>
it works for me

#7114
 Satnamliv
Participant

but you need to change group to Base

#7115
 Bottosso
Participant

Yep, I changed the group to Base, but unfortunately not working.

#7116
 Satnamliv
Participant

Check did you correctly copied code. It may be issue why not working

#7145
 Bottosso
Participant

Yes, the code is same, I don´t have idea what happening

#7150
 SQadmin
Keymaster

Give us access to your site if it is still not working.. you are definitely doing something wrong. Also the user needs to have the profile fields completed

Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
#7165
 Bottosso
Participant
This reply has been set as private.
#7260
 Bottosso
Participant

Hi,

I think the problem are in RTMEDIA plugin because I have this error below when I try access the profile page:

WordPress database error Table ‘wp-rtmedia.wp_bp_xprofile_groups’ doesn’t exist for query SELECT id FROM wp_bp_xprofile_groups WHERE name = ‘Base’ made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), do_action(‘template_redirect’), call_user_func_array, bp_template_redirect, do_action(‘bp_template_redirect’), call_user_func_array, bp_screens, do_action(‘bp_screens’), call_user_func_array, bp_activity_screen_my_activity, bp_core_load_template, load_tem

I’ll try to contact the RtMedia guys and I’ll post here possible fixes for it.

Many Thanks 🙂

#7265
 SQadmin
Keymaster

I have logged in into your site and you didn’t at least had Buddypress intalled in your site… not to say to import the fields or define them . Please configure your site properly

Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
#7277
 Bottosso
Participant

Problem solved, I needed active the buddypress plugin in all sites in my network. 🙂

Viewing 27 posts - 1 through 27 (of 27 total)

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?