I am trying to add a google-suggest-like search to my Elgg site. When a user starts typing their search query and reaches at least three characters, I would like to suggest the group titles that match the names they are looking for.
While I doubt there is an exact plugin match for this out there, I was hoping to find a live search or search suggestion plugin that I could customize to only search group titles. Could anyone point me to something like this?
Thanks.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Mike Zacher (vazco)@vazco
Mike Zacher (vazco) - 0 likes
- Cash@costelloc
Cash - 0 likes
- ElggHeader@jpound
ElggHeader - 0 likes
- ElggHeader@jpound
ElggHeader - 0 likes
You must log in to post replies.There is no plugin like this, you can easily create it with use of ajax and elgg_list_entities method though.
Elgg has an input/autocomplete view that does exactly that. Something like
echo elgg_view('input/autocomplete', array('match_on' => 'group'));
You'll need to figure out what to do with the result (join the user to the group, take them to the group homepage, etc.).
Thanks, Cash. I'll check that out.
For anyone who stumbles upon this, I ended up finding an existing plugin that did exxactly what I needed. You can make your autocomplete search by any entity type with this:
http://community.elgg.org/pg/plugins/release/255102/developer/pedroprez/autocomplete-inputtext-of-entities
There is a bug that breaks when a group name (the entity I was searching) has an apostrophe in it. There is a patch in the comments though.