Forum Replies Created
-
Author
-
August 12, 2014 at 22:35 in reply to: Assign default Membership level at registration (Problem) #25513alberhdParticipant
Ah ok,maybe i know the problem,i enter both codes,confusion! and is just one of them, right?
COPY CODEadd_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?
August 12, 2014 at 22:27 in reply to: Assign default Membership level at registration (Problem) #25512alberhdParticipantDo 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
alberhdParticipantI appreciate your help, thanks for the detail. After i will try the code,one more time,thank you!
alberhdParticipantwangguard 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
alberhdParticipantI 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.alberhdParticipantmaybe is just one code to after the photo is uploaded the page did reload,but i dont know…
alberhdParticipantIm waiting about this question,should appear like in the photo attached
Attachments:
You must be logged in to view attached files.alberhdParticipantYes,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.alberhdParticipantIm looking to edit the text now,the text of Notifications and Messages,where can i do it?
alberhdParticipantHi,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
August 9, 2014 at 17:15 in reply to: Please re-connect your facebook account as we couldn't find your email address. #25249alberhdParticipantI have the same problem too,i follow all the steps
alberhdParticipantLike 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.
-
AuthorPosts