This topic has 3 replies, 2 voices, and was last updated 8 years by Laura.

  • Author
  • #72925
     jenny555
    Participant

    Hi, i try this : code but it don’t work for me. I have also a problem with women and man online on the homepage, it doesn’t work. Can you help me please? Thanks

    Attachments:
    You must be logged in to view attached files.
    #73185
     Laura
    Moderator

    Hello, i already answer you in the other post:

    “Hello, do you have your site in another language? If so, you need to change the shortcode in homepage, and change woman and man for your language words, also in the code above”

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

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #73189
     jenny555
    Participant

    Hello Laura,
    yes i have the french language activated. I tried what you told me to do, but it doesn’t work. Here is my functions file:

    COPY CODE
    <?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
    */ 
    
    //Avatar default
    add_filter( 'bp_core_fetch_avatar_no_grav', '__return_true' );
    	function myavatar_add_default_avatar( $url )
    	{
    		global $bp;
    		$gender = xprofile_get_field_data('Je suis', bp_get_member_user_id());
    		if ($gender == "Homme") {
    			return $img_url = SECU.'/wp-content/uploads/2015/08/avatarh.png';
    		}
    		else {
    			return $img_url = SECU.'/wp-content/uploads/2015/08/avatarf.png';
    		}
    	}
    	add_filter( 'bp_core_mysteryman_src', 'myavatar_add_default_avatar' );
    	add_filter( 'bp_core_default_avatar_user', 'myavatar_add_default_avatar' );
    	
    
    //manual total members
    	add_filter( 'bp_get_total_member_count', 'kleo_my_total_members' );
    function kleo_my_total_members($number) {
    	$number = str_replace(".","",$number);
    	return 1284;
    }
    //manual number online members
    add_filter( 'kleo_online_users_count', 'kleo_my_online_users', 10, 2);
    function kleo_my_online_users($number, $value) {
    	switch ($value) {
    		//ALL MEMBERS ONLINE
    		case FALSE:
    			return '195';
    			break;
    
    		case "Woman":
    			return $number+51;
    			break;
    		
    		case "Man":
    			return $number+134;
    			break;
    		
    		
    		default:
    			return $number;
    			break;
    	}
        
    }
    ?>

    what doesn’t work? Also I didn’t understand what I have to change in the homepage. Thanks

    Note : Please do not reply to the another post, thanks

    #73432
     Laura
    Moderator

    Hello, already replied, please let stay in the other post 🙂

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

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

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

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?