Forum Replies Created

Viewing 16 posts - 121 through 136 (of 136 total)
  • Author
  •  alberhd
    Participant

    Ah ok,maybe i know the problem,i enter both codes,confusion! and is just one of them, right?

    COPY CODE
    add_action('user_register', 'kleo_pmpro_default_level');
    function kleo_pmpro_default_level($user_id) {
    	pmpro_changeMembershipLevel(1,$user_id);
    }

    OR

    COPY CODE
    /**
    * When registering, add the member to a specific membership level
    * based on the field value he has selected
    *
    * @global object $wpdb
    * @global object $bp
    * @param integer $user_id
    */
    function kleo_pmpro_default_level($user_id) {
        global $wpdb, $bp;
     
        //Change this with your field name
        $field_name= "I am a";
     
        //Change the field value
        $value_to_match = "Woman";
     
        //Membership level id
        $membership_level = 1;
     
        //Done editing
        $field_id = $wpdb->get_var( $wpdb->prepare( "SELECT id FROM {$bp->profile->table_name_fields} WHERE name = %s", $field_name ) );
        if ($_POST['field_'.$field_id] == $value_to_match) {
                pmpro_changeMembershipLevel($membership_level, $user_id);
        }
    }
     
    function kleo_mu_pmpro_default_level($user_id, $password, $meta) {
        global $bp, $wpdb;
     
        //Change this with your field name
        $field_name= "I am a";
     
        //Change the field value
        $value_to_match = "Woman";
     
        //Membership level id
        $membership_level = 1;
     
        
        //Done editing
        $field_id = $wpdb->get_var( $wpdb->prepare( "SELECT id FROM {$bp->profile->table_name_fields} WHERE name = %s", $field_name ) );
        $field_value = $meta['field_'.$field_id];
        if ( $field_value == $value_to_match ) {
            pmpro_changeMembershipLevel($membership_level, $user_id);
        }
    }
     
    if (is_multisite()) {
        add_action( 'wpmu_activate_user', 'kleo_mu_pmpro_default_level', 10, 3);
    } else {
        add_action('user_register', 'kleo_pmpro_default_level');
    }

    If I understand good the first code,if I create a membership free,that on the list of the plugin is the membership number 1,when the user will enter on the page,automatically they will have this membership right?

     alberhd
    Participant

    Do you say that probably is because the code is already entered on /sweetdate-child/functions.php?

    Is the first time that i enter this code,but i will check,thank you for your help.

    Im talking about this code: https://archived.seventhqueen.com/forums/topic/membership-auto-in-registration

    in reply to: Cometchat chat link in profile #25504
     alberhd
    Participant

    I appreciate your help, thanks for the detail. After i will try the code,one more time,thank you!

    in reply to: Cometchat chat link in profile #25501
     alberhd
    Participant

    wangguard put the button “user report” directly there for example,so should be:

    add a new blue button on this place with the word “Chat” that works with this action “”javascript:jqcc.cometchat.chatWith(‘<?php echo bp_displayed_user_id() ?>’);”

    I dont know much,is just one idea

    in reply to: Cometchat chat link in profile #25495
     alberhd
    Participant

    I want just that appear here,is the standard menu,without touch nothing,some plugins put there his buttons automatically,so should be just put the cometchat button code on the correct file,but i dont know where,thank for your time and help

    Attachments:
    You must be logged in to view attached files.
    in reply to: Important problem uploading photos #25488
     alberhd
    Participant

    maybe is just one code to after the photo is uploaded the page did reload,but i dont know…

    in reply to: Page who's online #25456
     alberhd
    Participant

    about this,some shortcode to do a page with just the popular users?

    in reply to: Important problem uploading photos #25423
     alberhd
    Participant

    any help from support? Thank you!

    in reply to: Re: Comet Chat #25372
     alberhd
    Participant

    Im waiting about this question,should appear like in the photo attached

    Attachments:
    You must be logged in to view attached files.
    in reply to: What is the file to edit the profile menu? #25367
     alberhd
    Participant

    Yes,i will attach two captures,i need help with this two things:

    Photo 6: i need translate this two terms.

    Photo 5: i dont know why just appear the age at the box.

    Thank you very much for your help!

    Attachments:
    You must be logged in to view attached files.
    in reply to: Important problem uploading photos #25352
     alberhd
    Participant

    I need help please,this is a important problem,thanks

    in reply to: What is the file to edit the profile menu? #25351
     alberhd
    Participant

    Im looking to edit the text now,the text of Notifications and Messages,where can i do it?

    in reply to: Page who's online #25295
     alberhd
    Participant

    I’m interested on this too,thanks!

    in reply to: Cometchat chat link in profile #25272
     alberhd
    Participant

    Hi,this code is working good: <button type=”button” onclick=”javascript:jqcc.cometchat.chatWith(‘<?php echo bp_displayed_user_id() ?>’);”>Chat with me</button>

    But, how can i put the chat button under the button of private message and with the same design? Thanks

     alberhd
    Participant

    I have the same problem too,i follow all the steps

    in reply to: How I can do a "Who Visit you" page ? #25246
     alberhd
    Participant

    Like this idea: https://archived.seventhqueen.com/forums/topic/add-notification-in-menu-dropdown

    But i don’t know what is the necessary code to do it,and how put this section with membership.

Viewing 16 posts - 121 through 136 (of 136 total)

Log in with your credentials

Forgot your details?