Skip to:
Content
Pages
Categories
Search
Top
Bottom

Replace default buddypress login with “Login with Ajax”


  • 0815
    Participant

    @0815t

    Hello,
    how can i replace the default login of buddypress with the plugin login with ajax?

Viewing 9 replies - 1 through 9 (of 9 total)

  • 0815
    Participant

    @0815t

    no one a idea?


    0815
    Participant

    @0815t

    thank you


    Boone Gorges
    Keymaster

    @boonebgorges

    If you’re using the bp-default theme, the login sidebar is created at buddypress/bp-themes/sidebar.php. You could copy that file to your child theme directory and modify lines 29-56 to contain whatever login markup you’d like.


    WWDay3
    Participant

    @wwday3

    Man, this makes very little sense to me.

    I want to insulate all of my members from any WordPress panels. So far, THE only place I see the problem occurring is when a user types in a bad profile/password. In that case he/she is taken to the “wiggling” login page. I looked at a couple ajax login plugins, but they don’t really “replace” the default login.

    Shouldn’t BP have an option to turn off the default login? Or maybe have it set up so that the default login widget is a pre-installed widget that could be removed/replaced?


    imjscn
    Participant

    @imjscn

    Login_with_Ajax doesn’t automatically replace buddypress sidebar login form.
    You can either modify or remove the sidebar login form.
    If modify– follow Boon’s instruction, modify lines 29-56, take the widget_out.php as reference, and no need to add LWA widget
    if remove–put this in your child theme’s functions.php, then, add LWA widget in sidebar:
    `add_action(‘bp_before_sidebar_login_form’, ‘mesh_before_sidebar_login_form’);
    function mesh_before_sidebar_login_form() { ob_start(); }
    add_action(‘bp_after_sidebar_login_form’, ‘mesh_after_sidebar_login_form’);
    function mesh_after_sidebar_login_form() { ob_end_clean(); }`


    WWDay3
    Participant

    @wwday3

    My original thought was to just comment out 29-56, and then add the widget to the sidebar.

    But, I guess that’s not really the point. Buddypress seems to be designed around the concept of being “hack free”. And then, what does BP do? Put something in the “core” template that requires a work-around. In the “old days” I had to hack themes and plugins right and left to make them work. I was kinda hoping I could work with Buddypress in the same framework I’ve been used to with WP in general. Guess not?


    imjscn
    Participant

    @imjscn

    Sure you can comment out 29-56.
    The code I posted is for the case that if you don’t want to touch the theme template,


    WWDay3
    Participant

    @wwday3

    OK. So, is there a way to generically modify functions.php (like another WordPress hook or whatever) so that if I change themes the code you gave me would not “go away”. Or, would I have to make the same changes in a new theme if I decided to use it?


    imjscn
    Participant

    @imjscn

    `bp_before_sidebar_login_form`
    and
    `bp_after_sidebar_login_form`
    As long as be default theme has these 2 line before and after sidebar login form, the code should work.
    This means if BP decide to change these 2 hooks to something else, you can change my code to
    `add_action(‘before_somethingelse’, ‘mesh_before_somethingelse’);
    function mesh_before_somethingelse() { ob_start(); }
    add_action(‘after_somethingelse’, ‘mesh_after_somethingelse’);
    function mesh_after_somethingelse() { ob_end_clean(); }`

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Replace default buddypress login with “Login with Ajax”’ is closed to new replies.
Skip to toolbar