Forum Replies Created

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
  • in reply to: Custom member page Pagination problem (Ajax?) #45025
     davidvitorino
    Participant

    I will head over there then, thank you.

    in reply to: Custom member page Pagination problem (Ajax?) #45023
     davidvitorino
    Participant

    Thank you for the quick answer.
    You are right that function is the only KLEO one visible on the code.
    I have made the changes and now there is no PHP error.

    Pagination is still broken though.

    http://wp1.kodeserver.net/player/

    in reply to: Huge members #45019
     davidvitorino
    Participant

    @sermsak you might try to solve the question without changing buddypress code, consider to substitute that text with javascript on that page template.

    in reply to: Custom member page Pagination problem (Ajax?) #45017
     davidvitorino
    Participant

    oops, trying to upload zip instead

    Attachments:
    You must be logged in to view attached files.
    in reply to: Custom member page Pagination problem (Ajax?) #45016
     davidvitorino
    Participant

    Hello,

    i have copied the page template to twentyfifteen theme, and got this error:

    Fatal error: Call to undefined function sq_option() in /home/uklbiymd/public_html/wp1/wp-content/themes/twentyfifteen/page-player.php on line 102

    Then i tried to add the kleo_framework folder and the functions in funtions.php to the twentyfifteen funtions.php.

    Total crash!

    Kleo has so many personalized functions that i cannot just “try the same code on different theme”.

    I have attached the page template file to this message. Really hope you can help on this, as the site is live, and the problem arose only after we got members registering.

    I’ve also atached the child theme functions.php, buddypress.php (edited line 99 to add page content to BP page) and the bp-custom.php that resides in plugin folder.

    I have setup a test site with the same code on the same host, if you need access for testing i can provide.
    Here is the link to the same page template (but with different member role) on test site.
    http://wp1.kodeserver.net/player/

    Let me know, and thank you in advance

    in reply to: Custom member page Pagination problem (Ajax?) #44921
     davidvitorino
    Participant

    Ill try it and let you know ASAP.

    in reply to: Custom member page Pagination problem (Ajax?) #44881
     davidvitorino
    Participant

    Sorry about first message saying only Hello!

    I am having a problem with 2 custom member list pages.

    http://www.careercoach.it/coach/
    http://www.careercoach.it/player/

    Those page filter members by WP role, and pagination is not working correctly, when you click page 2 on the pagination links, it works, but when you click the previous button link or page 1 link, it stays on the same page.

    Pagination is working correctly on the main member page though.
    http://www.careercoach.it/members/

    I have already tried to disable non theme plugins, but did not solve the problem.

    here is some of the code that i use on the coach member page:

    COPY CODE
    <?php do_action( 'bp_before_members_loop' ); ?>
                
    <?php if ( bp_has_members( bp_ajax_querystring( 'members') . '&exclude=' .bp_exclude_users_but_coach() . '&per_page=' . sq_option('bp_members_perpage', 24) ) ) : ?>
    
    	<div id="pag-top" class="pagination">
    		<div class="pag-count" id="member-dir-count-top">
    			<?php bp_members_pagination_count(); ?>
    		</div>
    		<div class="pagination-links" id="member-dir-pag-top">
    			<?php bp_members_pagination_links(); ?>
    		</div>
    	</div>
    
    	<?php do_action( 'bp_before_directory_members_list' ); ?>

    and here is the code i use on child theme functions.php:

    COPY CODE
    <?php
    /**
     * @package WordPress
     * @subpackage Kleo
     * @author SeventhQueen <themesupport@seventhqueen.com>
     * @since Kleo 1.0
     */
    
    /**
     * Kleo Child Theme Functions
     * Add custom code below
    */ 
    
    function remove_nav_items() {
        bp_core_remove_nav_item( 'forums' );
        bp_core_remove_nav_item( 'groups' );
        //bp_core_remove_nav_item( 'notifications' );
        //bp_core_remove_subnav_item( 'profile', 'change-avatar' );
    }
    add_action( 'bp_setup_nav', 'remove_nav_items');
    
    function pc_get_userrole ($user_id) {
    
    $user = new WP_User($user_id);
    
    $userclean = $user->roles[0];
    
    return $userclean;
    
    }
    
    // aggiunge colonne backend - utenti
    
    function cc_modify_user_table( $column ) {
        $column['RuoloScelto'] = 'Ruolo Scelto';
    
        return $column;
    }
    
    add_filter( 'manage_users_columns', 'cc_modify_user_table' );
    
    // popola la nuova colonna
    
    function cc_modify_user_table_row( $val, $column_name, $user_id ) {
        $user = get_userdata( $user_id );
        
        switch ($column_name) {
            case 'RuoloScelto' :
                return xprofile_get_field_data( 'Tipo di profilo', $user_id); //$user->user_url;
                break;
    
            default:
        }
    
        return $return;
    }
    
    add_filter( 'manage_users_custom_column', 'cc_modify_user_table_row', 10, 3 );

    Also here is my bp-custom.php file:

    COPY CODE
    <?php
    
    /*
    add_filter( 'bp_registration_needs_activation', '__return_false' );
    
    function register_role($user_id) {
        $user_role = strtolower(xprofile_get_field_data('Tipo di profilo', $user_id));
        switch($user_role) {
    
            case "Player":
                $new_role = 'player';
                break;
            case "Coach":
                $new_role = 'coach';
                break;
            case "Senior Coach":
                $new_role = 'seniorcoach';
                break;        
    
        }
        wp_update_user(array(
            'ID' => $user_id,
            'role' => $new_role
        ));
    }
    add_action( 'user_register', 'register_role');
    */
    
     
    function bp_exclude_users_but_player() {
    $excluded_users_but_player = implode(',',get_users('role=coach&fields=ID'));
    $excluded_users_but_player = $excluded_users_but_player.','.implode(',',get_users('role=seniorcoach&fields=ID'));
    $excluded_users_but_player = $excluded_users_but_player.','.implode(',',get_users('role=subscriber&fields=ID'));
    $excluded_users_but_player = $excluded_users_but_player.','.implode(',',get_users('role=editor&fields=ID'));
    $excluded_users_but_player = $excluded_users_but_player.','.implode(',',get_users('role=administrator&fields=ID'));
    return $excluded_users_but_player;
    }
    
    function bp_exclude_users_but_coach() {
    $excluded_users_but_coach = implode(',',get_users('role=player&fields=ID'));
    //$excluded_users_but_coach = $excluded_users_but_coach.','.implode(',',get_users('role=seniorcoach&fields=ID'));
    $excluded_users_but_coach = $excluded_users_but_coach.','.implode(',',get_users('role=subscriber&fields=ID'));
    $excluded_users_but_coach = $excluded_users_but_coach.','.implode(',',get_users('role=editor&fields=ID'));
    $excluded_users_but_coach = $excluded_users_but_coach.','.implode(',',get_users('role=administrator&fields=ID'));
    return $excluded_users_but_coach;
    }
    
    function bp_exclude_users_but_senior_coach() {
    $excluded_users_but_senior_coach = implode(',',get_users('role=player&fields=ID'));
    $excluded_users_but_senior_coach = $excluded_users_but_senior_coach.','.implode(',',get_users('role=coach&fields=ID'));
    $excluded_users_but_senior_coach = $excluded_users_but_senior_coach.','.implode(',',get_users('role=subscriber&fields=ID'));
    $excluded_users_but_senior_coach = $excluded_users_but_senior_coach.','.implode(',',get_users('role=editor&fields=ID'));
    $excluded_users_but_senior_coach = $excluded_users_but_senior_coach.','.implode(',',get_users('role=administrator&fields=ID'));
    return $excluded_users_but_senior_coach;
    }
    
    function bp_exclude_cc_backend_users() {
    $excluded_cc_backend_users = implode(',',get_users('role=subscriber&fields=ID'));
    $excluded_cc_backend_users = $excluded_cc_backend_users.','.implode(',',get_users('role=editor&fields=ID'));
    $excluded_cc_backend_users = $excluded_cc_backend_users.','.implode(',',get_users('role=administrator&fields=ID'));
    return $excluded_cc_backend_users;
    }
    
    // toglie link dalle voci profilo
    function remove_xprofile_links() {
        remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 9, 2 );
    }
    add_action( 'bp_init', 'remove_xprofile_links' );
    
    /**
     * Change BuddyPress default Members landing tab.
     */
    define('BP_DEFAULT_COMPONENT', 'profile' );
    
    function cc_change_profile_tab_order() {
    global $bp;
    
    $bp->bp_nav['profile']['position'] = 10;
    $bp->bp_nav['activity']['position'] = 20;
    //$bp->bp_nav['friends']['position'] = 30;
    $bp->bp_nav['groups']['position'] = 40;
    //$bp->bp_nav['blogs']['position'] = 50;
    $bp->bp_nav['messages']['position'] = 60;
    $bp->bp_nav['settings']['position'] = 70;
    }
    add_action( 'bp_setup_nav', 'cc_change_profile_tab_order', 999 );
    
    ?>

    Sorry for the long post.

    in reply to: Login popup not working #43450
     davidvitorino
    Participant

    forgot to link the site:

    http://careercoach.it

    in reply to: Login popup not working #43448
     davidvitorino
    Participant

    Hello,

    I have a problem where when clicked the “login with facebook button” in login modal and in registration page does nothing.

    I have facebook login enabled on theme options, do i have to insert facebook API key also in the options?

    When clicked nothing happens, button links to “#”

    I do not have the buddypress-function.php on child theme as @kajugustavo mentioned.

    Any ideas?

    in reply to: Override Visual Composer (K-Elements) Templates #40937
     davidvitorino
    Participant

    Hello @Abe,
    i am trying to change the plugin/k_elements/shortcodes/templates/buddypress/kleo_bp_members_grid.php to include only a type of user (like admin, edit, ecc)

    I have copied the file inside child theme into this folder:
    kleo-child/k_elements/buddypress/kleo_bp_members_grid.php

    But theme is still fetching the original, unmodified versione from plugin folder.

    Using wp4.1 and theme version 2.3.1

    Can you confirm that plugin template overriding is working as intended?
    Thankyou

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

Log in with your credentials

Forgot your details?