Skip to:
Content
Pages
Categories
Search
Top
Bottom

Private messaging with friend auto complete style


  • buddycore
    Participant

    @buddycore

    I’m struggling to get this area to position correctly.

    The autocomplete is appended to the page but there are no top and left coordinated being added for absolute positioning. (When a user begins to type a friends list will be appended to the page).

    This means I’ve had to simply ‘stick’ it to the middle of the page which isn’t good UX.

    Any ideas how I can get a handle on the CSS of this. Either by appending to the ul.acfb-holder which is inside the form or by dynamically adding the coords to the div.ac_results markup.

    It works, but not intuitive this way.

Viewing 2 replies - 1 through 2 (of 2 total)
  • If you’re referring to this https://cloudup.com/cmbgottNhQf — yes, that particular autocomplete script is awful (the other at-mention auto-complete used elsewhere throughout a site are better). Sorry. 🙁

    I am not sure what you want, however. This autocomplete script is added to the screen via the messages_autocomplete_init_jsblock function. If you look at jquery.autocomplete.js, maybe there’s an option you could use, or initialize it differently.

    A different, maybe better approach than the hell that is this 2007-era jquery.autocomplete.js script, is to replace it with the other autocomplete script we use throughout BuddyPress. I forget why we haven’t done it yet; it may just be a lack of time, or perhaps there’s some complexity I’m forgetting as I write this message.

    — If this sounds interesting, let me introduce you to what we’re calling BP Nouveau — a replacement for the BP Classic set of templates. It’s not done yet for production use, but take a look at this specific function: https://github.com/buddypress/next-template-packs/blob/master/bp-templates/bp-nouveau/js/buddypress-messages.js#L524

    I am 99% sure that unhooking messages_autocomplete_init_jsblock and instead adding a copy of that JS function from BP Nouveau will switch over the auto-complete for the “Send Messages To” field. There may be further tweaks needed to make this work out-of-the-box, but it seems to work well in BP Nouveau, so dig arounds its CSS if something looks off.

    Hope this helps


    buddycore
    Participant

    @buddycore

    Thanks, I’ve never got hold of working with core functionalities and thus I have failed miserably with some technical matters. Given there’s a lot of undocumented but feature rich functionality in BuddyPress this puts me in no mans land.

    I’m looking forward to BP-Nouveau for now I will work with what’s available and what you have written here.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar