Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hide Username in autocomplete „send to“


  • msteimann
    Participant

    @msteimann

    Hello,

    I am using the latest BuddyBress version (legacy template) and have disabled the activity stream. For security reasons I want to hide a member’s username wherever it is possible. Can someone please advice me how to hide the username in the autocomplete field? Please note the attached screenshot.

    I found this thread, which probably shows a solution for my request, but unfortunately I have no coding skills and got stuck while trying to follow the steps.

    Autocomplete shows both names

    Many thanks

    How to hide username

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

  • honoluluman
    Participant

    @honoluluman

    Hello, did you manage to find solution to this issue?


    msteimann
    Participant

    @msteimann

    No, unfortunately I never got an answer.


    clickallco
    Participant

    @clickallco

    Not sure if this is the same in legacy, but in BP nouveau you can hide it with plain css like so

    .atwho-container #atwho-ground-send-to-input .atwho-view ul li small{
    	display:none
    }

    honoluluman
    Participant

    @honoluluman

    @clickallco thanks for the reply. Unfortunatelly in legacy it is like that `<li class=”ac_event ac_over”><span id=”link-username” href=”#”></span>
    <img src=”https://www.test.com/wp-content/uploads/avatars/23/user-bpthumb.jpg&#8221; style=”width: 15px”>   User (<strong>U</strong>sername)</li>`

    and there is no element to hide the (<strong>U</strong>sername)


    honoluluman
    Participant

    @honoluluman

    So i managed to solve this problem with some CSS, unfortunately there is no possibility to wrap with any html element around (%s) , BUT there is possibility to wrap with html the rest. So i did this

    printf( '<span id="keep"><span id="%s" href="#"></span><img src="%s" style="width: 15px"> &nbsp; %s</span> (%s)' . "\n",

    with out removing nothing from the original code, just adding the span ‘keep’ and then with the classic css visibility:hidden; trick i managed to hide it simple.


    honoluluman
    Participant

    @honoluluman

    @msteimann if you still need this just tell me i can help you.

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