I have a plugin which adds objects of a certain sub-type... "cities"
when I create a city, I add the following code:
$cityentry->tags = $name;
where $cityentry is the object and $name is the city name from the form.
I have been trying to read up on this myself, but I simply cannot find docs on how I can search on my city objects. Can someone point me in the right direction? I found stuff about plugin_hooks but I couldn't see the link to the tags of my object.
Any assistance would be appreciated.
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.
- Kevin Jardine@kevin

Kevin Jardine - 0 likes
- Andrew MacKenzie@mojorisin41

Andrew MacKenzie - 0 likes
- Andrew MacKenzie@mojorisin41

Andrew MacKenzie - 0 likes
You must log in to post replies.Are you saying that you want a separate search link to appear in the left sidebar on the search page?
If so, you need to look up the docs on registering your object type.
I believe I have done this. I create my cities using $city = new ElggObject(); and give it a sub-type of "city". I list them using list_entities. I just can't seem to find them in a search.
I will look some more at other plugins that add Object types and see if I can figure it out. I guess I thought it would be easier since the blog tutorial indicated if I fill in "tags" on my ElggObject that search was automatic.
Thx for the hint Kevin!
I needed to make a call to register_entity_type() to make my object appear in the search types.
I appreciate the help.