Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] Turn on autocomplete for message composing for non friends

  • @applegateian

    Participant

    Hi all

    My understanding of messages is that from the compose a message page, autocomplete is used to suggest a friend to send a message to. Autocomplete does not show up if the user you are sending a message to is not a friend.

    Is there a way to enable autocomplete for ALL users, regardless of whether they are a ‘friend’ or not? My site doesn’t allow users to connect in this way so I’d like autocomplete to be an option for all.

    I see this code in the input field, assuming autocomplete=off is the potential issue:

    <input type="text" name="send-to-input" class="send-to-input ac_input" id="send-to-input" autocomplete="off">
    
Viewing 2 replies - 1 through 2 (of 2 total)
  • @mabellaneda

    Participant

    Hello,

    is there anything new about this feature?

    @danbp

    Participant

    Comment in bp-messages-loader.php

    
    /**
     * Implementation of BP_Component for the Messages component.
     *
     * @since BuddyPress (1.5.0)
     */
    class BP_Messages_Component extends BP_Component {
    	/**
    	 * If this is true, the Message autocomplete will return friends only, unless
    	 * this is set to false, in which any matching users will be returned.
    	 *
    	 * @since BuddyPress (1.5)
    	 * @var bool
    	 */
    	public $autocomplete_all;

    So yes it is implemented since BP 1.5

    By default you get only suggestion of your friends names. You can get all user names, by adding this to your bp-cutom.php file

    define( 'BP_MESSAGES_AUTOCOMPLETE_ALL', true );

    But never use this constant if you have hundreds of user ! (imagine the length of such a list !)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Turn on autocomplete for message composing for non friends’ is closed to new replies.
Skip to toolbar