BuddyDev

Search

Replies

  • Participant
    Level: Enlightened
    Posts: 47

    Dear Brajesh!

    Last night I was successfull and got my “conditional advanced search” up and running 🙂

    Its not pure static anymore 😀
    But its still not as dynamic as i want 🙁
    (But Im still a learning noob, so thats ok for me)

    what does that mean:
    I modified the form template and injected some css and js.
    So the form is generated dymanically (with my extra divs classes)
    BUT the conditions are hardcoded. (machting my ids,values, names and classes)
    Since I don’t know anything about creating an own plug-in (yet),
    its hard for me to think, how the communication between admin-ui and code is done.

    Thats also the reason, why I couldn’t just use the conditions created with your plug-in.
    So I “recreated” all conditions – I know, im such a nap – sorry.

    I need to figuere out some more things, like replacing hardcoded texts with change-able variables.
    example:

    var yzposition = $('#bps_directory14 input:radio[name=field_29]');

    bps_directory14 and field_29 only works for my specific case of course.

    I know that there must be far more efficient ways solving this problem, but never the less, this way I learn a lot of stuff about wordpress/buddypress, and perhaps some day I could also create such amazing things like you do every day 🙂

    If you want to take a look at my current state, You can gladly have access to my computer via teamviewer. (since its a local development)

    Cheers
    Blade

    P.S.: Any chance I could apply your awesome dropdown2radio hack of membertype for the profile search?
    It was already astonishing, seeing that it also applied on the admin backend and not “only” for the registration front end <3

  • Participant
    Level: Enlightened
    Posts: 47

    Master Brajesh <3

    Thank you soo much. Your support is as always outstanding!!!

    Off-topic:
    Right now I’m working on a conditional front for “BP Profile Search”.
    (using a static search form for the beginning)
    If I achieve this dynamically, I would gladly share it with you.
    (Perhaps you [or someone else] could use it)

    Your
    Blade

  • Participant
    Level: Enlightened
    Posts: 47

    Idea 1:

    Idea 2:

    Please excuse me, if those ideas are noob or stupid.
    I will delete these posts on your wish then.

    Cheers
    Blade

    P.S.: Sorry, if you need those screens in english, plz tell me – I will create them asap <3

  • Participant
    Level: Enlightened
    Posts: 47
    blade on in reply to: [Resolved] BP Autologin on Activation #2913

    Hi Brajesh!

    Everything your hand touches, is working a 100% 😀
    Thank you soo much my master!!!

    Blade

  • Participant
    Level: Enlightened
    Posts: 47
    blade on in reply to: [Resolved] BP Autologin on Activation #2904

    You give us so much l0ve and I just wanted to give some back 🙂

    Do you know how to trigger this redirect at click on “edit profile”?

    I found a perfect solution ( of course from you, from whom else ):

    
    <?php global $bp;
    
    if(bp_get_current_profile_group_id()==1)
    
    bp_core_redirect($bp->displayed_user->domain."profile/edit/group/2");
    
    ?>
    

    Sadly its 5 years old, and implementing this gives me following error:

    Warning: Cannot modify header information – headers already sent by (output started at C:\xampp\htdocs\wordpress\wp-includes\class.wp-styles.php:172 in C:\xampp\htdocs\wordpress\wp-includes\pluggable.php on line 1228

    I checked everything, there is no newline or space 🙁
    Somehow I cant call a redirect at that time.

  • Participant
    Level: Enlightened
    Posts: 47
    blade on in reply to: [Resolved] BP Autologin on Activation #2901

    Afterwords:

    Using my code might be less characters, but i’m using your code, because having the proper $user_id is much better for modifications.
    Here are my modifications to your solution to also differentiate between member-types and redirecting to the “detailed” edit profile page. (not the general)
    Perhaps someone find this useful:

    
    
    function redirect_to_edit_profile( $profile_url, $user_id  ) {
    	if( bp_get_member_type($user_id) == 'your-member-type-1' ) {
    	return $profile_url .'profile/edit/group/2/';
    	}
    	else if( bp_get_member_type($user_id) == 'your-member-type-2' ) {
    	return $profile_url .'profile/edit/group/5/';	
    	}
    }
    
    

    You have to change:
    – “your-member-type-1” & “your-member-type-2” to match your membertype-names
    – group-number to redirect to [varies with the amount of field-groups you created per member-type]

    Cheers
    Blade

    • This reply was modified 8 years, 8 months ago by blade.
  • Participant
    Level: Enlightened
    Posts: 47
    blade on in reply to: [Resolved] BP Autologin on Activation #2900

    Test report:

    IT IS WORKING!

    Topic marked as resolved 🙂

  • Participant
    Level: Enlightened
    Posts: 47
    blade on in reply to: [Resolved] BP Autologin on Activation #2899

    Hey my master!
    I just solved it via trial&error like a stupid xD

    
    add_filter('bpdev_autoactivate_redirect_url','redirect_to_edit_profile');
    function redirect_to_edit_profile($user_id){
             return $user_id.'profile/edit/';
    }
    

    I found out (at least think i did) that $user_id at this specific hook time is already the full url,
    thats why bp_core_get_user_domain($user_id) can’t find the “user_id”, thus returning the url without the name.
    I dont know if it makes any sense, but that was my noob-logic (and i’m a very beginner in wordpress)

    Never the less I will test your solution asap, and report back to you.

    Million thanks for being like you are Brajesh!!!
    Gratefully

    Blade

  • Participant
    Level: Enlightened
    Posts: 47
    blade on in reply to: [Resolved] BP Autologin on Activation #2885

    oh, cant edit OP. Doublepost for format – sorry all:

    Dear Brajesh,

    Im using your old but very awesome plugin:
    BP Autologin on Activation

    1) Still works perfectly! Thank you very much!

    2) I tried adding your code from the comment to redirect to /profile/edit (functions.php):

    
    
    add_fllter(‘bpdev_autoactivate_redirect_url’,’redirect_to_edit_profile’);
    function redirect_to_edit_profile($user_id){
    return bp_core_get_user_domain($user_id ).”profile/edit/”;
    }
    

    But $user_id seems to empty at this time.
    I also tried following code:

    
    
    add_fllter(‘bpdev_autoactivate_redirect_url’,’redirect_to_edit_profile’);
    function redirect_to_edit_profile($user_id){
    return get_option( ‘home’ ) . ‘/members/’ . bp_core_get_username( $user_id ) . ‘/profile/edit/’;
    }
    

    same results.

    3) My goal: redirect on activation dependant on the member-type.
    I wrote the following script for a redirect plugin, which i would like to replace with yours:

    
    $member_type = bp_get_member_type($user->ID);
    if( $member_type == ‘Student’ || $member_type == ‘student’ ) {
    $redirect_url = ‘/wordpress/members/’.$user->user_login.’/profile/edit/group/6/#edit-personal-li’;
    }
    else if( $member_type == ‘Teacher’ || $member_type == ‘techer’ ) {
    $redirect_url = ‘/wordpress/members/’.$user->user_login.’/profile/edit/group/5/#edit-personal-li’;
    }
    else {
    $redirect_url = ‘/wordpress/members/’.$user->user_login.’/profile/’;
    }

    Perhaps this snippet could be useful to someone 🙂

    Gratefully
    Blade

  • Participant
    Level: Enlightened
    Posts: 47
    blade on in reply to: [Resolved] member type on registration #2825

    Dear Brajesh!

    You are absolutely right! EVERYTHING WORKS PERFECT!!!

    At this point I wanted to also thank you for your “username availability checker”.
    Together with some snippets I got a nice multi-step-registration without any extra plugins:
    I styled a little bit and made the “available” message an icon.
    (i know it still looks noobish, but im not a designer and still a beginner in wordpress)
    Here are my pics for you. (i would send you signup3.png – but in privat 😉 )

    Just your plug-ins, css-js-toolbox and my own childtheme:

    P.S.:Here is signup3.png – password via PM 😉

    • This reply was modified 8 years, 9 months ago by blade.
    • This reply was modified 8 years, 9 months ago by blade.
    • This reply was modified 8 years, 9 months ago by blade.