Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • simonwillan
    Participant

    @simonwillan

    In fact, ideally we’d like to override what check_is_friend() does, without hacking the core file.

    is this possible?


    simonwillan
    Participant

    @simonwillan

    Okay case solved.

    I added another action to after_setup_theme() at priority 20 for registering more ajax actions. Created a custom ajax.php script and required it in the FIRST after_setup_theme() hook for my custom template.

    Created a test action of 'addremove_friend' => 'custom_ajax_addremove_friend' and echo’d test content. All works as expected 🙂


    simonwillan
    Participant

    @simonwillan

    Okay, In which case I’d like to override the some of the core ajax functions within this script. Is it as simple as adding filters or would I have to create a new file & folder buddypress/buddypress-functions.php and write a new set of ajax actions?


    simonwillan
    Participant

    @simonwillan

    Okay I’ve found the solution. However I’m confused as to why ajax.php isn’t where the functions are being called. It appears buddypress-functions.php is where the magic happens. This confuses me slightly, what is the point in ajax.php if its never being used? The function run is : “bp_legacy_theme_ajax_addremove_friend”


    simonwillan
    Participant

    @simonwillan

    the friend button is in the profile page: ‘#members-dir-list’ is not a div on that page. If I had the members directory list page open then I am certain this would work, however its not that version of the button. That being said, I did copy the exact code from the members-dir-list click function and it still had the same problem. It ran the href rather than the javascript regardless of if I tried to exit the function early using the same return value as it already has. To no avail 🙁


    simonwillan
    Participant

    @simonwillan

    bump, apparently I posted this over a year ago! (I only posted it today)


    simonwillan
    Participant

    @simonwillan

    okay so it has “register_sidebar()”, I can use that. My problem is related to the fact that I’m using widgets to display a Sub Menu that can be defined using the Menus admin. I can then choose the menu to display, and the widget will display it. That menu needs to change on a per page basis. (hence the need for a different set of widgets per page)


    simonwillan
    Participant

    @simonwillan

    Many apologies, When I set the “Activity Streams” Page in BP settings to “None” (deactivate, should have been clearer on that), then I get my sidebar back. When I set “Activity Streams” to one of my existing pages, I can see the Activity Stream just fine, but the widgets in the sidebar no longer display, and is_active_sidebar() is returning FALSE.

    I use BP theme compatibility because I am not using an existing WordPress template. It is completely bespoke. I don’t override the default behaviour as I am happy with it using page.php for now.

    However I may have just seen my problem. I am using a plugin called “WordPress Page Widgets” which lets me specify a different set of widgets on a per page basis. If I apply the sidebar widgets to every page the default way it works fine. However it is incredibly important that each page has a different set of widgets, and WordPress doesn’t appear to have a way of doing this without the need for a plugin.

    Any thoughts?

Viewing 8 replies - 1 through 8 (of 8 total)
Skip to toolbar