How can I remove certain plugins from the search results on elgg 1.7
For example, i'd like to remove results for the "File" plugin when doing a search, without removing the actual plugin.
I've been reading up on it and it looks like i need to write some kind of hook, but i'm unsure what and where this needs to be. Any help out there?
thanks,
Tri
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.
- Cash@costelloc
Cash - 0 likes
- Brett@brett.profitt
Brett - 0 likes
- triout@triout
triout - 0 likes
- Edison Panchi@creativaws
Edison Panchi - 0 likes
- Trajan@Trajan
Trajan - 0 likes
- mostekkk@mostekkk
mostekkk - 0 likes
- mostekkk@mostekkk
mostekkk - 0 likes
You must log in to post replies.commenting out this line in the plugin's start should do it: register_entity_type('object','file');
Normally, I wouldn't recommend editing a plugin but there does not appear to be a unregister_entity_type() function available.
Re unregister_entity_type(): could be one to add since we've started introducing other unregister_*() functions...
Yep, that works, i'll just keep in mind this direct plugin change when i upgrade. Thanks Cash!
Hi, i need to restict results of my file search, I just need to make a list with .doc and .pdf file extentions, How can I perform this change?
I make this change just with php code ( external access) How can I integrate this to the defaul file search module.
This is my implementation. http://community.elgg.org/pg/pages/view/478810/
SQL: I need to include in the file search:
SELECT a1.id as idarchivo, a1.string ,a2.*, a3.username, a4.* FROM elggmetastrings as a1, elggmetadata as a2, elggusers_entity as a3, elggobjects_entity as a4 WHERE( a1.string LIKE '%.doc%' OR a1.string LIKE '%.pdf%' OR a1.string LIKE '%.ppt%' OR a1.string LIKE '%.xls%' OR a1.string LIKE '%.zip%') AND a1.string LIKE '%file/%' ";
Tks 4 yours answers
Not sure if this is a good practice, but what I did was surround the:
like this:
So it registers and shows up if admin is logged in. That way for search results, river filter and admin statistics page admin can see everything. But users can only see the entities you want them to.
I have similar problem - but with groups. I had a lot of group activity, now I've turned off groups plugin and groups search resoults are still visible. How to remove search in groups? (plugin groups id turned off now). All regarding elgg 1.7.1
solved ;)
unset($types[group]); in mod/search/index.php