Needs review
Project:
Top Searches
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
17 Nov 2010 at 15:50 UTC
Updated:
18 Nov 2010 at 12:24 UTC
Hi,
I brought to the developer of the FuzzySearch module that there is a hook in TopSearch module that allows other modules to send their data as well, but he could not find it. Can you please refer to this issue?
Thanks.
Comments
Comment #1
z.stolar commentedPlease refer to the function top_searches_top_searches in top_searches.module
Let me know if this is sufficient.
Comment #2
VTM commented#awolfey
Can you review?
Comment #3
awolfey commentedYes, I saw that function, but it's not a hook. It's an api function. It looks like it might be implementing its own hook_top_search, but that is never invoked.
What I would suggest for the top searches module is to implement hook_watchdog because that, with only a small piece of code, is like to to gain access immediately to most search modules, rather than needing each search module to call top_search_top_search().
Additionally, hook_watchdog gives you access to everything you need to create some kind of flood or gaming prevetion: user object, IP address, timestamp, uri, etc.
Not tested:
I'm going to move this to the top searches queue. This is really the way to do it I think.